[Libreoffice-commits] core.git: Branch 'distro/lhm/libreoffice-5-2+backports' - sdext/source

Rasmus Thomsen (via logerrit) logerrit at kemper.freedesktop.org
Mon Nov 25 16:00:11 UTC 2019


 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |   25 ++++++++++++++++++
 sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx |   14 ++++++++++
 2 files changed, 39 insertions(+)

New commits:
commit c5d14bbb7c849416278c11a8e5d7640cd6399f63
Author:     Rasmus Thomsen <oss at cogitri.dev>
AuthorDate: Sat Oct 26 14:11:35 2019 +0200
Commit:     Michael Stahl <michael.stahl at cib.de>
CommitDate: Mon Nov 25 16:59:25 2019 +0100

    Fix build with poppler-0.82
    
    Reviewed-on: https://gerrit.libreoffice.org/81545
    Tested-by: Jenkins
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    (cherry picked from commit 2eadd46ab81058087af95bdfc1fea28fcdb65998)
    Reviewed-on: https://gerrit.libreoffice.org/83363
    Reviewed-by: Rasmus Thomsen <oss at cogitri.dev>
    (cherry picked from commit 928a372775a0758aa76eb10e568d5c106a8586eb)
    
    Change-Id: I3b6b3faea7986f3e5a6ae4790580d03bc9c955fc
    Reviewed-on: https://gerrit.libreoffice.org/83528
    Reviewed-by: Michael Stahl <michael.stahl at cib.de>
    Tested-by: Michael Stahl <michael.stahl at cib.de>

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index b718ac0f86e4..07cefb7ba89d 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -883,11 +883,20 @@ void PDFOutDev::eoClip(GfxState *state)
     local offset of character (zero for horizontal writing mode). not
     taken into account for output pos updates. Used for vertical writing.
  */
+
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+void PDFOutDev::drawChar(GfxState *state, double x, double y,
+                         double dx, double dy,
+                         double originX, double originY,
+                         CharCode, int /*nBytes*/, const Unicode *u, int uLen)
+{
+#else
 void PDFOutDev::drawChar(GfxState *state, double x, double y,
                          double dx, double dy,
                          double originX, double originY,
                          CharCode, int /*nBytes*/, Unicode *u, int uLen)
 {
+#endif
     assert(state);
 
     if( u == nullptr )
@@ -994,6 +1003,13 @@ void PDFOutDev::drawImageMask(GfxState* pState, Object*, Stream* str,
     writeBinaryBuffer(aBuf);
 }
 
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
+                          int width, int height, GfxImageColorMap* colorMap,
+                          poppler_bool /*interpolate*/,
+                          const int* maskColors, poppler_bool /*inlineImg*/ )
+{
+#else
 void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
                           int width, int height, GfxImageColorMap* colorMap,
 #if POPPLER_CHECK_VERSION(0, 12, 0)
@@ -1001,6 +1017,7 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
 #endif
                           int* maskColors, poppler_bool /*inlineImg*/ )
 {
+#endif
     if (m_bSkipImages)
         return;
     OutputBuffer aBuf; initBuf(aBuf);
@@ -1021,12 +1038,20 @@ void PDFOutDev::drawImage(GfxState*, Object*, Stream* str,
         {
             GfxRGB aMinRGB;
             colorMap->getColorSpace()->getRGB(
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+                reinterpret_cast<const GfxColor*>(maskColors),
+#else
                 reinterpret_cast<GfxColor*>(maskColors),
+#endif
                 &aMinRGB );
 
             GfxRGB aMaxRGB;
             colorMap->getColorSpace()->getRGB(
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+                reinterpret_cast<const GfxColor*>(maskColors)+gfxColorMaxComps,
+#else
                 reinterpret_cast<GfxColor*>(maskColors)+gfxColorMaxComps,
+#endif
                 &aMaxRGB );
 
             aMaskBuf.push_back( colToByte(aMinRGB.r) );
diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
index 332bbcac9416..9d780bd01225 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
@@ -231,10 +231,17 @@ namespace pdfi
         virtual void eoClip(GfxState *state) override;
 
         //----- text drawing
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+        virtual void drawChar(GfxState *state, double x, double y,
+                              double dx, double dy,
+                              double originX, double originY,
+                              CharCode code, int nBytes, const Unicode *u, int uLen) override;
+#else
         virtual void drawChar(GfxState *state, double x, double y,
                               double dx, double dy,
                               double originX, double originY,
                               CharCode code, int nBytes, Unicode *u, int uLen) override;
+#endif
 #if POPPLER_CHECK_VERSION(0, 64, 0)
         virtual void drawString(GfxState *state, const GooString *s) override;
 #else
@@ -249,12 +256,19 @@ namespace pdfi
                                    poppler_bool interpolate,
 #endif
                                    poppler_bool inlineImg) override;
+#if POPPLER_CHECK_VERSION(0, 82, 0)
+        virtual void drawImage(GfxState *state, Object *ref, Stream *str,
+                               int width, int height, GfxImageColorMap *colorMap,
+                               poppler_bool interpolate,
+                               const int* maskColors, poppler_bool inlineImg) override;
+#else
         virtual void drawImage(GfxState *state, Object *ref, Stream *str,
                                int width, int height, GfxImageColorMap *colorMap,
 #if POPPLER_CHECK_VERSION(0, 12, 0)
                                poppler_bool interpolate,
 #endif
                                int *maskColors, poppler_bool inlineImg) override;
+#endif
         virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
                                      int width, int height,
                                      GfxImageColorMap *colorMap,


More information about the Libreoffice-commits mailing list