Allow building with poppler-0.62
authorDominique Leuenberger <dimstar@suse.de>
Fri, 5 Jan 2018 11:16:03 +0000 (12:16 +0100)
committerRene Engelhard <rene@debian.org>
Mon, 29 Jan 2018 17:52:54 +0000 (17:52 +0000)
Change-Id: Ia627f1628a67dd8ece7d9318639d9ccd06b89765
Reviewed-on: https://gerrit.libreoffice.org/47460
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Stahl <mstahl@redhat.com>
Gbp-Pq: Name poppler-0.62.diff

sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx

index fa763df0191861567a2162e0f94c9ffa19819e63..00fd56a226d1e83d8ea1a0fa8ba231214b2a0c9f 100644 (file)
 #pragma warning(push, 1)
 #endif
 
-// sigh, UTF8.h was removed in poppler-0.21.0 and put back in 0.21.1
+// sigh, UTF8.h was removed in poppler-0.21.0 and put back in 0.21.1, then renamed to UnicodeMapFuncs.h in 0.62.0
 // FIXME: we can't use #if POPPLER_CHECK_VERSION(0, 21, 0) && !POPPLER_CHECK_VERSION(0, 21, 1)
 //        because the internal poppler does not provide poppler-version.h and the macro always returns 0
-#if POPPLER_CHECK_VERSION(0, 21, 1)
+#if POPPLER_CHECK_VERSION(0, 62, 0)
+#include <UnicodeMapFuncs.h>
+#elif POPPLER_CHECK_VERSION(0, 21, 1)
 #include <UTF8.h>
 #elif POPPLER_CHECK_VERSION(0, 21, 0)
 #include "UTF.h"
@@ -913,7 +915,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, double y,
             );
 
     // silence spurious warning
+#if POPPLER_CHECK_VERSION(0, 62, 0)
+    (void)&mapUTF16;
+#else
     (void)&mapUCS2;
+#endif
 
     char buf[9];
     for( int i=0; i<uLen; ++i )