summaryrefslogtreecommitdiff
path: root/sdext/source/pdfimport
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2018-11-20 08:45:38 +0100
committerStephan Bergmann <sbergman@redhat.com>2018-11-20 11:46:14 +0100
commit5e8bdd9203dd642111c62a6668ee665a20d4ba19 (patch)
tree9a71cda81f2e0378a89ff2ff43ded6c6da15700d /sdext/source/pdfimport
parentb0e819bbc0b3ff20de04f31b593f7d5213659045 (diff)
poppler dropped GBool since 0.71
See https://lists.freedesktop.org/archives/libreoffice/2018-November/081410.html Change-Id: I258e08894486a925bed50a3a4232b6e805af6784 Reviewed-on: https://gerrit.libreoffice.org/63625 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'sdext/source/pdfimport')
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx21
-rw-r--r--sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx35
2 files changed, 31 insertions, 25 deletions
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 575a90acb094..ab74b36b4595 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -514,7 +514,7 @@ void PDFOutDev::printPath( GfxPath* pPath )
PDFOutDev::PDFOutDev( PDFDoc* pDoc ) :
m_pDoc( pDoc ),
m_aFontMap(),
- m_pUtf8Map( new UnicodeMap("UTF-8", gTrue, &mapUTF8) ),
+ m_pUtf8Map( new UnicodeMap("UTF-8", true, &mapUTF8) ),
m_bSkipImages(false)
{
}
@@ -939,9 +939,9 @@ void PDFOutDev::endTextObject(GfxState*)
}
void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str,
- int width, int height, GBool invert,
- GBool /*interpolate*/,
- GBool /*inlineImg*/ )
+ int width, int height, poppler_bool invert,
+ poppler_bool /*interpolate*/,
+ poppler_bool /*inlineImg*/ )
{
if (m_bSkipImages)
return;
@@ -969,8 +969,8 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str,
void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
int width, int height, GfxImageColorMap* colorMap,
- GBool /*interpolate*/,
- int* maskColors, GBool /*inlineImg*/ )
+ poppler_bool /*interpolate*/,
+ int* maskColors, poppler_bool /*inlineImg*/ )
{
if (m_bSkipImages)
return;
@@ -1018,11 +1018,10 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
void PDFOutDev::drawMaskedImage(GfxState*, Object*, Stream* str,
int width, int height,
GfxImageColorMap* colorMap,
- GBool /*interpolate*/,
+ poppler_bool /*interpolate*/,
Stream* maskStr,
int maskWidth, int maskHeight,
- GBool maskInvert
- , GBool /*maskInterpolate*/
+ poppler_bool maskInvert, poppler_bool /*maskInterpolate*/
)
{
if (m_bSkipImages)
@@ -1036,11 +1035,11 @@ void PDFOutDev::drawMaskedImage(GfxState*, Object*, Stream* str,
void PDFOutDev::drawSoftMaskedImage(GfxState*, Object*, Stream* str,
int width, int height,
GfxImageColorMap* colorMap,
- GBool /*interpolate*/,
+ poppler_bool /*interpolate*/,
Stream* maskStr,
int maskWidth, int maskHeight,
GfxImageColorMap* maskColorMap
- , GBool /*maskInterpolate*/
+ , poppler_bool /*maskInterpolate*/
)
{
if (m_bSkipImages)
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index da021a2a039b..a6135fac4d7f 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -130,6 +130,13 @@ namespace pdfi
{ return const_cast<GooString &>(familyName); }
};
+ // Versions before 0.15 defined GBool as int; 0.15 redefined it as bool; 0.71 dropped GBool
+#if POPPLER_VERSION_MAJOR == 0 && POPPLER_VERSION_MINOR < 71
+ typedef GBool poppler_bool;
+#else
+ typedef bool poppler_bool;
+#endif
+
class PDFOutDev : public OutputDev
{
// not owned by this class
@@ -151,17 +158,17 @@ namespace pdfi
// Does this device use upside-down coordinates?
// (Upside-down means (0,0) is the top left corner of the page.)
- virtual GBool upsideDown() override { return gTrue; }
+ virtual poppler_bool upsideDown() override { return true; }
// Does this device use drawChar() or drawString()?
- virtual GBool useDrawChar() override { return gTrue; }
+ virtual poppler_bool useDrawChar() override { return true; }
// Does this device use beginType3Char/endType3Char? Otherwise,
// text in Type 3 fonts will be drawn with drawChar/drawString.
- virtual GBool interpretType3Chars() override { return gFalse; }
+ virtual poppler_bool interpretType3Chars() override { return false; }
// Does this device need non-text content?
- virtual GBool needNonText() override { return gTrue; }
+ virtual poppler_bool needNonText() override { return true; }
//----- initialization and control
@@ -233,29 +240,29 @@ namespace pdfi
//----- image drawing
virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
- int width, int height, GBool invert,
- GBool interpolate,
- GBool inlineImg) override;
+ int width, int height, poppler_bool invert,
+ poppler_bool interpolate,
+ poppler_bool inlineImg) override;
virtual void drawImage(GfxState *state, Object *ref, Stream *str,
int width, int height, GfxImageColorMap *colorMap,
- GBool interpolate,
- int *maskColors, GBool inlineImg) override;
+ poppler_bool interpolate,
+ int* maskColors, poppler_bool inlineImg) override;
virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
- GBool interpolate,
+ poppler_bool interpolate,
Stream *maskStr, int maskWidth, int maskHeight,
- GBool maskInvert
- , GBool maskInterpolate
+ poppler_bool maskInvert,
+ poppler_bool maskInterpolate
) override;
virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
- GBool interpolate,
+ poppler_bool interpolate,
Stream *maskStr,
int maskWidth, int maskHeight,
GfxImageColorMap *maskColorMap
- , GBool maskInterpolate
+ , poppler_bool maskInterpolate
) override;
static void setPageNum( int nNumPages );