Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 124881
Collapse All | Expand All

(-)kpdf-3.5.1.orig/kpdf/core/generator_pdf/generator_pdf.cpp (-8 / +9 lines)
Lines 37-42 Link Here
37
#include "poppler/UnicodeMap.h"
37
#include "poppler/UnicodeMap.h"
38
#include "poppler/Outline.h"
38
#include "poppler/Outline.h"
39
#include "poppler/goo/GooString.h"
39
#include "poppler/goo/GooString.h"
40
#include "poppler/UGooString.h"
40
#include "poppler/goo/GooList.h"
41
#include "poppler/goo/GooList.h"
41
//#include "poppler/poppler-qt.h"
42
//#include "poppler/poppler-qt.h"
42
43
Lines 392-398 Link Here
392
        {
393
        {
393
            if (annots->getAnnot(i)->getAppearance(&obj1)->isStream())
394
            if (annots->getAnnot(i)->getAppearance(&obj1)->isStream())
394
            {
395
            {
395
                obj1.streamGetDict()->lookup("Resources", &obj2);
396
                obj1.streamGetDict()->lookup((UGooString&) "Resources", &obj2);
396
                if (obj2.isDict())
397
                if (obj2.isDict())
397
                {
398
                {
398
                    scanFonts(obj2.getDict(), list, &fonts, fontsLen, fontsSize);
399
                    scanFonts(obj2.getDict(), list, &fonts, fontsLen, fontsSize);
Lines 493-499 Link Here
493
        DocumentViewport viewport;
494
        DocumentViewport viewport;
494
        GooString * namedDest = QStringToUGString( option );
495
        GooString * namedDest = QStringToUGString( option );
495
        docLock.lock();
496
        docLock.lock();
496
        LinkDest * destination = pdfdoc->findDest( namedDest );
497
        LinkDest * destination = pdfdoc->findDest((UGooString*) namedDest );
497
        if ( destination )
498
        if ( destination )
498
        {
499
        {
499
            fillViewportFromLink( viewport, destination );
500
            fillViewportFromLink( viewport, destination );
Lines 553-559 Link Here
553
554
554
    // scan the fonts in this resource dictionary
555
    // scan the fonts in this resource dictionary
555
    gfxFontDict = NULL;
556
    gfxFontDict = NULL;
556
    resDict->lookupNF("Font", &obj1);
557
    resDict->lookupNF((UGooString&) "Font", &obj1);
557
    if (obj1.isRef())
558
    if (obj1.isRef())
558
    {
559
    {
559
        obj1.fetch(pdfdoc->getXRef(), &obj2);
560
        obj1.fetch(pdfdoc->getXRef(), &obj2);
Lines 580-586 Link Here
580
581
581
    // recursively scan any resource dictionaries in objects in this
582
    // recursively scan any resource dictionaries in objects in this
582
    // resource dictionary
583
    // resource dictionary
583
    resDict->lookup("XObject", &xObjDict);
584
    resDict->lookup((UGooString&) "XObject", &xObjDict);
584
    if (xObjDict.isDict())
585
    if (xObjDict.isDict())
585
    {
586
    {
586
        for (i = 0; i < xObjDict.dictGetLength(); ++i)
587
        for (i = 0; i < xObjDict.dictGetLength(); ++i)
Lines 588-594 Link Here
588
            xObjDict.dictGetVal(i, &xObj);
589
            xObjDict.dictGetVal(i, &xObj);
589
            if (xObj.isStream())
590
            if (xObj.isStream())
590
            {
591
            {
591
                xObj.streamGetDict()->lookup("Resources", &resObj);
592
                xObj.streamGetDict()->lookup((UGooString&) "Resources", &resObj);
592
                if (resObj.isDict()) scanFonts(resObj.getDict(), list, fonts, fontsLen, fontsSize);
593
                if (resObj.isDict()) scanFonts(resObj.getDict(), list, fonts, fontsLen, fontsSize);
593
                resObj.free();
594
                resObj.free();
594
            }
595
            }
Lines 688-694 Link Here
688
    int i;
689
    int i;
689
    Dict *infoDict = info.getDict();
690
    Dict *infoDict = info.getDict();
690
691
691
    if ( infoDict->lookup( (char*) data.latin1(), &obj )->isString() )
692
    if ( infoDict->lookup(UGooString(data.latin1()), &obj )->isString() )
692
    {
693
    {
693
        s1 = obj.getString();
694
        s1 = obj.getString();
694
        if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff )
695
        if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getChar(1) & 0xff ) == 0xff )
Lines 746-752 Link Here
746
    if ( !uMap )
747
    if ( !uMap )
747
        return i18n( "Unknown Date" );
748
        return i18n( "Unknown Date" );
748
749
749
    if ( infoDict->lookup( (char*) data.latin1(), &obj )->isString() )
750
    if ( infoDict->lookup(UGooString(data.latin1()), &obj )->isString() )
750
    {
751
    {
751
        s = obj.getString()->getCString();
752
        s = obj.getString()->getCString();
752
        if ( s[0] == 'D' && s[1] == ':' )
753
        if ( s[0] == 'D' && s[1] == ':' )
Lines 802-808 Link Here
802
                // get the destination for the page now, but it's VERY time consuming,
803
                // get the destination for the page now, but it's VERY time consuming,
803
                // so better storing the reference and provide the viewport as metadata
804
                // so better storing the reference and provide the viewport as metadata
804
                // on demand
805
                // on demand
805
                GooString *s = g->getNamedDest();
806
                GooString *s = (GooString*) g->getNamedDest();
806
                QString aux = QString(s->getCString());
807
                QString aux = QString(s->getCString());
807
                item.setAttribute( "ViewportName", aux );
808
                item.setAttribute( "ViewportName", aux );
808
            }
809
            }
(-)kpdf-3.5.1.orig/kpdf/core/generator_pdf/gp_outputdev.cpp (-3 / +3 lines)
Lines 246-252 Link Here
246
            {
246
            {
247
            LinkGoTo * g = (LinkGoTo *) a;
247
            LinkGoTo * g = (LinkGoTo *) a;
248
            // ceate link: no ext file, namedDest, object pointer
248
            // ceate link: no ext file, namedDest, object pointer
249
            link = new KPDFLinkGoto( QString::null, decodeViewport( g->getNamedDest(), g->getDest() ) );
249
            link = new KPDFLinkGoto( QString::null, decodeViewport((GooString*) g->getNamedDest(), g->getDest() ) );
250
            }
250
            }
251
            break;
251
            break;
252
252
Lines 256-262 Link Here
256
            // copy link file
256
            // copy link file
257
            const char * fileName = g->getFileName()->getCString();
257
            const char * fileName = g->getFileName()->getCString();
258
            // ceate link: fileName, namedDest, object pointer
258
            // ceate link: fileName, namedDest, object pointer
259
            link = new KPDFLinkGoto( (QString)fileName, decodeViewport( g->getNamedDest(), g->getDest() ) );
259
            link = new KPDFLinkGoto( (QString)fileName, decodeViewport((GooString*) g->getNamedDest(), g->getDest() ) );
260
            }
260
            }
261
            break;
261
            break;
262
262
Lines 327-333 Link Here
327
    DocumentViewport vp( -1 );
327
    DocumentViewport vp( -1 );
328
328
329
    if ( namedDest && !dest )
329
    if ( namedDest && !dest )
330
        dest = m_doc->findDest( namedDest );
330
        dest = m_doc->findDest((UGooString*) namedDest );
331
331
332
    if ( !dest || !dest->isOk() )
332
    if ( !dest || !dest->isOk() )
333
        return vp;
333
        return vp;

Return to bug 124881