[poppler] 3 commits - poppler/PSOutputDev.cc
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jun 5 18:32:02 UTC 2019
poppler/PSOutputDev.cc | 20 ++++++++++----------
1 file changed, 10 insertions(+), 10 deletions(-)
New commits:
commit 61611e9d1db881fdeec730671d092a5144e51533
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Jun 5 20:22:02 2019 +0200
PSOutputDev: Move variable declaration inside loop
fixes shadow warning
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index f0ee4df2..73f2fb18 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -1324,11 +1324,11 @@ void PSOutputDev::postInit()
} else {
paperMatch = false;
}
- Page *page;
+
paperSizes = new std::vector<PSOutPaperSize*>();
for (size_t pgi = 0; pgi < pages.size(); ++pgi) {
const int pg = pages[pgi];
- page = catalog->getPage(pg);
+ Page *page = catalog->getPage(pg);
if (page == nullptr)
paperMatch = false;
if (!paperMatch) {
commit 0eb72dbf3f8f8981b67c6641aca6844bf255ef15
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Jun 5 20:19:41 2019 +0200
PSOuputDev: Rename rotate local variable to pageRotate
fixes shadow warning
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index f4d5675f..f0ee4df2 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -1349,8 +1349,8 @@ void PSOutputDev::postInit()
h = (int)ceil(page->getCropHeight());
}
if (paperMatch) {
- int rotate = page->getRotate();
- if (rotate == 90 || rotate == 270)
+ const int pageRotate = page->getRotate();
+ if (pageRotate == 90 || pageRotate == 270)
std::swap(w, h);
}
if (w > paperWidth)
commit 6831a1ebdc0f3a2d00d64cb979cfe5eccce5da5f
Author: Albert Astals Cid <aacid at kde.org>
Date: Wed Jun 5 20:16:18 2019 +0200
PSOutputDev: rename variables to make things less confusing
fixes shadow warnings
diff --git a/poppler/PSOutputDev.cc b/poppler/PSOutputDev.cc
index 0d201835..f4d5675f 100644
--- a/poppler/PSOutputDev.cc
+++ b/poppler/PSOutputDev.cc
@@ -1081,9 +1081,9 @@ static void outputToFile(void *stream, const char *data, int len) {
fwrite(data, 1, len, (FILE *)stream);
}
-PSOutputDev::PSOutputDev(const char *fileName, PDFDoc *doc,
+PSOutputDev::PSOutputDev(const char *fileName, PDFDoc *docA,
char *psTitleA,
- const std::vector<int> &pages, PSOutMode modeA,
+ const std::vector<int> &pagesA, PSOutMode modeA,
int paperWidthA, int paperHeightA,
bool noCropA, bool duplexA,
int imgLLXA, int imgLLYA, int imgURXA, int imgURYA,
@@ -1145,15 +1145,15 @@ PSOutputDev::PSOutputDev(const char *fileName, PDFDoc *doc,
}
init(outputToFile, f, fileTypeA, psTitleA,
- doc, pages, modeA,
+ docA, pagesA, modeA,
imgLLXA, imgLLYA, imgURXA, imgURYA, manualCtrlA,
paperWidthA, paperHeightA, noCropA, duplexA);
}
PSOutputDev::PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA,
char *psTitleA,
- PDFDoc *doc,
- const std::vector<int> &pages, PSOutMode modeA,
+ PDFDoc *docA,
+ const std::vector<int> &pagesA, PSOutMode modeA,
int paperWidthA, int paperHeightA,
bool noCropA, bool duplexA,
int imgLLXA, int imgLLYA, int imgURXA, int imgURYA,
@@ -1183,7 +1183,7 @@ PSOutputDev::PSOutputDev(PSOutputFunc outputFuncA, void *outputStreamA,
psTitle = nullptr;
init(outputFuncA, outputStreamA, psGeneric, psTitleA,
- doc, pages, modeA,
+ docA, pagesA, modeA,
imgLLXA, imgLLYA, imgURXA, imgURYA, manualCtrlA,
paperWidthA, paperHeightA, noCropA, duplexA);
}
More information about the poppler
mailing list