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 <[email protected]> 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 <[email protected]> * Copyright (C) 2013 Adrian Johnson <[email protected]> * Copyright (C) 2016 Jakub Alba <[email protected]> + * Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <[email protected]>. Work sponsored by the LiMux project of the city of Munich * Inspired on code by * Copyright (C) 2004 by Albert Astals Cid <[email protected]> * Copyright (C) 2004 by Enrico Ros <[email protected]> @@ -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 <[email protected]> * Copyright (C) 2016 Jakub Alba <[email protected]> * Copyright (C) 2017 Christoph Cullmann <[email protected]> + * Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <[email protected]>. Work sponsored by the LiMux project of the city of Munich * Inspired on code by * Copyright (C) 2004 by Albert Astals Cid <[email protected]> * Copyright (C) 2004 by Enrico Ros <[email protected]> @@ -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 <[email protected]> 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 <[email protected]> // Copyright 2017 Bernd Kuhls <[email protected]> // Copyright 2018 Andre Heinecke <[email protected]> +// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <[email protected]>. 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 <[email protected]> // Copyright 2017 Hans-Ulrich Jüttner <[email protected]> // Copyright 2018 Andre Heinecke <[email protected]> +// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <[email protected]>. 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 _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
