View | Details | Raw Unified
Collapse All | Expand All

(-) kpdf-3.5.1.orig/kpdf/core/generator_pdf/generator_pdf.cpp (-8 / +9 lines)
 Lines 37-42    Link Here 
#include "poppler/UnicodeMap.h"
#include "poppler/UnicodeMap.h"
#include "poppler/Outline.h"
#include "poppler/Outline.h"
#include "poppler/goo/GooString.h"
#include "poppler/goo/GooString.h"
#include "poppler/UGooString.h"
#include "poppler/goo/GooList.h"
#include "poppler/goo/GooList.h"
//#include "poppler/poppler-qt.h"
//#include "poppler/poppler-qt.h"
 Lines 392-398    Link Here 
        {
        {
            if (annots->getAnnot(i)->getAppearance(&obj1)->isStream())
            if (annots->getAnnot(i)->getAppearance(&obj1)->isStream())
            {
            {
                obj1.streamGetDict()->lookup("Resources", &obj2);
                obj1.streamGetDict()->lookup((UGooString&) "Resources", &obj2);
                if (obj2.isDict())
                if (obj2.isDict())
                {
                {
                    scanFonts(obj2.getDict(), list, &fonts, fontsLen, fontsSize);
                    scanFonts(obj2.getDict(), list, &fonts, fontsLen, fontsSize);
 Lines 493-499    Link Here 
        DocumentViewport viewport;
        DocumentViewport viewport;
        GooString * namedDest = QStringToUGString( option );
        GooString * namedDest = QStringToUGString( option );
        docLock.lock();
        docLock.lock();
        LinkDest * destination = pdfdoc->findDest( namedDest );
        LinkDest * destination = pdfdoc->findDest((UGooString*) namedDest );
        if ( destination )
        if ( destination )
        {
        {
            fillViewportFromLink( viewport, destination );
            fillViewportFromLink( viewport, destination );
 Lines 553-559    Link Here 
    // scan the fonts in this resource dictionary
    // scan the fonts in this resource dictionary
    gfxFontDict = NULL;
    gfxFontDict = NULL;
    resDict->lookupNF("Font", &obj1);
    resDict->lookupNF((UGooString&) "Font", &obj1);
    if (obj1.isRef())
    if (obj1.isRef())
    {
    {
        obj1.fetch(pdfdoc->getXRef(), &obj2);
        obj1.fetch(pdfdoc->getXRef(), &obj2);
 Lines 580-586    Link Here 
    // recursively scan any resource dictionaries in objects in this
    // recursively scan any resource dictionaries in objects in this
    // resource dictionary
    // resource dictionary
    resDict->lookup("XObject", &xObjDict);
    resDict->lookup((UGooString&) "XObject", &xObjDict);
    if (xObjDict.isDict())
    if (xObjDict.isDict())
    {
    {
        for (i = 0; i < xObjDict.dictGetLength(); ++i)
        for (i = 0; i < xObjDict.dictGetLength(); ++i)
 Lines 588-594    Link Here 
            xObjDict.dictGetVal(i, &xObj);
            xObjDict.dictGetVal(i, &xObj);
            if (xObj.isStream())
            if (xObj.isStream())
            {
            {
                xObj.streamGetDict()->lookup("Resources", &resObj);
                xObj.streamGetDict()->lookup((UGooString&) "Resources", &resObj);
                if (resObj.isDict()) scanFonts(resObj.getDict(), list, fonts, fontsLen, fontsSize);
                if (resObj.isDict()) scanFonts(resObj.getDict(), list, fonts, fontsLen, fontsSize);
                resObj.free();
                resObj.free();
            }
            }
 Lines 688-694    Link Here 
    int i;
    int i;
    Dict *infoDict = info.getDict();
    Dict *infoDict = info.getDict();
    if ( infoDict->lookup( (char*) data.latin1(), &obj )->isString() )
    if ( infoDict->lookup(UGooString(data.latin1()), &obj )->isString() )
    {
    {
        s1 = obj.getString();
        s1 = obj.getString();
        if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff )
        if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff )
 Lines 746-752    Link Here 
    if ( !uMap )
    if ( !uMap )
        return i18n( "Unknown Date" );
        return i18n( "Unknown Date" );
    if ( infoDict->lookup( (char*) data.latin1(), &obj )->isString() )
    if ( infoDict->lookup(UGooString(data.latin1()), &obj )->isString() )
    {
    {
        s = obj.getString()->getCString();
        s = obj.getString()->getCString();
        if ( s[0] == 'D' && s[1] == ':' )
        if ( s[0] == 'D' && s[1] == ':' )
 Lines 802-808    Link Here 
                // get the destination for the page now, but it's VERY time consuming,
                // get the destination for the page now, but it's VERY time consuming,
                // so better storing the reference and provide the viewport as metadata
                // so better storing the reference and provide the viewport as metadata
                // on demand
                // on demand
                GooString *s = g->getNamedDest();
                GooString *s = (GooString*) g->getNamedDest();
                QString aux = QString(s->getCString());
                QString aux = QString(s->getCString());
                item.setAttribute( "ViewportName", aux );
                item.setAttribute( "ViewportName", aux );
            }
            }
(-) kpdf-3.5.1.orig/kpdf/core/generator_pdf/gp_outputdev.cpp (-3 / +3 lines)
 Lines 246-252    Link Here 
            {
            {
            LinkGoTo * g = (LinkGoTo *) a;
            LinkGoTo * g = (LinkGoTo *) a;
            // ceate link: no ext file, namedDest, object pointer
            // ceate link: no ext file, namedDest, object pointer
            link = new KPDFLinkGoto( QString::null, decodeViewport( g->getNamedDest(), g->getDest() ) );
            link = new KPDFLinkGoto( QString::null, decodeViewport((GooString*) g->getNamedDest(), g->getDest() ) );
            }
            }
            break;
            break;
 Lines 256-262    Link Here 
            // copy link file
            // copy link file
            const char * fileName = g->getFileName()->getCString();
            const char * fileName = g->getFileName()->getCString();
            // ceate link: fileName, namedDest, object pointer
            // ceate link: fileName, namedDest, object pointer
            link = new KPDFLinkGoto( (QString)fileName, decodeViewport( g->getNamedDest(), g->getDest() ) );
            link = new KPDFLinkGoto( (QString)fileName, decodeViewport((GooString*) g->getNamedDest(), g->getDest() ) );
            }
            }
            break;
            break;
 Lines 327-333    Link Here 
    DocumentViewport vp( -1 );
    DocumentViewport vp( -1 );
    if ( namedDest && !dest )
    if ( namedDest && !dest )
        dest = m_doc->findDest( namedDest );
        dest = m_doc->findDest((UGooString*) namedDest );
    if ( !dest || !dest->isOk() )
    if ( !dest || !dest->isOk() )
        return vp;
        return vp;