Changeset View
Changeset View
Standalone View
Standalone View
editors/libreoffice/files/patch-archgit_poppler-0.70.patch
From 557ee0a0f4e40b934c72515f41f3a605803ddb1d Mon Sep 17 00:00:00 2001 | --- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx.orig 2018-10-30 16:55:21 UTC | ||||
From: Evangelos Foutras <evangelos@foutrelis.com> | +++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | ||||
Date: Wed, 24 Oct 2018 17:48:53 +0300 | @@ -528,7 +528,7 @@ void PDFOutDev::printPath( GfxPath* pPath ) | ||||
Subject: [PATCH] fix build with poppler 0.70 | 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) | |||||
{ | |||||
} | |||||
@@ -569,7 +569,7 @@ void PDFOutDev::processLink(Link* link, Catalog*) | |||||
LinkAction* pAction = link->getAction(); | |||||
if (pAction && pAction->getKind() == actionURI) | |||||
{ | |||||
- const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString(); | |||||
+ const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->c_str(); | |||||
--- | std::vector<char> aEsc( lcl_escapeLineFeeds(pURI) ); | ||||
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 ++++ | |||||
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 4 ++++ | |||||
2 files changed, 8 insertions(+) | |||||
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | @@ -592,7 +592,7 @@ void PDFOutDev::restoreState(GfxState*) | ||||
index 575a90acb..99219f7e6 100644 | |||||
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | |||||
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | |||||
@@ -578,7 +578,11 @@ void PDFOutDev::restoreState(GfxState*) | |||||
printf( "restoreState\n" ); | printf( "restoreState\n" ); | ||||
} | } | ||||
+#if POPPLER_CHECK_VERSION(0, 70, 0) | -void PDFOutDev::setDefaultCTM(double *pMat) | ||||
+void PDFOutDev::setDefaultCTM(const double *pMat) | +void PDFOutDev::setDefaultCTM(const double *pMat) | ||||
+#else | |||||
void PDFOutDev::setDefaultCTM(double *pMat) | |||||
+#endif | |||||
{ | { | ||||
assert(pMat); | assert(pMat); | ||||
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | @@ -767,7 +767,7 @@ void PDFOutDev::updateFont(GfxState *state) | ||||
index da021a2a0..27440f2bb 100644 | |||||
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | aFont = it->second; | ||||
- std::vector<char> aEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) ); | |||||
+ std::vector<char> aEsc( lcl_escapeLineFeeds(aFont.familyName.c_str()) ); | |||||
printf( " %d %d %d %d %f %d %s", | |||||
aFont.isEmbedded, | |||||
aFont.isBold, | |||||
@@ -953,11 +953,11 @@ void PDFOutDev::endTextObject(GfxState*) | |||||
} | |||||
void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str, | |||||
- int width, int height, GBool invert, | |||||
+ int width, int height, bool invert, | |||||
#if POPPLER_CHECK_VERSION(0, 12, 0) | |||||
- GBool /*interpolate*/, | |||||
+ bool /*interpolate*/, | |||||
#endif | |||||
- GBool /*inlineImg*/ ) | |||||
+ bool /*inlineImg*/ ) | |||||
{ | |||||
if (m_bSkipImages) | |||||
return; | |||||
@@ -986,9 +986,9 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object | |||||
void PDFOutDev::drawImage(GfxState*, Object*, Stream* str, | |||||
int width, int height, GfxImageColorMap* colorMap, | |||||
#if POPPLER_CHECK_VERSION(0, 12, 0) | |||||
- GBool /*interpolate*/, | |||||
+ bool /*interpolate*/, | |||||
#endif | |||||
- int* maskColors, GBool /*inlineImg*/ ) | |||||
+ int* maskColors, bool /*inlineImg*/ ) | |||||
{ | |||||
if (m_bSkipImages) | |||||
return; | |||||
@@ -1037,13 +1037,13 @@ void PDFOutDev::drawMaskedImage(GfxState*, Object*, St | |||||
int width, int height, | |||||
GfxImageColorMap* colorMap, | |||||
#if POPPLER_CHECK_VERSION(0, 12, 0) | |||||
- GBool /*interpolate*/, | |||||
+ bool /*interpolate*/, | |||||
#endif | |||||
Stream* maskStr, | |||||
int maskWidth, int maskHeight, | |||||
- GBool maskInvert | |||||
+ bool maskInvert | |||||
#if POPPLER_CHECK_VERSION(0, 12, 0) | |||||
- , GBool /*maskInterpolate*/ | |||||
+ , bool /*maskInterpolate*/ | |||||
#endif | |||||
) | |||||
{ | |||||
@@ -1059,13 +1059,13 @@ void PDFOutDev::drawSoftMaskedImage(GfxState*, Object* | |||||
int width, int height, | |||||
GfxImageColorMap* colorMap, | |||||
#if POPPLER_CHECK_VERSION(0, 12, 0) | |||||
- GBool /*interpolate*/, | |||||
+ bool /*interpolate*/, | |||||
#endif | |||||
Stream* maskStr, | |||||
int maskWidth, int maskHeight, | |||||
GfxImageColorMap* maskColorMap | |||||
#if POPPLER_CHECK_VERSION(0, 12, 0) | |||||
- , GBool /*maskInterpolate*/ | |||||
+ , bool /*maskInterpolate*/ | |||||
#endif | |||||
) | |||||
{ | |||||
--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx.orig 2018-10-30 16:55:21 UTC | |||||
+++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | +++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | ||||
@@ -166,7 +166,11 @@ namespace pdfi | @@ -150,22 +150,22 @@ 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 bool upsideDown() override { return true; } | |||||
// Does this device use drawChar() or drawString()? | |||||
- virtual GBool useDrawChar() override { return gTrue; } | |||||
+ virtual 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 bool interpretType3Chars() override { return false; } | |||||
// Does this device need non-text content? | |||||
- virtual GBool needNonText() override { return gTrue; } | |||||
+ virtual bool needNonText() override { return true; } | |||||
//----- initialization and control | //----- initialization and control | ||||
// Set default transform matrix. | // Set default transform matrix. | ||||
+#if POPPLER_CHECK_VERSION(0, 70, 0) | - virtual void setDefaultCTM(double *ctm) override; | ||||
+ virtual void setDefaultCTM(const double *ctm) override; | + virtual void setDefaultCTM(const double *ctm) override; | ||||
+#else | |||||
virtual void setDefaultCTM(double *ctm) override; | |||||
+#endif | |||||
// Start a page. | // Start a page. | ||||
virtual void startPage(int pageNum, GfxState *state | virtual void startPage(int pageNum, GfxState *state | ||||
-- | @@ -232,40 +232,40 @@ namespace pdfi | ||||
2.19.1 | |||||
//----- image drawing | |||||
virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, | |||||
- int width, int height, GBool invert, | |||||
+ int width, int height, bool invert, | |||||
#if POPPLER_CHECK_VERSION(0, 12, 0) | |||||
- GBool interpolate, | |||||
+ bool interpolate, | |||||
#endif | |||||
- GBool inlineImg) override; | |||||
+ 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, | |||||
+ bool interpolate, | |||||
#endif | |||||
- int *maskColors, GBool inlineImg) override; | |||||
+ int *maskColors, 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, | |||||
+ bool interpolate, | |||||
#endif | |||||
Stream *maskStr, int maskWidth, int maskHeight, | |||||
- GBool maskInvert | |||||
+ bool maskInvert | |||||
#if POPPLER_CHECK_VERSION(0, 12, 0) | |||||
- , GBool maskInterpolate | |||||
+ , 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, | |||||
+ bool interpolate, | |||||
#endif | |||||
Stream *maskStr, | |||||
int maskWidth, int maskHeight, | |||||
GfxImageColorMap *maskColorMap | |||||
#if POPPLER_CHECK_VERSION(0, 12, 0) | |||||
- , GBool maskInterpolate | |||||
+ , bool maskInterpolate | |||||
#endif | |||||
) override; | |||||