Hi,

unbreak the build with poppler-0.82.0.

This can go in *after* the poppler update (because I'm too lazy add
#ifdefs).

ok?

Ciao,
        Kili

Index: patches/patch-filters_karbon_pdf_SvgOutputDev_cpp
===================================================================
RCS file: 
/cvs/ports/editors/calligra/patches/patch-filters_karbon_pdf_SvgOutputDev_cpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-filters_karbon_pdf_SvgOutputDev_cpp
--- patches/patch-filters_karbon_pdf_SvgOutputDev_cpp   17 Feb 2019 20:38:20 
-0000      1.1
+++ patches/patch-filters_karbon_pdf_SvgOutputDev_cpp   6 Nov 2019 18:08:04 
-0000
@@ -7,6 +7,8 @@ https://cgit.kde.org/calligra.git/commit
 https://cgit.kde.org/calligra.git/commit/?id=05a65f9
 https://cgit.kde.org/calligra.git/commit/?id=3a65c7f
 
+and with poppler-0.82
+
 Index: filters/karbon/pdf/SvgOutputDev.cpp
 --- filters/karbon/pdf/SvgOutputDev.cpp.orig
 +++ filters/karbon/pdf/SvgOutputDev.cpp
@@ -78,7 +80,16 @@ Index: filters/karbon/pdf/SvgOutputDev.c
  {
      return QString("matrix(%1 %2 %3 %4 %5 %6)")
             .arg(matrix[0]).arg(matrix[1])
-@@ -402,7 +402,7 @@ void SvgOutputDev::drawString(GfxState * state, GooStr
+@@ -387,7 +387,7 @@ QString SvgOutputDev::printStroke()
+     return stroke;
+ }
+ 
+-void SvgOutputDev::drawString(GfxState * state, GooString * s)
++void SvgOutputDev::drawString(GfxState * state, const GooString * s)
+ {
+     int render = state->getRender();
+     // check for invisible text -- this is used by Acrobat Capture
+@@ -402,10 +402,10 @@ void SvgOutputDev::drawString(GfxState * state, GooStr
  
      QString str;
  
@@ -86,7 +97,11 @@ Index: filters/karbon/pdf/SvgOutputDev.c
 +    const char * p = s->c_str();
      int len = s->getLength();
      CharCode code;
-     Unicode *u = nullptr;
+-    Unicode *u = nullptr;
++    const Unicode *u = nullptr;
+     int uLen;
+     double dx, dy, originX, originY;
+     while (len > 0) {
 @@ -429,7 +429,7 @@ void SvgOutputDev::drawString(GfxState * state, GooStr
      double x = state->getCurX();
      double y = state->getCurY();
@@ -117,7 +132,7 @@ Index: filters/karbon/pdf/SvgOutputDev.c
  void SvgOutputDev::drawImage(GfxState *state, Object */*ref*/, Stream *str,
                               int width, int height, GfxImageColorMap 
*colorMap,
 -                             int *maskColors, GBool /*inlineImg*/)
-+                             int *maskColors, bool /*inlineImg*/)
++                             const int *maskColors, bool /*inlineImg*/)
  {
      ImageStream * imgStr = new ImageStream(str, width, 
colorMap->getNumPixelComps(), colorMap->getBits());
      imgStr->reset();
@@ -153,7 +168,7 @@ Index: filters/karbon/pdf/SvgOutputDev.c
  void SvgOutputDev::drawImage(GfxState *state, Object *ref, Stream *str,
                               int width, int height, GfxImageColorMap 
*colorMap,
 -                             GBool /*interpolate*/, int *maskColors, GBool 
inlineImg)
-+                             bool /*interpolate*/, int *maskColors, bool 
inlineImg)
++                             bool /*interpolate*/, const int *maskColors, 
bool inlineImg)
  {
      drawImage(state, ref, str, width, height, colorMap, maskColors, 
inlineImg);
  }
Index: patches/patch-filters_karbon_pdf_SvgOutputDev_h
===================================================================
RCS file: 
/cvs/ports/editors/calligra/patches/patch-filters_karbon_pdf_SvgOutputDev_h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-filters_karbon_pdf_SvgOutputDev_h
--- patches/patch-filters_karbon_pdf_SvgOutputDev_h     17 Feb 2019 20:38:20 
-0000      1.1
+++ patches/patch-filters_karbon_pdf_SvgOutputDev_h     6 Nov 2019 18:08:04 
-0000
@@ -4,6 +4,8 @@ Fix build with poppler 0.73
 https://cgit.kde.org/calligra.git/commit/?id=a615718
 https://cgit.kde.org/calligra.git/commit/?id=ab9cb33
 
+and with poppler-0.82
+
 Index: filters/karbon/pdf/SvgOutputDev.h
 --- filters/karbon/pdf/SvgOutputDev.h.orig
 +++ filters/karbon/pdf/SvgOutputDev.h
@@ -23,16 +25,22 @@ Index: filters/karbon/pdf/SvgOutputDev.h
      virtual void startPage(int pageNum, GfxState *state, XRef *xref);
      virtual void endPage();
  
-@@ -63,10 +63,10 @@ class SvgOutputDev : public OutputDev (public)
+@@ -58,15 +58,15 @@ class SvgOutputDev : public OutputDev (public)
+     virtual void eoFill(GfxState *state);
+ 
+     // text
+-    virtual void drawString(GfxState * state, GooString * s);
++    virtual void drawString(GfxState * state, const GooString * s);
+ 
      // images
      virtual void drawImage(GfxState *state, Object *ref, Stream *str,
                             int width, int height, GfxImageColorMap *colorMap,
 -                           int *maskColors, GBool inlineImg);
-+                           int *maskColors, bool inlineImg);
++                           const int *maskColors, bool inlineImg);
      virtual void drawImage(GfxState *state, Object *ref, Stream *str,
                             int width, int height, GfxImageColorMap *colorMap,
 -                           GBool interpolate, int *maskColors, GBool 
inlineImg);
-+                           bool interpolate, int *maskColors, bool inlineImg);
++                           bool interpolate, const int *maskColors, bool 
inlineImg);
  
      // styles
      virtual void updateAll(GfxState *state);

Reply via email to