[poppler] 2 commits - poppler/Form.cc poppler/Form.h poppler/PDFDocEncoding.h qt5/src

Albert Astals Cid aacid at kemper.freedesktop.org
Thu Apr 5 10:21:54 UTC 2018


 poppler/Form.cc            |    5 +++--
 poppler/Form.h             |    1 +
 poppler/PDFDocEncoding.h   |    2 +-
 qt5/src/poppler-private.cc |    5 +++--
 qt5/src/poppler-private.h  |    3 ++-
 5 files changed, 10 insertions(+), 6 deletions(-)

New commits:
commit 3fdb7ea7b6a1ed4add2fbc6dca7a38b27fc79f45
Author: Albert Astals Cid <albert.astals.cid at kdab.com>
Date:   Thu Apr 5 12:21:11 2018 +0200

    Make UnicodeParsedString input const

diff --git a/qt5/src/poppler-private.cc b/qt5/src/poppler-private.cc
index e3a540ab..0461c359 100644
--- a/qt5/src/poppler-private.cc
+++ b/qt5/src/poppler-private.cc
@@ -5,6 +5,7 @@
  * Copyright (C) 2013 by Thomas Freitag <Thomas.Freitag at alfa.de>
  * Copyright (C) 2013 Adrian Johnson <ajohnson at redneon.com>
  * Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
+ * Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>. Work sponsored by the LiMux project of the city of Munich
  * Inspired on code by
  * Copyright (C) 2004 by Albert Astals Cid <tsdgeos at terra.es>
  * Copyright (C) 2004 by Enrico Ros <eros.kde at email.it>
@@ -98,11 +99,11 @@ namespace Debug {
         return QString::fromUtf8(convertedStr.getCString(), convertedStr.getLength());
     }
 
-    QString UnicodeParsedString(GooString *s1) {
+    QString UnicodeParsedString(const GooString *s1) {
         if ( !s1 || s1->getLength() == 0 )
             return QString();
 
-        char *cString;
+        const char *cString;
         int stringLength;
         bool deleteCString;
         if ( ( s1->getChar(0) & 0xff ) == 0xfe && ( s1->getLength() > 1 && ( s1->getChar(1) & 0xff ) == 0xff ) )
diff --git a/qt5/src/poppler-private.h b/qt5/src/poppler-private.h
index 36c54b65..85852d5b 100644
--- a/qt5/src/poppler-private.h
+++ b/qt5/src/poppler-private.h
@@ -11,6 +11,7 @@
  * Copyright (C) 2014 Aki Koskinen <freedesktop at akikoskinen.info>
  * Copyright (C) 2016 Jakub Alba <jakubalba at gmail.com>
  * Copyright (C) 2017 Christoph Cullmann <cullmann at kde.org>
+ * Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>. Work sponsored by the LiMux project of the city of Munich
  * Inspired on code by
  * Copyright (C) 2004 by Albert Astals Cid <tsdgeos at terra.es>
  * Copyright (C) 2004 by Enrico Ros <eros.kde at email.it>
@@ -59,7 +60,7 @@ namespace Poppler {
     /* borrowed from kpdf */
     QString unicodeToQString(Unicode* u, int len);
 
-    QString UnicodeParsedString(GooString *s1);
+    QString UnicodeParsedString(const GooString *s1);
 
     GooString *QStringToUnicodeGooString(const QString &s);
 
commit 4b96c8399102a36e542c9da3b34650c26ccdda3c
Author: Albert Astals Cid <albert.astals.cid at kdab.com>
Date:   Thu Apr 5 12:19:07 2018 +0200

    Make pdfDocEncodingToUTF16 input param const

diff --git a/poppler/Form.cc b/poppler/Form.cc
index 76545d17..d1677c19 100644
--- a/poppler/Form.cc
+++ b/poppler/Form.cc
@@ -20,6 +20,7 @@
 // Copyright 2017 Hans-Ulrich Jüttner <huj at froreich-bioscientia.de>
 // Copyright 2017 Bernd Kuhls <berndkuhls at hotmail.com>
 // Copyright 2018 Andre Heinecke <aheinecke at intevation.de>
+// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>. Work sponsored by the LiMux project of the city of Munich
 //
 //========================================================================
 
@@ -56,12 +57,12 @@
 #include "Lexer.h"
 
 //return a newly allocated char* containing an UTF16BE string of size length
-char* pdfDocEncodingToUTF16 (GooString* orig, int* length)
+char* pdfDocEncodingToUTF16 (const GooString* orig, int* length)
 {
   //double size, a unicode char takes 2 char, add 2 for the unicode marker
   *length = 2+2*orig->getLength();
   char *result = new char[(*length)];
-  char *cstring = orig->getCString();
+  const char *cstring = orig->getCString();
   //unicode marker
   result[0] = (char)0xfe;
   result[1] = (char)0xff;
diff --git a/poppler/Form.h b/poppler/Form.h
index a4c59fb1..069f1597 100644
--- a/poppler/Form.h
+++ b/poppler/Form.h
@@ -16,6 +16,7 @@
 // Copyright 2017 Roland Hieber <r.hieber at pengutronix.de>
 // Copyright 2017 Hans-Ulrich Jüttner <huj at froreich-bioscientia.de>
 // Copyright 2018 Andre Heinecke <aheinecke at intevation.de>
+// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info at kdab.com>. Work sponsored by the LiMux project of the city of Munich
 //
 //========================================================================
 
diff --git a/poppler/PDFDocEncoding.h b/poppler/PDFDocEncoding.h
index 4f0840bb..eed599fa 100644
--- a/poppler/PDFDocEncoding.h
+++ b/poppler/PDFDocEncoding.h
@@ -29,6 +29,6 @@ class GooString;
 
 extern Unicode pdfDocEncoding[256];
 
-char* pdfDocEncodingToUTF16 (GooString* orig, int* length);
+char* pdfDocEncodingToUTF16 (const GooString* orig, int* length);
 
 #endif


More information about the poppler mailing list