rename text member to textPage
reflects better what it is and fixes several shadow warnings
diff --git a/poppler/CairoOutputDev.cc b/poppler/CairoOutputDev.cc
index d2769a2..09b81b0 100644
--- a/poppler/CairoOutputDev.cc
+++ b/poppler/CairoOutputDev.cc
@@ -161,7 +161,7 @@
cairo_shape = nullptr;
knockoutCount = 0;
- text = nullptr;
+ textPage = nullptr;
actualText = nullptr;
// the SA parameter supposedly defaults to false, but Acrobat
@@ -187,8 +187,8 @@
cairo_pattern_destroy (mask);
if (shape)
cairo_pattern_destroy (shape);
- if (text)
- text->decRefCnt();
+ if (textPage)
+ textPage->decRefCnt();
if (actualText)
delete actualText;
}
@@ -217,16 +217,16 @@
void CairoOutputDev::setTextPage(TextPage *text)
{
- if (this->text)
- this->text->decRefCnt();
+ if (textPage)
+ textPage->decRefCnt();
if (actualText)
delete actualText;
if (text) {
- this->text = text;
- this->text->incRefCnt();
+ textPage = text;
+ textPage->incRefCnt();
actualText = new ActualText(text);
} else {
- this->text = nullptr;
+ textPage = nullptr;
actualText = nullptr;
}
}
@@ -276,17 +276,17 @@
stroke_pattern = cairo_pattern_reference(fill_pattern);
stroke_color.r = stroke_color.g = stroke_color.b = 0;
- if (text)
- text->startPage(state);
+ if (textPage)
+ textPage->startPage(state);
if (xrefA != nullptr) {
xref = xrefA;
}
}
void CairoOutputDev::endPage() {
- if (text) {
- text->endPage();
- text->coalesce(true, 0, false);
+ if (textPage) {
+ textPage->endPage();
+ textPage->coalesce(true, 0, false);
}
}
@@ -354,8 +354,8 @@
updateStrokeOpacity(state);
updateBlendMode(state);
needFontUpdate = true;
- if (text)
- text->updateFont(state);
+ if (textPage)
+ textPage->updateFont(state);
}
void CairoOutputDev::setDefaultCTM(const double *ctm) {
@@ -659,8 +659,8 @@
needFontUpdate = false;
//FIXME: use cairo font engine?
- if (text)
- text->updateFont(state);
+ if (textPage)
+ textPage->updateFont(state);
currentFont = fontEngine->getFont (state->getFont(), doc, printing, xref);
@@ -1423,7 +1423,7 @@
}
}
- if (!text)
+ if (!textPage)
return;
actualText->addChar (state, x, y, dx, dy, code, nBytes, u, uLen);
}
@@ -1580,13 +1580,13 @@
void CairoOutputDev::beginActualText(GfxState *state, const GooString *text)
{
- if (this->text)
+ if (textPage)
actualText->begin(state, text);
}
void CairoOutputDev::endActualText(GfxState *state)
{
- if (text)
+ if (textPage)
actualText->end(state);
}
diff --git a/poppler/CairoOutputDev.h b/poppler/CairoOutputDev.h
index b59a9e2..0fbbf0d 100644
--- a/poppler/CairoOutputDev.h
+++ b/poppler/CairoOutputDev.h
@@ -23,7 +23,7 @@
// Copyright (C) 2010-2013 Thomas Freitag <Thomas.Freitag@alfa.de>
// Copyright (C) 2015 Suzuki Toshiya <mpsuzuki@hiroshima-u.ac.jp>
// Copyright (C) 2016 Jason Crain <jason@aquaticape.us>
-// Copyright (C) 2018 Albert Astals Cid <aacid@kde.org>
+// Copyright (C) 2018, 2019 Albert Astals Cid <aacid@kde.org>
// Copyright (C) 2018 Klarälvdalens Datakonsult AB, a KDAB Group company, <info@kdab.com>. Work sponsored by the LiMux project of the city of Munich
//
// To see a description of the changes please see the Changelog file that
@@ -347,7 +347,7 @@
cairo_antialias_t antialias;
bool prescaleImages;
- TextPage *text; // text for the current page
+ TextPage *textPage; // text for the current page
ActualText *actualText;
cairo_pattern_t *group;