[poppler] 2 commits - qt4/src qt/poppler-page.cc

Pino Toscano pino at kemper.freedesktop.org
Sat Feb 21 10:35:18 PST 2009


 qt/poppler-page.cc      |    4 ++--
 qt4/src/poppler-page.cc |    4 ++--
 2 files changed, 4 insertions(+), 4 deletions(-)

New commits:
commit 5e68e52da65b4d8c3817e5fbb6f1a937da321d48
Author: Pino Toscano <pino at kde.org>
Date:   Sat Feb 21 18:03:15 2009 +0100

    [Qt4] do not assume the destination file name for links is ASCII

diff --git a/qt4/src/poppler-page.cc b/qt4/src/poppler-page.cc
index 5712fd1..07e7304 100644
--- a/qt4/src/poppler-page.cc
+++ b/qt4/src/poppler-page.cc
@@ -89,9 +89,9 @@ Link* PageData::convertLinkActionToLink(::LinkAction * a, DocumentData *parentDo
     {
       LinkGoToR * g = (LinkGoToR *) a;
       // copy link file
-      const char * fileName = g->getFileName()->getCString();
+      const QString fileName = UnicodeParsedString( g->getFileName() );
       // ceate link: fileName, namedDest, object pointer
-      popplerLink = new LinkGoto( linkArea, (QString)fileName, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), parentDoc ) ) );
+      popplerLink = new LinkGoto( linkArea, fileName, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), parentDoc ) ) );
     }
     break;
 
commit 439cb397fed33df627a09c70788d72bef20dc872
Author: Pino Toscano <pino at kde.org>
Date:   Sat Feb 21 18:02:36 2009 +0100

    [Qt] do not assume the destination file name for links is ASCII

diff --git a/qt/poppler-page.cc b/qt/poppler-page.cc
index 536babb..9c7e4f2 100644
--- a/qt/poppler-page.cc
+++ b/qt/poppler-page.cc
@@ -278,9 +278,9 @@ QValueList<Link*> Page::links() const
         {
           LinkGoToR * g = (LinkGoToR *) a;
           // copy link file
-          const char * fileName = g->getFileName()->getCString();
+          const QString fileName = UnicodeParsedString( g->getFileName() );
           // ceate link: fileName, namedDest, object pointer
-          popplerLink = new LinkGoto( linkArea, (QString)fileName, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) );
+          popplerLink = new LinkGoto( linkArea, fileName, LinkDestination( LinkDestinationData(g->getDest(), g->getNamedDest(), data->doc->data ) ) );
         }
         break;
 


More information about the poppler mailing list