diff options
author | Albert Astals Cid <aacid@kde.org> | 2021-02-20 22:25:06 +0100 |
---|---|---|
committer | Albert Astals Cid <aacid@kde.org> | 2021-02-20 22:25:06 +0100 |
commit | 3746704a810fc9a67a91444da300e0683d452e6d (patch) | |
tree | 818baf41d15e44a9936f9fa80bdf3e9f4481fc92 | |
parent | a622a5a88242fc99c3ce37879337b980458fc4e6 (diff) |
Gfx: Make clear neither printCommands nor profileCommands change
-rw-r--r-- | poppler/Gfx.cc | 6 | ||||
-rw-r--r-- | poppler/Gfx.h | 4 |
2 files changed, 4 insertions, 6 deletions
diff --git a/poppler/Gfx.cc b/poppler/Gfx.cc index cbdd5feb..0cd7875d 100644 --- a/poppler/Gfx.cc +++ b/poppler/Gfx.cc @@ -453,6 +453,7 @@ Object GfxResources::lookupGStateNF(const char *name) //------------------------------------------------------------------------ Gfx::Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict, double hDPI, double vDPI, const PDFRectangle *box, const PDFRectangle *cropBox, int rotate, bool (*abortCheckCbkA)(void *data), void *abortCheckCbkDataA, XRef *xrefA) + : printCommands(globalParams->getPrintCommands()), profileCommands(globalParams->getProfileCommands()) { int i; @@ -460,8 +461,6 @@ Gfx::Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict, double hDPI, xref = (xrefA == nullptr) ? doc->getXRef() : xrefA; catalog = doc->getCatalog(); subPage = false; - printCommands = globalParams->getPrintCommands(); - profileCommands = globalParams->getProfileCommands(); mcStack = nullptr; parser = nullptr; @@ -506,6 +505,7 @@ Gfx::Gfx(PDFDoc *docA, OutputDev *outA, int pageNum, Dict *resDict, double hDPI, } Gfx::Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict, const PDFRectangle *box, const PDFRectangle *cropBox, bool (*abortCheckCbkA)(void *data), void *abortCheckCbkDataA, Gfx *gfxA) + : printCommands(globalParams->getPrintCommands()), profileCommands(globalParams->getProfileCommands()) { int i; @@ -519,8 +519,6 @@ Gfx::Gfx(PDFDoc *docA, OutputDev *outA, Dict *resDict, const PDFRectangle *box, } catalog = doc->getCatalog(); subPage = true; - printCommands = globalParams->getPrintCommands(); - profileCommands = globalParams->getProfileCommands(); mcStack = nullptr; parser = nullptr; diff --git a/poppler/Gfx.h b/poppler/Gfx.h index 3539bd69..1e5955f5 100644 --- a/poppler/Gfx.h +++ b/poppler/Gfx.h @@ -203,8 +203,8 @@ private: Catalog *catalog; // the Catalog for this PDF file OutputDev *out; // output device bool subPage; // is this a sub-page object? - bool printCommands; // print the drawing commands (for debugging) - bool profileCommands; // profile the drawing commands (for debugging) + const bool printCommands; // print the drawing commands (for debugging) + const bool profileCommands; // profile the drawing commands (for debugging) bool commandAborted; // did the previous command abort the drawing? GfxResources *res; // resource stack int updateLevel; |