Fix build with poppler-0.83
authorMartin Milata <martin@martinmilata.cz>
Wed, 4 Dec 2019 01:37:40 +0000 (02:37 +0100)
committerRene Engelhard <rene@debian.org>
Thu, 12 Dec 2019 21:52:05 +0000 (21:52 +0000)
Change-Id: I7a3684932b8f9c403a3368b42fa4d8039c67f1a9
Reviewed-on: https://gerrit.libreoffice.org/84384
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl@cib.de>
Gbp-Pq: Name fix-build-with-poppler-0.83.diff

sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
sdext/source/pdfimport/xpdfwrapper/wrapper_gpl.cxx

index 3ae3bdc503e08f3893dca7731e7de850b84f4316..36bab70cc6ad42053a20bb19b9f9b9f942fc4c8e 100644 (file)
@@ -491,11 +491,18 @@ void PDFOutDev::writeFontFile( GfxFont* gfxFont ) const
     gfree(pBuf);
 }
 
+#if POPPLER_CHECK_VERSION(0, 83, 0)
+void PDFOutDev::printPath( const GfxPath* pPath )
+#else
 void PDFOutDev::printPath( GfxPath* pPath )
+#endif
 {
     int nSubPaths = pPath ? pPath->getNumSubpaths() : 0;
     for( int i=0; i<nSubPaths; i++ )
     {
+#if POPPLER_CHECK_VERSION(0, 83, 0)
+        const
+#endif
         GfxSubpath* pSub  = pPath->getSubpath( i );
         const int nPoints = pSub->getNumPoints();
 
index 02f6b59f6f1530f17bc401f379e93e0984258fc1..2e7d2186f9a16959a86fd79d4db982246c8056fd 100644 (file)
@@ -149,7 +149,11 @@ namespace pdfi
 
         int  parseFont( long long nNewId, GfxFont* pFont, GfxState* state ) const;
         void writeFontFile( GfxFont* gfxFont ) const;
+#if POPPLER_CHECK_VERSION(0, 83, 0)
+        static void printPath( const GfxPath* pPath );
+#else
         static void printPath( GfxPath* pPath );
+#endif
 
     public:
         explicit PDFOutDev( PDFDoc* pDoc );
index 5b1e13c909c2f08fedf5759c3e12327d185d88b8..8666ab15cfa658517f4608b77d329b6eda611761 100644 (file)
@@ -68,7 +68,11 @@ int main(int argc, char **argv)
     }
 
     // read config file
+#if POPPLER_CHECK_VERSION(0, 83, 0)
+    globalParams = std::make_unique<GlobalParams>();
+#else
     globalParams = new GlobalParams();
+#endif
     globalParams->setErrQuiet(true);
 #if defined(_MSC_VER)
     globalParams->setupBaseFonts(nullptr);