mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-08 22:45:43 +00:00
271 lines
12 KiB
Diff
271 lines
12 KiB
Diff
From c85bd2c443b9a509b028a90ee9e766929e63089f Mon Sep 17 00:00:00 2001
|
|
From: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Date: Tue, 20 Nov 2018 08:45:38 +0100
|
|
Subject: poppler dropped GBool since 0.71
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
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>
|
|
(cherry picked from commit 5e8bdd9203dd642111c62a6668ee665a20d4ba19)
|
|
Reviewed-on: https://gerrit.libreoffice.org/66374
|
|
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
---
|
|
.../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 22 +++++++-------
|
|
.../pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 35 +++++++++++++---------
|
|
2 files changed, 32 insertions(+), 25 deletions(-)
|
|
|
|
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
|
index 06e4fae..6e4bf8a 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,11 +939,11 @@ void PDFOutDev::endTextObject(GfxState*)
|
|
}
|
|
|
|
void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str,
|
|
- int width, int height, GBool invert,
|
|
+ int width, int height, poppler_bool invert,
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- GBool /*interpolate*/,
|
|
+ poppler_bool /*interpolate*/,
|
|
#endif
|
|
- GBool /*inlineImg*/ )
|
|
+ poppler_bool /*inlineImg*/ )
|
|
{
|
|
if (m_bSkipImages)
|
|
return;
|
|
@@ -972,9 +972,9 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str,
|
|
void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
|
|
int width, int height, GfxImageColorMap* colorMap,
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- GBool /*interpolate*/,
|
|
+ poppler_bool /*interpolate*/,
|
|
#endif
|
|
- int* maskColors, GBool /*inlineImg*/ )
|
|
+ int* maskColors, poppler_bool /*inlineImg*/ )
|
|
{
|
|
if (m_bSkipImages)
|
|
return;
|
|
@@ -1023,13 +1023,13 @@ void PDFOutDev::drawMaskedImage(GfxState*, Object*, Stream* str,
|
|
int width, int height,
|
|
GfxImageColorMap* colorMap,
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- GBool /*interpolate*/,
|
|
+ poppler_bool /*interpolate*/,
|
|
#endif
|
|
Stream* maskStr,
|
|
int maskWidth, int maskHeight,
|
|
- GBool maskInvert
|
|
+ poppler_bool maskInvert
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- , GBool /*maskInterpolate*/
|
|
+ , poppler_bool /*maskInterpolate*/
|
|
#endif
|
|
)
|
|
{
|
|
@@ -1045,13 +1045,13 @@ void PDFOutDev::drawSoftMaskedImage(GfxState*, Object*, Stream* str,
|
|
int width, int height,
|
|
GfxImageColorMap* colorMap,
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- GBool /*interpolate*/,
|
|
+ poppler_bool /*interpolate*/,
|
|
#endif
|
|
Stream* maskStr,
|
|
int maskWidth, int maskHeight,
|
|
GfxImageColorMap* maskColorMap
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- , GBool /*maskInterpolate*/
|
|
+ , poppler_bool /*maskInterpolate*/
|
|
#endif
|
|
)
|
|
{
|
|
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
|
index 7e65f08..88b8837 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,40 +240,40 @@ namespace pdfi
|
|
|
|
//----- image drawing
|
|
virtual void drawImageMask(GfxState *state, Object *ref, Stream *str,
|
|
- int width, int height, GBool invert,
|
|
+ int width, int height, poppler_bool invert,
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- GBool interpolate,
|
|
+ poppler_bool interpolate,
|
|
#endif
|
|
- GBool inlineImg) override;
|
|
+ poppler_bool inlineImg) override;
|
|
virtual void drawImage(GfxState *state, Object *ref, Stream *str,
|
|
int width, int height, GfxImageColorMap *colorMap,
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- GBool interpolate,
|
|
+ poppler_bool interpolate,
|
|
#endif
|
|
- int *maskColors, GBool inlineImg) override;
|
|
+ int *maskColors, poppler_bool inlineImg) override;
|
|
virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
|
|
int width, int height,
|
|
GfxImageColorMap *colorMap,
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- GBool interpolate,
|
|
+ poppler_bool interpolate,
|
|
#endif
|
|
Stream *maskStr, int maskWidth, int maskHeight,
|
|
- GBool maskInvert
|
|
+ poppler_bool maskInvert
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- , GBool maskInterpolate
|
|
+ , poppler_bool maskInterpolate
|
|
#endif
|
|
) override;
|
|
virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
|
|
int width, int height,
|
|
GfxImageColorMap *colorMap,
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- GBool interpolate,
|
|
+ poppler_bool interpolate,
|
|
#endif
|
|
Stream *maskStr,
|
|
int maskWidth, int maskHeight,
|
|
GfxImageColorMap *maskColorMap
|
|
#if POPPLER_CHECK_VERSION(0, 12, 0)
|
|
- , GBool maskInterpolate
|
|
+ , poppler_bool maskInterpolate
|
|
#endif
|
|
) override;
|
|
|
|
--
|
|
cgit v1.1
|
|
|
|
From 704ff8be10ecfb39be064bd08b2f9c11312e3428 Mon Sep 17 00:00:00 2001
|
|
From: Aleksei Nikiforov <darktemplar@basealt.ru>
|
|
Date: Thu, 22 Nov 2018 17:54:00 +0300
|
|
Subject: Fix build with poppler 0.71
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Change-Id: I470ece9dc4766e10e1ccb5e99b25a8d8cc4cbf38
|
|
Reviewed-on: https://gerrit.libreoffice.org/63860
|
|
Tested-by: Jenkins
|
|
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
(cherry picked from commit 8ff41a26caf51544699863c89598d37d93dc1b21)
|
|
Reviewed-on: https://gerrit.libreoffice.org/66375
|
|
Reviewed-by: Aleksei Nikiforov <darktemplar@basealt.ru>
|
|
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
|
|
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
---
|
|
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 ++++
|
|
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++
|
|
sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx | 4 ++--
|
|
3 files changed, 10 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
|
index 6e4bf8a..df0288d 100644
|
|
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
|
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
|
@@ -578,7 +578,11 @@ void PDFOutDev::restoreState(GfxState*)
|
|
printf( "restoreState\n" );
|
|
}
|
|
|
|
+#if POPPLER_CHECK_VERSION(0, 71, 0)
|
|
+void PDFOutDev::setDefaultCTM(const double *pMat)
|
|
+#else
|
|
void PDFOutDev::setDefaultCTM(double *pMat)
|
|
+#endif
|
|
{
|
|
assert(pMat);
|
|
|
|
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
|
index 88b8837..37a03bc 100644
|
|
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
|
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
|
@@ -173,7 +173,11 @@ namespace pdfi
|
|
//----- initialization and control
|
|
|
|
// Set default transform matrix.
|
|
+#if POPPLER_CHECK_VERSION(0, 71, 0)
|
|
+ virtual void setDefaultCTM(const double *ctm) override;
|
|
+#else
|
|
virtual void setDefaultCTM(double *ctm) override;
|
|
+#endif
|
|
|
|
// Start a page.
|
|
virtual void startPage(int pageNum, GfxState *state
|
|
diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
|
|
index b536a71..f2049a6 100644
|
|
--- a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
|
|
+++ b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx
|
|
@@ -69,7 +69,7 @@ int main(int argc, char **argv)
|
|
|
|
// read config file
|
|
globalParams = new GlobalParams();
|
|
- globalParams->setErrQuiet(gTrue);
|
|
+ globalParams->setErrQuiet(true);
|
|
#if defined(_MSC_VER)
|
|
globalParams->setupBaseFonts(nullptr);
|
|
#endif
|
|
@@ -145,7 +145,7 @@ int main(int argc, char **argv)
|
|
i,
|
|
PDFI_OUTDEV_RESOLUTION,
|
|
PDFI_OUTDEV_RESOLUTION,
|
|
- 0, gTrue, gTrue, gTrue);
|
|
+ 0, true, true, true);
|
|
rDoc.processLinks(&aOutDev, i);
|
|
}
|
|
|
|
--
|
|
cgit v1.1
|
|
|