libreoffice: fix build with poppler 0.75.0
Signed-off-by: Andreas Müller <schnitzeltony@gmail.com>
This commit is contained in:
@@ -15,6 +15,8 @@ SRC_URI += " \
|
||||
file://0009-avoid-downloading-by-git-submodules.patch \
|
||||
file://0010-Fix-build-with-poppler-0.62.0.patch \
|
||||
file://0011-pdfioutdev_gpl-Fix-build-with-poppler-0.70.0.patch \
|
||||
file://0012-Fix-build-with-poppler-0.72.patch \
|
||||
file://0013-sdext-fix-build-with-poppler-0.73.patch \
|
||||
"
|
||||
|
||||
SRC_URI[translations.md5sum] = "644f33f2bc84fe9ffd8a4c09b41a36fc"
|
||||
|
||||
@@ -0,0 +1,46 @@
|
||||
From 65a6c9ae4791188ffcecf489073cf38873ce5e17 Mon Sep 17 00:00:00 2001
|
||||
From: Andreas Sturmlechner <asturm@gentoo.org>
|
||||
Date: Tue, 8 Jan 2019 11:24:40 +0100
|
||||
Subject: [PATCH] Fix build with poppler-0.72
|
||||
|
||||
Change-Id: I0664d1b39e97b7555c0a3cba442db52b84f37134
|
||||
Reviewed-on: https://gerrit.libreoffice.org/65960
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
||||
|
||||
Upstream-Status: Backport
|
||||
---
|
||||
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
index 34d73bc..32bf5b5 100644
|
||||
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
@@ -580,7 +580,11 @@ void PDFOutDev::processLink(Link* link, Catalog*)
|
||||
LinkAction* pAction = link->getAction();
|
||||
if (pAction && pAction->getKind() == actionURI)
|
||||
{
|
||||
+#if POPPLER_CHECK_VERSION(0, 72, 0)
|
||||
+ const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->c_str();
|
||||
+#else
|
||||
const char* pURI = static_cast<LinkURI*>(pAction)->getURI()->getCString();
|
||||
+#endif
|
||||
|
||||
boost::shared_array<char> pEsc( lcl_escapeLineFeeds(pURI) );
|
||||
|
||||
@@ -786,7 +786,11 @@ void PDFOutDev::updateFont(GfxState *state)
|
||||
|
||||
aFont = it->second;
|
||||
|
||||
+#if POPPLER_CHECK_VERSION(0, 72, 0)
|
||||
+ boost::shared_array<char> pEsc( lcl_escapeLineFeeds(aFont.familyName.c_str()) );
|
||||
+#else
|
||||
boost::shared_array<char> pEsc( lcl_escapeLineFeeds(aFont.familyName.getCString()) );
|
||||
+#endif
|
||||
printf( " %d %d %d %d %f %d %s",
|
||||
aFont.isEmbedded,
|
||||
aFont.isBold,
|
||||
--
|
||||
2.20.1
|
||||
|
||||
@@ -0,0 +1,94 @@
|
||||
From 50d371ae08c66648d9f32f633b2245e1746e2bb6 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Stahl <Michael.Stahl@cib.de>
|
||||
Date: Mon, 14 Jan 2019 15:08:42 +0100
|
||||
Subject: [PATCH] sdext: fix build with poppler 0.73
|
||||
|
||||
... which has removed Guchar, Gushort, Guint, Gulong...
|
||||
|
||||
Change-Id: Ia54ad378031f167f6779f6ffe574b85c1e72f26d
|
||||
Reviewed-on: https://gerrit.libreoffice.org/66305
|
||||
Tested-by: Jenkins
|
||||
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
|
||||
|
||||
Upstream-Status: Backport
|
||||
---
|
||||
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 4 ++--
|
||||
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 6 +++++-
|
||||
sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx | 6 +++---
|
||||
3 files changed, 10 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
index 32bf5b5..7254174 100644
|
||||
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
|
||||
@@ -310,7 +310,7 @@ void writePpm_( OutputBuffer& o_rOutputBuf,
|
||||
o_rOutputBuf.resize(header_size);
|
||||
|
||||
// initialize stream
|
||||
- Guchar *p;
|
||||
+ unsigned char *p;
|
||||
GfxRGB rgb;
|
||||
ImageStream* imgStr =
|
||||
new ImageStream(str,
|
||||
@@ -423,7 +423,7 @@ void writeImage_( OutputBuffer& o_rOutputBuf,
|
||||
oneColor = { byteToCol( 0xff ), byteToCol( 0xff ), byteToCol( 0xff ) };
|
||||
if( colorMap->getColorSpace()->getMode() == csIndexed || colorMap->getColorSpace()->getMode() == csDeviceGray )
|
||||
{
|
||||
- Guchar nIndex = 0;
|
||||
+ unsigned char nIndex = 0;
|
||||
colorMap->getRGB( &nIndex, &zeroColor );
|
||||
nIndex = 1;
|
||||
colorMap->getRGB( &nIndex, &oneColor );
|
||||
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
||||
index b6d97bb..e658030 100644
|
||||
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
||||
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
|
||||
@@ -296,9 +296,13 @@ extern FILE* g_binary_out;
|
||||
|
||||
// note: if you ever hcange Output_t, please keep in mind that the current code
|
||||
// relies on it being of 8 bit size
|
||||
-typedef Guchar Output_t;
|
||||
+typedef unsigned char Output_t;
|
||||
typedef std::vector< Output_t > OutputBuffer;
|
||||
|
||||
+#if !POPPLER_CHECK_VERSION(0, 73, 0)
|
||||
+static_assert(std::is_same_v<Guchar, unsigned char>, "unexpected typedef");
|
||||
+#endif
|
||||
+
|
||||
#endif // INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
|
||||
index 37ec3b9..66c7a69 100644
|
||||
--- a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
|
||||
+++ b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx
|
||||
@@ -242,7 +242,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
|
||||
appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image
|
||||
|
||||
// initialize stream
|
||||
- Guchar *p, *pm;
|
||||
+ unsigned char *p, *pm;
|
||||
GfxRGB rgb;
|
||||
GfxGray alpha;
|
||||
ImageStream* imgStr =
|
||||
@@ -328,7 +328,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
|
||||
appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image
|
||||
|
||||
// initialize stream
|
||||
- Guchar *p;
|
||||
+ unsigned char *p;
|
||||
GfxRGB rgb;
|
||||
ImageStream* imgStr =
|
||||
new ImageStream(str,
|
||||
@@ -374,7 +374,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf,
|
||||
{
|
||||
for( int x = 0; x < maskWidth; ++x )
|
||||
{
|
||||
- Guchar aPixel = 0;
|
||||
+ unsigned char aPixel = 0;
|
||||
imgStrMask->getPixel( &aPixel );
|
||||
int nIndex = (y*height/maskHeight) * (width*4+1) + // mapped line
|
||||
(x*width/maskWidth)*4 + 1 + 3 // mapped column
|
||||
--
|
||||
2.20.1
|
||||
|
||||
Reference in New Issue
Block a user