From ec1f7b8f10494398728f69e59708c8745cba185e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= Date: Fri, 25 Jan 2019 21:59:10 +0100 Subject: [PATCH] Fix patch for poppler-0.73.0 --- ...> 0001-Fix-build-with-poppler-0.73.0.patch | 97 ++++++++++++------- libreoffice.spec | 2 +- 2 files changed, 61 insertions(+), 38 deletions(-) rename libreoffice-poppler-0.73.0.patch => 0001-Fix-build-with-poppler-0.73.0.patch (80%) diff --git a/libreoffice-poppler-0.73.0.patch b/0001-Fix-build-with-poppler-0.73.0.patch similarity index 80% rename from libreoffice-poppler-0.73.0.patch rename to 0001-Fix-build-with-poppler-0.73.0.patch index 4db1394..4bf975e 100644 --- a/libreoffice-poppler-0.73.0.patch +++ b/0001-Fix-build-with-poppler-0.73.0.patch @@ -1,6 +1,20 @@ ---- libreoffice-6.1.4.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx -+++ libreoffice-6.1.4.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx -@@ -298,7 +298,7 @@ void writePpm_( OutputBuffer& o_rOut +From 00208d1da5dbd33d20414cfd138e24a45551687e Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B6rn=20Esser?= +Date: Fri, 25 Jan 2019 21:56:28 +0100 +Subject: [PATCH] Fix build with poppler-0.73.0 + +--- + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx | 30 +++++++++---------- + .../pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx | 30 +++++++++---------- + .../pdfimport/xpdfwrapper/pnghelper.cxx | 6 ++-- + .../pdfimport/xpdfwrapper/wrapper_gpl.cxx | 4 +-- + 4 files changed, 35 insertions(+), 35 deletions(-) + +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +index 06e4faead..6d196d7d1 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx +@@ -298,7 +298,7 @@ void writePpm_( OutputBuffer& o_rOutputBuf, o_rOutputBuf.resize(header_size); // initialize stream @@ -9,7 +23,7 @@ GfxRGB rgb; std::unique_ptr imgStr( new ImageStream(str, -@@ -401,7 +401,7 @@ void writeImage_( OutputBuffer& o_rO +@@ -401,7 +401,7 @@ void writeImage_( OutputBuffer& o_rOutputBuf, oneColor = { byteToCol( 0xff ), byteToCol( 0xff ), byteToCol( 0xff ) }; if( colorMap->getColorSpace()->getMode() == csIndexed || colorMap->getColorSpace()->getMode() == csDeviceGray ) { @@ -18,7 +32,7 @@ colorMap->getRGB( &nIndex, &zeroColor ); nIndex = 1; colorMap->getRGB( &nIndex, &oneColor ); -@@ -514,7 +514,7 @@ void PDFOutDev::printPath( GfxPath* pPat +@@ -514,7 +514,7 @@ void PDFOutDev::printPath( GfxPath* pPath ) PDFOutDev::PDFOutDev( PDFDoc* pDoc ) : m_pDoc( pDoc ), m_aFontMap(), @@ -27,7 +41,7 @@ m_bSkipImages(false) { } -@@ -555,7 +555,7 @@ void PDFOutDev::processLink(Link* link, +@@ -555,7 +555,7 @@ void PDFOutDev::processLink(Link* link, Catalog*) LinkAction* pAction = link->getAction(); if (pAction && pAction->getKind() == actionURI) { @@ -36,7 +50,7 @@ std::vector aEsc( lcl_escapeLineFeeds(pURI) ); -@@ -753,7 +753,7 @@ void PDFOutDev::updateFont(GfxState *sta +@@ -753,7 +753,7 @@ void PDFOutDev::updateFont(GfxState *state) aFont = it->second; @@ -60,7 +74,7 @@ { if (m_bSkipImages) return; -@@ -972,9 +972,9 @@ void PDFOutDev::drawImageMask(GfxState* +@@ -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) @@ -72,7 +86,7 @@ { if (m_bSkipImages) return; -@@ -1023,13 +1023,13 @@ void PDFOutDev::drawMaskedImage(GfxState +@@ -1023,13 +1023,13 @@ void PDFOutDev::drawMaskedImage(GfxState*, Object*, Stream* str, int width, int height, GfxImageColorMap* colorMap, #if POPPLER_CHECK_VERSION(0, 12, 0) @@ -89,7 +103,7 @@ #endif ) { -@@ -1045,13 +1045,13 @@ void PDFOutDev::drawSoftMaskedImage(GfxS +@@ -1045,13 +1045,13 @@ void PDFOutDev::drawSoftMaskedImage(GfxState*, Object*, Stream* str, int width, int height, GfxImageColorMap* colorMap, #if POPPLER_CHECK_VERSION(0, 12, 0) @@ -105,8 +119,10 @@ #endif ) { ---- libreoffice-6.1.4.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx -+++ libreoffice-6.1.4.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx +index 7e65f085d..2dd2fff96 100644 +--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx ++++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx @@ -151,17 +151,17 @@ namespace pdfi // Does this device use upside-down coordinates? @@ -189,29 +205,11 @@ typedef std::vector< Output_t > OutputBuffer; #endif // INCLUDED_SDEXT_SOURCE_PDFIMPORT_XPDFWRAPPER_PDFIOUTDEV_GPL_HXX ---- libreoffice-6.1.4.2/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx -+++ libreoffice-6.1.4.2/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 -@@ -143,7 +143,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); - } - ---- libreoffice-6.1.4.2/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx -+++ libreoffice-6.1.4.2/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx -@@ -242,7 +242,7 @@ void PngHelper::createPng( OutputBuffer& +diff --git a/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx b/sdext/source/pdfimport/xpdfwrapper/pnghelper.cxx +index 44f30c0ba..66c175165 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 @@ -220,7 +218,7 @@ GfxRGB rgb; GfxGray alpha; ImageStream* imgStr = -@@ -328,7 +328,7 @@ void PngHelper::createPng( OutputBuffer& +@@ -328,7 +328,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, appendIHDR( o_rOutputBuf, width, height, 8, 6 ); // RGBA image // initialize stream @@ -229,7 +227,7 @@ GfxRGB rgb; ImageStream* imgStr = new ImageStream(str, -@@ -374,7 +374,7 @@ void PngHelper::createPng( OutputBuffer& +@@ -374,7 +374,7 @@ void PngHelper::createPng( OutputBuffer& o_rOutputBuf, { for( int x = 0; x < maskWidth; ++x ) { @@ -238,3 +236,28 @@ imgStrMask->getPixel( &aPixel ); int nIndex = (y*height/maskHeight) * (width*4+1) + // mapped line (x*width/maskWidth)*4 + 1 + 3 // mapped column +diff --git a/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx +index 16db05afe..cd559cab0 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 +@@ -143,7 +143,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); + } + +-- +2.20.1 + diff --git a/libreoffice.spec b/libreoffice.spec index fc47b03..2eec1ec 100644 --- a/libreoffice.spec +++ b/libreoffice.spec @@ -239,7 +239,7 @@ Patch1: 0001-Resolves-rhbz-1432468-disable-opencl-by-default.patch Patch2: 0001-Update-mdds-to-1.4.1.patch Patch3: 0001-Update-orcus-to-0.14.0.patch Patch4: 0001-tdf-121855-like-osx-case-don-t-search-near-infinite-.patch -Patch5: libreoffice-poppler-0.73.0.patch +Patch5: 0001-Fix-build-with-poppler-0.73.0.patch %if 0%{?rhel} # not upstreamed