goo/GooString.cc | 2 +- goo/GooString.h | 2 +- poppler/CMap.cc | 4 ++-- poppler/CMap.h | 2 +- poppler/DateInfo.cc | 4 ++-- poppler/DateInfo.h | 4 ++-- poppler/Form.cc | 2 +- poppler/Form.h | 2 +- poppler/GfxFont.cc | 4 ++-- poppler/GfxFont.h | 6 +++--- poppler/OptionalContent.cc | 4 ++-- poppler/OptionalContent.h | 2 +- poppler/PDFDoc.cc | 2 +- poppler/PDFDoc.h | 2 +- poppler/PSOutputDev.cc | 4 ++-- poppler/PSOutputDev.h | 4 ++-- poppler/Page.h | 6 +++--- 17 files changed, 28 insertions(+), 28 deletions(-)
New commits: commit 5fc6d9fcb41966b85dc67117531c81ec89f42f20 Author: Albert Astals Cid <[email protected]> Date: Fri Apr 6 12:50:18 2018 +0200 PageAttrs and Page getLastModified return const GooString * diff --git a/poppler/Page.h b/poppler/Page.h index 61570791..7151ee5b 100644 --- a/poppler/Page.h +++ b/poppler/Page.h @@ -91,9 +91,9 @@ public: PDFRectangle *getTrimBox() { return &trimBox; } PDFRectangle *getArtBox() { return &artBox; } int getRotate() { return rotate; } - GooString *getLastModified() + const GooString *getLastModified() const { return lastModified.isString() - ? lastModified.getString() : (GooString *)NULL; } + ? lastModified.getString() : nullptr; } Dict *getBoxColorInfo() { return boxColorInfo.isDict() ? boxColorInfo.getDict() : (Dict *)NULL; } Dict *getGroup() @@ -171,7 +171,7 @@ public: PDFRectangle *getTrimBox() { return attrs->getTrimBox(); } PDFRectangle *getArtBox() { return attrs->getArtBox(); } int getRotate() { return attrs->getRotate(); } - GooString *getLastModified() { return attrs->getLastModified(); } + const GooString *getLastModified() const { return attrs->getLastModified(); } Dict *getBoxColorInfo() { return attrs->getBoxColorInfo(); } Dict *getGroup() { return attrs->getGroup(); } Stream *getMetadata() { return attrs->getMetadata(); } commit a801b46e1e792b5d0a34f97de870c485e0ef312a Author: Albert Astals Cid <[email protected]> Date: Fri Apr 6 12:48:18 2018 +0200 PSOuputDev writePSString and writePSTextLine take const diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc index dec0e80c..cf940561 100644 --- a/poppler/PSOutputDev.cc +++ b/poppler/PSOutputDev.cc @@ -7434,7 +7434,7 @@ void PSOutputDev::writePSFmt(const char *fmt, ...) { va_end(args); } -void PSOutputDev::writePSString(GooString *s) { +void PSOutputDev::writePSString(const GooString *s) { Guchar *p; int n, line; char buf[8]; @@ -7579,7 +7579,7 @@ GooString* PSOutputDev::filterPSLabel(GooString *label, GBool *needParens) { } // Write a DSC-compliant <textline>. -void PSOutputDev::writePSTextLine(GooString *s) { +void PSOutputDev::writePSTextLine(const GooString *s) { int i, j, step; int c; diff --git a/poppler/PSOutputDev.h b/poppler/PSOutputDev.h index 0e62840b..10616d45 100644 --- a/poppler/PSOutputDev.h +++ b/poppler/PSOutputDev.h @@ -432,10 +432,10 @@ private: void writePS(const char *s); void writePSBuf(const char *s, int len); void writePSFmt(const char *fmt, ...); - void writePSString(GooString *s); + void writePSString(const GooString *s); void writePSName(const char *s); GooString *filterPSLabel(GooString *label, GBool *needParens=nullptr); - void writePSTextLine(GooString *s); + void writePSTextLine(const GooString *s); PSLevel level; // PostScript level (1, 2, separation) PSOutMode mode; // PostScript mode (PS, EPS, form) commit eb6de58de5ef8c2ddeeed386e0b8b498b945797f Author: Albert Astals Cid <[email protected]> Date: Fri Apr 6 12:47:12 2018 +0200 PDFDoc::writeString take const GooString pointer diff --git a/poppler/PDFDoc.cc b/poppler/PDFDoc.cc index 1b3c48e6..e4320607 100644 --- a/poppler/PDFDoc.cc +++ b/poppler/PDFDoc.cc @@ -1185,7 +1185,7 @@ void PDFDoc::writeRawStream (Stream* str, OutStream* outStr) outStr->printf("\r\nendstream\r\n"); } -void PDFDoc::writeString (GooString* s, OutStream* outStr, Guchar *fileKey, +void PDFDoc::writeString (const GooString* s, OutStream* outStr, Guchar *fileKey, CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen) { // Encrypt string if encryption is enabled diff --git a/poppler/PDFDoc.h b/poppler/PDFDoc.h index 412dafab..1678d167 100644 --- a/poppler/PDFDoc.h +++ b/poppler/PDFDoc.h @@ -330,7 +330,7 @@ private: static void writeRawStream (Stream* str, OutStream* outStr); void writeXRefTableTrailer (Goffset uxrefOffset, XRef *uxref, GBool writeAllEntries, int uxrefSize, OutStream* outStr, GBool incrUpdate); - static void writeString (GooString* s, OutStream* outStr, Guchar *fileKey, + static void writeString (const GooString* s, OutStream* outStr, Guchar *fileKey, CryptAlgorithm encAlgorithm, int keyLength, int objNum, int objGen); void saveIncrementalUpdate (OutStream* outStr); void saveCompleteRewrite (OutStream* outStr); commit 853b2251d4e11f14cd891bf1b6095ee36683d161 Author: Albert Astals Cid <[email protected]> Date: Fri Apr 6 12:46:06 2018 +0200 OCDisplayNode take const GooString pointer diff --git a/poppler/OptionalContent.cc b/poppler/OptionalContent.cc index b42ae56f..8bd6baa4 100644 --- a/poppler/OptionalContent.cc +++ b/poppler/OptionalContent.cc @@ -5,7 +5,7 @@ // Copyright 2007 Brad Hards <[email protected]> // Copyright 2008 Pino Toscano <[email protected]> // Copyright 2008, 2010 Carlos Garcia Campos <[email protected]> -// Copyright 2008, 2010, 2011, 2017 Albert Astals Cid <[email protected]> +// Copyright 2008, 2010, 2011, 2017, 2018 Albert Astals Cid <[email protected]> // Copyright 2008 Mark Kaplan <[email protected]> // // Released under the GPL (version 2, or later, at your option) @@ -447,7 +447,7 @@ OCDisplayNode::OCDisplayNode() { children = nullptr; } -OCDisplayNode::OCDisplayNode(GooString *nameA) { +OCDisplayNode::OCDisplayNode(const GooString *nameA) { name = new GooString(nameA); ocg = nullptr; children = nullptr; diff --git a/poppler/OptionalContent.h b/poppler/OptionalContent.h index a8c05b30..a67171df 100644 --- a/poppler/OptionalContent.h +++ b/poppler/OptionalContent.h @@ -134,7 +134,7 @@ public: private: - OCDisplayNode(GooString *nameA); + OCDisplayNode(const GooString *nameA); OCDisplayNode(OptionalContentGroup *ocgA); void addChild(OCDisplayNode *child); void addChildren(GooList *childrenA); commit 0a8311929ba599d7b0a35e83b1f5dec4a3c9da06 Author: Albert Astals Cid <[email protected]> Date: Fri Apr 6 12:44:43 2018 +0200 GfxFont::getNextChar take const char pointer diff --git a/poppler/GfxFont.cc b/poppler/GfxFont.cc index 02fee50c..dbe27ee6 100644 --- a/poppler/GfxFont.cc +++ b/poppler/GfxFont.cc @@ -1554,7 +1554,7 @@ static int parseCharName(char *charName, Unicode *uBuf, int uLen, return 0; } -int Gfx8BitFont::getNextChar(char *s, int len, CharCode *code, +int Gfx8BitFont::getNextChar(const char *s, int len, CharCode *code, Unicode **u, int *uLen, double *dx, double *dy, double *ox, double *oy) const { CharCode c; @@ -2051,7 +2051,7 @@ GfxCIDFont::~GfxCIDFont() { } } -int GfxCIDFont::getNextChar(char *s, int len, CharCode *code, +int GfxCIDFont::getNextChar(const char *s, int len, CharCode *code, Unicode **u, int *uLen, double *dx, double *dy, double *ox, double *oy) const { CID cid; diff --git a/poppler/GfxFont.h b/poppler/GfxFont.h index ef02892b..1ae0608b 100644 --- a/poppler/GfxFont.h +++ b/poppler/GfxFont.h @@ -274,7 +274,7 @@ public: // is the number of entries available in <u>, and <uLen> is set to // the number actually used. Returns the number of bytes used by // the char code. - virtual int getNextChar(char *s, int len, CharCode *code, + virtual int getNextChar(const char *s, int len, CharCode *code, Unicode **u, int *uLen, double *dx, double *dy, double *ox, double *oy) const = 0; @@ -330,7 +330,7 @@ public: Gfx8BitFont(XRef *xref, const char *tagA, Ref idA, GooString *nameA, GfxFontType typeA, Ref embFontIDA, Dict *fontDict); - int getNextChar(char *s, int len, CharCode *code, + int getNextChar(const char *s, int len, CharCode *code, Unicode **u, int *uLen, double *dx, double *dy, double *ox, double *oy) const override; @@ -395,7 +395,7 @@ public: GBool isCIDFont() const override { return gTrue; } - int getNextChar(char *s, int len, CharCode *code, + int getNextChar(const char *s, int len, CharCode *code, Unicode **u, int *uLen, double *dx, double *dy, double *ox, double *oy) const override; commit 0e35441513bdce2471113b937bccb8928c7c9d9f Author: Albert Astals Cid <[email protected]> Date: Fri Apr 6 12:42:29 2018 +0200 FormFieldText::tokenizeDA take const GooString diff --git a/poppler/Form.cc b/poppler/Form.cc index 673b606f..c09ce93c 100644 --- a/poppler/Form.cc +++ b/poppler/Form.cc @@ -1274,7 +1274,7 @@ void FormFieldText::setTextFontSize(int fontSize) } } -int FormFieldText::tokenizeDA(GooString* da, GooList* daToks, const char* searchTok) +int FormFieldText::tokenizeDA(const GooString* da, GooList* daToks, const char* searchTok) { int idx = -1; if(da && daToks) { diff --git a/poppler/Form.h b/poppler/Form.h index c70a4b83..9df6b22e 100644 --- a/poppler/Form.h +++ b/poppler/Form.h @@ -441,7 +441,7 @@ public: void print(int indent = 0); #endif - static int tokenizeDA(GooString* daString, GooList* daToks, const char* searchTok); + static int tokenizeDA(const GooString* daString, GooList* daToks, const char* searchTok); protected: int parseDA(GooList* daToks); commit ba91b95f6e504cce08825e83a567a554ac846e39 Author: Albert Astals Cid <[email protected]> Date: Fri Apr 6 12:41:44 2018 +0200 dateStringToTime take const GooString diff --git a/poppler/DateInfo.cc b/poppler/DateInfo.cc index 532e0070..b2251004 100644 --- a/poppler/DateInfo.cc +++ b/poppler/DateInfo.cc @@ -2,7 +2,7 @@ // // DateInfo.cc // -// Copyright (C) 2008 Albert Astals Cid <[email protected]> +// Copyright (C) 2008, 2018 Albert Astals Cid <[email protected]> // Copyright (C) 2009 Carlos Garcia Campos <[email protected]> // Copyright (C) 2015 André Guerreiro <[email protected]> // Copyright (C) 2015 André Esser <[email protected]> @@ -117,7 +117,7 @@ GooString *timeToDateString(time_t *timet) { } // Convert PDF date string to time. Returns -1 if conversion fails. -time_t dateStringToTime(GooString *dateString) { +time_t dateStringToTime(const GooString *dateString) { int year, mon, day, hour, min, sec, tz_hour, tz_minute; char tz; struct tm tm; diff --git a/poppler/DateInfo.h b/poppler/DateInfo.h index 468dd93b..90570d42 100644 --- a/poppler/DateInfo.h +++ b/poppler/DateInfo.h @@ -2,7 +2,7 @@ // // DateInfo.h // -// Copyright (C) 2008 Albert Astals Cid <[email protected]> +// Copyright (C) 2008, 2018 Albert Astals Cid <[email protected]> // Copyright (C) 2009 Carlos Garcia Campos <[email protected]> // Copyright (C) 2015 André Guerreiro <[email protected]> // Copyright (C) 2015 André Esser <[email protected]> @@ -38,6 +38,6 @@ GooString *timeToDateString(time_t *timet); /* Convert PDF date string to time. * Returns -1 if conversion fails. */ -time_t dateStringToTime(GooString *dateString); +time_t dateStringToTime(const GooString *dateString); #endif commit 9bfe4b43216bce4e702d7d8f61fc7cb9acdbb8f6 Author: Albert Astals Cid <[email protected]> Date: Fri Apr 6 12:40:53 2018 +0200 CMap::getCID take const char diff --git a/poppler/CMap.cc b/poppler/CMap.cc index 45b4502e..01bff352 100644 --- a/poppler/CMap.cc +++ b/poppler/CMap.cc @@ -14,7 +14,7 @@ // under GPL version 2 or later // // Copyright (C) 2008 Koji Otani <[email protected]> -// Copyright (C) 2008, 2009, 2017 Albert Astals Cid <[email protected]> +// Copyright (C) 2008, 2009, 2017, 2018 Albert Astals Cid <[email protected]> // Copyright (C) 2013 Fabio D'Urso <[email protected]> // Copyright (C) 2017 Adrian Johnson <[email protected]> // @@ -478,7 +478,7 @@ GBool CMap::match(GooString *collectionA, GooString *cMapNameA) { return !collection->cmp(collectionA) && !cMapName->cmp(cMapNameA); } -CID CMap::getCID(char *s, int len, CharCode *c, int *nUsed) { +CID CMap::getCID(const char *s, int len, CharCode *c, int *nUsed) { CMapVectorEntry *vec; CharCode cc; int n, i; diff --git a/poppler/CMap.h b/poppler/CMap.h index d1a47e07..eb9893ac 100644 --- a/poppler/CMap.h +++ b/poppler/CMap.h @@ -89,7 +89,7 @@ public: // Return the CID corresponding to the character code starting at // <s>, which contains <len> bytes. Sets *<c> to the char code, and // *<nUsed> to the number of bytes used by the char code. - CID getCID(char *s, int len, CharCode *c, int *nUsed); + CID getCID(const char *s, int len, CharCode *c, int *nUsed); // Return the writing mode (0=horizontal, 1=vertical). int getWMode() { return wMode; } commit 690ea9e5c900268556431df71bdac38f5e74dc36 Author: Albert Astals Cid <[email protected]> Date: Fri Apr 6 12:39:35 2018 +0200 GooString::insert make pointer const diff --git a/goo/GooString.cc b/goo/GooString.cc index 7956372d..0cf32a3a 100644 --- a/goo/GooString.cc +++ b/goo/GooString.cc @@ -740,7 +740,7 @@ GooString *GooString::insert(int i, char c) { return insert(i, (const char*)&c, 1); } -GooString *GooString::insert(int i, GooString *str) { +GooString *GooString::insert(int i, const GooString *str) { return insert(i, str->getCString(), str->getLength()); } diff --git a/goo/GooString.h b/goo/GooString.h index fb060db3..87fd5a85 100644 --- a/goo/GooString.h +++ b/goo/GooString.h @@ -142,7 +142,7 @@ public: // Insert a character or string. GooString *insert(int i, char c); - GooString *insert(int i, GooString *str); + GooString *insert(int i, const GooString *str); GooString *insert(int i, const char *str, int lengthA=CALC_STRING_LEN); // Delete a character or range of characters. _______________________________________________ poppler mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/poppler
