[poppler] poppler/GlobalParamsWin.cc poppler/PDFDoc.cc

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Sun Sep 23 17:27:47 UTC 2018


 poppler/GlobalParamsWin.cc |    2 +-
 poppler/PDFDoc.cc          |    5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

New commits:
commit 21a17289c662fa67128d61180e9f8f357660d06b
Author: Albert Astals Cid <aacid at kde.org>
Date:   Sun Sep 23 19:24:54 2018 +0200

    Fix Windows build

diff --git a/poppler/GlobalParamsWin.cc b/poppler/GlobalParamsWin.cc
index 5479a56f..98e6c152 100644
--- a/poppler/GlobalParamsWin.cc
+++ b/poppler/GlobalParamsWin.cc
@@ -508,7 +508,7 @@ static const char *findSubstituteName(GfxFont *font, const std::unordered_map<st
     /* TODO: try to at least guess bold/italic/bolditalic from the name */
     delete name2;
     if (font->isCIDFont()) {
-      GooString *collection = ((GfxCIDFont *)font)->getCollection();
+      const GooString *collection = ((GfxCIDFont *)font)->getCollection();
 
       const char* name3 = nullptr;
       if ( !collection->cmp("Adobe-CNS1") )
diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc
index 777880d2..c2bb2fbc 100644
--- a/poppler/PDFDoc.cc
+++ b/poppler/PDFDoc.cc
@@ -184,12 +184,13 @@ PDFDoc::PDFDoc(wchar_t *fileNameA, int fileNameLen, GooString *ownerPassword,
   guiData = guiDataA;
 
   // save both Unicode and 8-bit copies of the file name
-  fileName = new GooString();
+  GooString *fileNameG = new GooString();
   fileNameU = (wchar_t *)gmallocn(fileNameLen + 1, sizeof(wchar_t));
   for (i = 0; i < fileNameLen; ++i) {
-    fileName->append((char)fileNameA[i]);
+    fileNameG->append((char)fileNameA[i]);
     fileNameU[i] = fileNameA[i];
   }
+  fileName = fileNameG;
   fileNameU[fileNameLen] = L'\0';
   
   // try to open file


More information about the poppler mailing list