Date: Wednesday, October 24, 2018 @ 15:20:24
  Author: archange
Revision: 398828

poppler 0.70 rebuild

Added:
  scribus/trunk/scribus-poppler-0.70.patch
Modified:
  scribus/trunk/PKGBUILD
Deleted:
  scribus/trunk/fix-15289-2.patch
  scribus/trunk/fix-15289.patch

----------------------------+
 PKGBUILD                   |   23 ++-
 fix-15289-2.patch          |  243 -------------------------------------
 fix-15289.patch            |   70 ----------
 scribus-poppler-0.70.patch |  277 +++++++++++++++++++++++++++++++++++++++++++
 4 files changed, 294 insertions(+), 319 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD    2018-10-24 13:46:51 UTC (rev 398827)
+++ PKGBUILD    2018-10-24 15:20:24 UTC (rev 398828)
@@ -7,7 +7,7 @@
 
 pkgname=scribus
 pkgver=1.5.4
-pkgrel=3
+pkgrel=4
 pkgdesc="Desktop publishing software"
 arch=('x86_64')
 url="https://www.scribus.net/";
@@ -18,12 +18,18 @@
 optdepends=('tk: scripts based on tkinter'
             'hyphen-lang: hyphenation patterns for desired languages')
 
source=("https://downloads.sourceforge.net/${pkgname}/${pkgname}-${pkgver}.tar.xz"{,.asc}
-        'fix-15289.patch'
-        'fix-15289-2.patch')
+        
'https://github.com/scribusproject/scribus/commit/d867ec3c386baaed1b8e076dd70b278863411480.patch'
+        
'https://github.com/scribusproject/scribus/commit/7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch'
+        
'https://github.com/scribusproject/scribus/commit/76561c1a55cd07c268f8f2b2fea888532933700b.patch'
+        
'https://github.com/scribusproject/scribus/commit/8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch'
+        'scribus-poppler-0.70.patch')
 sha256sums=('6480925250b2bb07028e2f378c02b67fe3e33206743671e03c07c701cd05da03'
             'SKIP'
             '0a782958360ad70145a588a5e1c0044d162344e96b4ff9b0aeb31388cc9b2e36'
-            'edb124793e1b838e60cff4c21c536e16c77e91322f9837eab75d9ff06439ad4f')
+            'b20bf0588b30d7777551ea6eb5744caf31ef31dd396b2b08cc4bddf9dd3a22cf'
+            '29b09c7cc95e8a5432010b39a6c0478cb106a1bbb425747fb383092465476106'
+            '824cbc38b02e15aa742b309a226549c3a6c4e3eb16059c239083145aa4ae6dab'
+            '199b5ea2831d749b91e206f50e3d30a7b787c5e2b85676120e1e4825478f8737')
 validpgpkeys=('5086B8D68E70FDDF4C40045AEF7B95E7F60166DA'  # Peter Linnell 
<[email protected]>
               '757F5E9B13DD648887AD50092D47C099E782504E') # The Scribus Team 
(www.scribus.net) <[email protected]>
 
@@ -30,8 +36,13 @@
 prepare() {
     cd ${pkgname}-${pkgver}
 
-    patch -p1 -i ../fix-15289.patch
-    patch -p1 -i ../fix-15289-2.patch
+    # Poppler 0.64
+    patch -p1 -i ../d867ec3c386baaed1b8e076dd70b278863411480.patch
+    patch -p1 -i ../7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch
+    patch -p1 -i ../76561c1a55cd07c268f8f2b2fea888532933700b.patch
+    # Poppler 0.70
+    patch -p1 -i ../8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch
+    patch -p1 -i ../scribus-poppler-0.70.patch
 
     # Fix python name
     sed \

Deleted: fix-15289-2.patch
===================================================================
--- fix-15289-2.patch   2018-10-24 13:46:51 UTC (rev 398827)
+++ fix-15289-2.patch   2018-10-24 15:20:24 UTC (rev 398828)
@@ -1,243 +0,0 @@
-From 7d4ceeb5cac32287769e3c0238699e0b3e56c24d Mon Sep 17 00:00:00 2001
-From: Jean Ghali <[email protected]>
-Date: Wed, 2 May 2018 14:22:50 +0000
-Subject: [PATCH] #15289: FTBFS when using poppler 0.64.0
-
-git-svn-id: svn://scribus.net/trunk/Scribus@22513 
11d20701-8431-0410-a711-e3c959e3b870
----
- scribus/plugins/import/pdf/slaoutput.cpp | 42 +++++++++++++++++---------------
- scribus/plugins/import/pdf/slaoutput.h   | 26 +++++++++++++++-----
- 2 files changed, 42 insertions(+), 26 deletions(-)
-
-diff --git a/scribus/plugins/import/pdf/slaoutput.cpp 
b/scribus/plugins/import/pdf/slaoutput.cpp
-index 257deb30c6..96847508ba 100644
---- a/scribus/plugins/import/pdf/slaoutput.cpp
-+++ b/scribus/plugins/import/pdf/slaoutput.cpp
-@@ -6,7 +6,7 @@ for which a new license (GPL+exception) is in place.
- */
- 
- #include "slaoutput.h"
--#include <poppler/cpp/poppler-version.h>
-+
- #include <poppler/GlobalParams.h>
- #include <poppler/poppler-config.h>
- #include <poppler/FileSpec.h>
-@@ -20,12 +20,6 @@ for which a new license (GPL+exception) is in place.
- #include "util_math.h"
- #include <tiffio.h>
- 
--#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \
--        ((major) * 10000)                             \
--      + ((minor) *   100)                             \
--      + ((micro) *     1))
--#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MAJOR, 
POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)
--
- LinkSubmitForm::LinkSubmitForm(Object *actionObj)
- {
-       Object obj1, obj2, obj3;
-@@ -44,7 +38,7 @@ LinkSubmitForm::LinkSubmitForm(Object *actionObj)
-                               {
-                                       if (obj3.isName())
-                                       {
--                                              char *name = obj3.getName();
-+                                              POPPLER_CONST char *name = 
obj3.getName();
-                                               if (!strcmp(name, "URL"))
-                                               {
-                                                       obj2 = 
obj1.dictLookup("F");
-@@ -508,8 +502,8 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double 
xCoor, double yCoor, do
-       QString fileName = "";
-       if (act->getKind() == actionGoTo)
-       {
--              LinkGoTo *gto = (LinkGoTo*)act;
--              LinkDest *dst = gto->getDest();
-+              LinkGoTo *gto = (LinkGoTo*) act;
-+              POPPLER_CONST LinkDest *dst = gto->getDest();
-               if (dst)
-               {
-                       if (dst->getKind() == destXYZ)
-@@ -528,7 +522,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double 
xCoor, double yCoor, do
-               }
-               else
-               {
--                      GooString *ndst = gto->getNamedDest();
-+                      POPPLER_CONST GooString *ndst = gto->getNamedDest();
-                       if (ndst)
-                       {
-                               LinkDest *dstn = pdfDoc->findDest(ndst);
-@@ -555,7 +549,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double 
xCoor, double yCoor, do
-       {
-               LinkGoToR *gto = (LinkGoToR*)act;
-               fileName = UnicodeParsedString(gto->getFileName());
--              LinkDest *dst = gto->getDest();
-+              POPPLER_CONST LinkDest *dst = gto->getDest();
-               if (dst)
-               {
-                       if (dst->getKind() == destXYZ)
-@@ -568,7 +562,7 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, double 
xCoor, double yCoor, do
-               }
-               else
-               {
--                      GooString *ndst = gto->getNamedDest();
-+                      POPPLER_CONST GooString *ndst = gto->getNamedDest();
-                       if (ndst)
-                       {
-                               LinkDest *dstn = pdfDoc->findDest(ndst);
-@@ -709,7 +703,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double 
xCoor, double yCoor,
-                       bool bgFound = false;
-                       if (achar)
-                       {
--                              AnnotColor *bgCol = achar->getBackColor();
-+                              POPPLER_CONST AnnotColor *bgCol = 
achar->getBackColor();
-                               if (bgCol)
-                               {
-                                       bgFound = true;
-@@ -717,7 +711,7 @@ bool SlaOutputDev::handleWidgetAnnot(Annot* annota, double 
xCoor, double yCoor,
-                               }
-                               else
-                                       CurrColorFill = CommonStrings::None;
--                              AnnotColor *fgCol = achar->getBorderColor();
-+                              POPPLER_CONST AnnotColor *fgCol = 
achar->getBorderColor();
-                               if (fgCol)
-                               {
-                                       fgFound = true;
-@@ -1054,7 +1048,7 @@ void SlaOutputDev::handleActions(PageItem* ite, 
AnnotWidget *ano)
-                       int xco = 0;
-                       int yco = 0;
-                       LinkGoTo *gto = (LinkGoTo*)Lact;
--                      LinkDest *dst = gto->getDest();
-+                      POPPLER_CONST LinkDest *dst = gto->getDest();
-                       if (dst)
-                       {
-                               if (dst->getKind() == destXYZ)
-@@ -1075,7 +1069,7 @@ void SlaOutputDev::handleActions(PageItem* ite, 
AnnotWidget *ano)
-                       }
-                       else
-                       {
--                              GooString *ndst = gto->getNamedDest();
-+                              POPPLER_CONST GooString *ndst = 
gto->getNamedDest();
-                               if (ndst)
-                               {
-                                       LinkDest *dstn = pdfDoc->findDest(ndst);
-@@ -1107,7 +1101,7 @@ void SlaOutputDev::handleActions(PageItem* ite, 
AnnotWidget *ano)
-                       int yco = 0;
-                       LinkGoToR *gto = (LinkGoToR*)Lact;
-                       QString fileName = 
UnicodeParsedString(gto->getFileName());
--                      LinkDest *dst = gto->getDest();
-+                      POPPLER_CONST LinkDest *dst = gto->getDest();
-                       if (dst)
-                       {
-                               if (dst->getKind() == destXYZ)
-@@ -1123,7 +1117,7 @@ void SlaOutputDev::handleActions(PageItem* ite, 
AnnotWidget *ano)
-                       }
-                       else
-                       {
--                              GooString *ndst = gto->getNamedDest();
-+                              POPPLER_CONST GooString *ndst = 
gto->getNamedDest();
-                               if (ndst)
-                               {
-                                       LinkDest *dstn = pdfDoc->findDest(ndst);
-@@ -3001,6 +2995,14 @@ void SlaOutputDev::drawImage(GfxState *state, Object 
*ref, Stream *str, int widt
-       if ((mm.type() == QTransform::TxShear) || (mm.type() == 
QTransform::TxRotate))
-       {
-               ite->setImageRotation(-tline.angle());
-+              /*QTransform rotMat;
-+              rotMat.rotate(tline.angle());
-+              QTransform imgMat = m_ctm * rotMat.inverted();
-+              double scaleX = sqrt(imgMat.m11() * imgMat.m11() + imgMat.m12() 
* imgMat.m12());
-+              double scaleY = sqrt(imgMat.m21() * imgMat.m21() + imgMat.m22() 
* imgMat.m22());
-+              imgMat.scale(1.0 / scaleX, 1.0 / scaleY);
-+              if (!imgMat.isIdentity())
-+                      img = img.transformed(imgMat);*/
-       }
-       else
-       {
-@@ -4031,7 +4033,7 @@ QString SlaOutputDev::getColor(GfxColorSpace 
*color_space, GfxColor *color, int
-       return fNam;
- }
- 
--QString SlaOutputDev::getAnnotationColor(AnnotColor *color)
-+QString SlaOutputDev::getAnnotationColor(const AnnotColor *color)
- {
-       QString fNam;
-       QString namPrefix = "FromPDF";
-diff --git a/scribus/plugins/import/pdf/slaoutput.h 
b/scribus/plugins/import/pdf/slaoutput.h
-index 6698c030e0..7317cae210 100644
---- a/scribus/plugins/import/pdf/slaoutput.h
-+++ b/scribus/plugins/import/pdf/slaoutput.h
-@@ -26,6 +26,7 @@ for which a new license (GPL+exception) is in place.
- #include "selection.h"
- #include "vgradient.h"
- 
-+#include <poppler/cpp/poppler-version.h>
- #include <poppler/goo/gtypes.h>
- #include <poppler/Object.h>
- #include <poppler/OutputDev.h>
-@@ -49,6 +50,18 @@ for which a new license (GPL+exception) is in place.
- #include <poppler/splash/SplashPath.h>
- #include <poppler/splash/SplashGlyphBitmap.h>
- 
-+#define POPPLER_VERSION_ENCODE(major, minor, micro) ( \
-+        ((major) * 10000)                             \
-+      + ((minor) *   100)                             \
-+      + ((micro) *     1))
-+#define POPPLER_ENCODED_VERSION POPPLER_VERSION_ENCODE(POPPLER_VERSION_MAJOR, 
POPPLER_VERSION_MINOR, POPPLER_VERSION_MICRO)
-+
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 64, 0)
-+#define POPPLER_CONST const
-+#else
-+#define POPPLER_CONST
-+#endif
-+
- //------------------------------------------------------------------------
- // LinkSubmitData
- //------------------------------------------------------------------------
-@@ -61,9 +74,9 @@ class LinkSubmitForm: public LinkAction
-       // Destructor.
-       virtual ~LinkSubmitForm();
-       // Was the LinkImportData created successfully?
--      virtual GBool isOk() { return fileName != NULL; }
-+      virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
-       // Accessors.
--      virtual LinkActionKind getKind() { return actionUnknown; }
-+      virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
-       GooString *getFileName() { return fileName; }
-       int getFlags() { return m_flags; }
- private:
-@@ -83,9 +96,9 @@ class LinkImportData: public LinkAction
-       // Destructor.
-       virtual ~LinkImportData();
-       // Was the LinkImportData created successfully?
--      virtual GBool isOk() { return fileName != NULL; }
-+      virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
-       // Accessors.
--      virtual LinkActionKind getKind() { return actionUnknown; }
-+      virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
-       GooString *getFileName() { return fileName; }
- private:
-       GooString *fileName;            // file name
-@@ -98,7 +111,7 @@ class SplashOutFontFileID: public SplashFontFileID
- {
- public:
- 
--      SplashOutFontFileID(Ref *rA) { r = *rA; }
-+      SplashOutFontFileID(const Ref *rA) { r = *rA; }
-       ~SplashOutFontFileID() {}
-       GBool matches(SplashFontFileID *id)
-       {
-@@ -146,6 +159,7 @@ class SlaOutputDev : public OutputDev
- public:
-       SlaOutputDev(ScribusDoc* doc, QList<PageItem*> *Elements, QStringList 
*importedColors, int flags);
-       virtual ~SlaOutputDev();
-+
-       LinkAction* SC_getAction(AnnotWidget *ano);
-       LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano);
-       static GBool annotations_callback(Annot *annota, void *user_data);
-@@ -261,7 +275,7 @@ class SlaOutputDev : public OutputDev
- private:
-       void getPenState(GfxState *state);
-       QString getColor(GfxColorSpace *color_space, GfxColor *color, int 
*shade);
--      QString getAnnotationColor(AnnotColor *color);
-+      QString getAnnotationColor(const AnnotColor *color);
-       QString convertPath(GfxPath *path);
-       int getBlendMode(GfxState *state);
-       void applyMask(PageItem *ite);

Deleted: fix-15289.patch
===================================================================
--- fix-15289.patch     2018-10-24 13:46:51 UTC (rev 398827)
+++ fix-15289.patch     2018-10-24 15:20:24 UTC (rev 398828)
@@ -1,70 +0,0 @@
-From d867ec3c386baaed1b8e076dd70b278863411480 Mon Sep 17 00:00:00 2001
-From: Jean Ghali <[email protected]>
-Date: Mon, 30 Apr 2018 09:19:33 +0000
-Subject: [PATCH] =?UTF-8?q?#15289:=20FTBFS=201.5.4=20with=20error:=20inval?=
- =?UTF-8?q?id=20conversion=20from=20=E2=80=98const=20GooString*=E2=80=99?=
- =?UTF-8?q?=20to=20=E2=80=98GooString*=E2=80=99?=
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-git-svn-id: svn://scribus.net/trunk/Scribus@22498 
11d20701-8431-0410-a711-e3c959e3b870
----
- scribus/plugins/import/pdf/importpdf.cpp | 2 +-
- scribus/plugins/import/pdf/importpdf.h   | 2 +-
- scribus/plugins/import/pdf/slaoutput.cpp | 2 +-
- scribus/plugins/import/pdf/slaoutput.h   | 2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/scribus/plugins/import/pdf/importpdf.cpp 
b/scribus/plugins/import/pdf/importpdf.cpp
-index c1802861aa..d4c5a9ba49 100644
---- a/scribus/plugins/import/pdf/importpdf.cpp
-+++ b/scribus/plugins/import/pdf/importpdf.cpp
-@@ -1081,7 +1081,7 @@ QRectF PdfPlug::getCBox(int box, int pgNum)
-       return cRect;
- }
- 
--QString PdfPlug::UnicodeParsedString(GooString *s1)
-+QString PdfPlug::UnicodeParsedString(const GooString *s1)
- {
-       if ( !s1 || s1->getLength() == 0 )
-               return QString();
-diff --git a/scribus/plugins/import/pdf/importpdf.h 
b/scribus/plugins/import/pdf/importpdf.h
-index c8c5efcd0d..5249562692 100644
---- a/scribus/plugins/import/pdf/importpdf.h
-+++ b/scribus/plugins/import/pdf/importpdf.h
-@@ -81,7 +81,7 @@ class PdfPlug : public QObject
- private:
-       bool convert(const QString& fn);
-       QRectF getCBox(int box, int pgNum);
--      QString UnicodeParsedString(GooString *s1);
-+      QString UnicodeParsedString(const GooString *s1);
-       
-       QList<PageItem*> Elements;
-       double baseX, baseY;
-diff --git a/scribus/plugins/import/pdf/slaoutput.cpp 
b/scribus/plugins/import/pdf/slaoutput.cpp
-index be1815dc29..17b6357246 100644
---- a/scribus/plugins/import/pdf/slaoutput.cpp
-+++ b/scribus/plugins/import/pdf/slaoutput.cpp
-@@ -4252,7 +4252,7 @@ void SlaOutputDev::pushGroup(QString maskName, GBool 
forSoftMask, GBool alpha, b
-       m_groupStack.push(gElements);
- }
- 
--QString SlaOutputDev::UnicodeParsedString(GooString *s1)
-+QString SlaOutputDev::UnicodeParsedString(const GooString *s1)
- {
-       if ( !s1 || s1->getLength() == 0 )
-               return QString();
-diff --git a/scribus/plugins/import/pdf/slaoutput.h 
b/scribus/plugins/import/pdf/slaoutput.h
-index 20e8b2d311..6698c030e0 100644
---- a/scribus/plugins/import/pdf/slaoutput.h
-+++ b/scribus/plugins/import/pdf/slaoutput.h
-@@ -266,7 +266,7 @@ class SlaOutputDev : public OutputDev
-       int getBlendMode(GfxState *state);
-       void applyMask(PageItem *ite);
-       void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool 
alpha = gFalse, bool inverted = false);
--      QString UnicodeParsedString(GooString *s1);
-+      QString UnicodeParsedString(const GooString *s1);
-       bool checkClip();
-       bool pathIsClosed;
-       QString CurrColorFill;

Added: scribus-poppler-0.70.patch
===================================================================
--- scribus-poppler-0.70.patch                          (rev 0)
+++ scribus-poppler-0.70.patch  2018-10-24 15:20:24 UTC (rev 398828)
@@ -0,0 +1,277 @@
+diff --git a/scribus/plugins/import/pdf/importpdf.cpp 
b/scribus/plugins/import/pdf/importpdf.cpp
+index 8351aca..05aea12 100644
+--- a/scribus/plugins/import/pdf/importpdf.cpp
++++ b/scribus/plugins/import/pdf/importpdf.cpp
+@@ -449,7 +449,7 @@ bool PdfPlug::convert(const QString& fn)
+                               GBool useMediaBox = gTrue;
+                               GBool crop = gTrue;
+                               GBool printing = gFalse;
+-                              PDFRectangle *mediaBox = 
pdfDoc->getPage(1)->getMediaBox();
++                              const PDFRectangle *mediaBox = 
pdfDoc->getPage(1)->getMediaBox();
+                               QRectF mediaRect = QRectF(QPointF(mediaBox->x1, 
mediaBox->y1), QPointF(mediaBox->x2, mediaBox->y2)).normalized();
+                               bool boxesAreDifferent = false;
+                               if (getCBox(Crop_Box, 1) != mediaRect)
+@@ -991,7 +991,7 @@ QImage PdfPlug::readPreview(int pgNum, int width, int 
height, int box)
+ 
+ QRectF PdfPlug::getCBox(int box, int pgNum)
+ {
+-      PDFRectangle *cBox = NULL;
++      const PDFRectangle *cBox = NULL;
+       if (box == Media_Box)
+               cBox = m_pdfDoc->getPage(pgNum)->getMediaBox();
+       else if (box == Bleed_Box)
+diff --git a/scribus/plugins/import/pdf/importpdfconfig.h 
b/scribus/plugins/import/pdf/importpdfconfig.h
+index 769594b..60d299c 100644
+--- a/scribus/plugins/import/pdf/importpdfconfig.h
++++ b/scribus/plugins/import/pdf/importpdfconfig.h
+@@ -21,4 +21,10 @@ for which a new license (GPL+exception) is in place.
+ #define POPPLER_CONST
+ #endif
+ 
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 70, 0)
++#define POPPLER_CONST_070 const
++#else
++#define POPPLER_CONST_070
++#endif
++
+ #endif
+diff --git a/scribus/plugins/import/pdf/slaoutput.cpp 
b/scribus/plugins/import/pdf/slaoutput.cpp
+index b51f357..6ef037b 100644
+--- a/scribus/plugins/import/pdf/slaoutput.cpp
++++ b/scribus/plugins/import/pdf/slaoutput.cpp
+@@ -183,7 +183,7 @@ void AnoOutputDev::drawString(GfxState *state, 
POPPLER_CONST GooString *s)
+       m_itemText = s->copy();
+ }
+ 
+-QString AnoOutputDev::getColor(GfxColorSpace *color_space, GfxColor *color, 
int *shade)
++QString AnoOutputDev::getColor(GfxColorSpace *color_space, POPPLER_CONST_070 
GfxColor *color, int *shade)
+ {
+       QString fNam;
+       QString namPrefix = "FromPDF";
+@@ -1598,7 +1598,7 @@ void SlaOutputDev::updateStrokeColor(GfxState *state)
+ void SlaOutputDev::clip(GfxState *state)
+ {
+ //    qDebug() << "Clip";
+-      double *ctm;
++      const double *ctm;
+       ctm = state->getCTM();
+       m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+       QString output = convertPath(state->getPath());
+@@ -1635,7 +1635,7 @@ void SlaOutputDev::clip(GfxState *state)
+ void SlaOutputDev::eoClip(GfxState *state)
+ {
+ //    qDebug() << "EoClip";
+-      double *ctm;
++      const double *ctm;
+       ctm = state->getCTM();
+       m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+       QString output = convertPath(state->getPath());
+@@ -1672,7 +1672,7 @@ void SlaOutputDev::eoClip(GfxState *state)
+ void SlaOutputDev::stroke(GfxState *state)
+ {
+ //    qDebug() << "Stroke";
+-      double *ctm;
++      const double *ctm;
+       ctm = state->getCTM();
+       double xCoor = m_doc->currentPage()->xOffset();
+       double yCoor = m_doc->currentPage()->yOffset();
+@@ -1764,7 +1764,7 @@ void SlaOutputDev::stroke(GfxState *state)
+ void SlaOutputDev::fill(GfxState *state)
+ {
+ //    qDebug() << "Fill";
+-      double *ctm;
++      const double *ctm;
+       ctm = state->getCTM();
+       double xCoor = m_doc->currentPage()->xOffset();
+       double yCoor = m_doc->currentPage()->yOffset();
+@@ -1809,7 +1809,7 @@ void SlaOutputDev::fill(GfxState *state)
+ void SlaOutputDev::eoFill(GfxState *state)
+ {
+ //    qDebug() << "EoFill";
+-      double *ctm;
++      const double *ctm;
+       ctm = state->getCTM();
+       double xCoor = m_doc->currentPage()->xOffset();
+       double yCoor = m_doc->currentPage()->yOffset();
+@@ -1858,14 +1858,14 @@ GBool SlaOutputDev::axialShadedFill(GfxState *state, 
GfxAxialShading *shading, d
+       double GrEndX;
+       double GrEndY;
+       int shade = 100;
+-      Function *func = shading->getFunc(0);
++      POPPLER_CONST_070 Function *func = shading->getFunc(0);
+       VGradient FillGradient = VGradient(VGradient::linear);
+       FillGradient.clearStops();
+       GfxColorSpace *color_space = shading->getColorSpace();
+       if (func->getType() == 3)
+       {
+               StitchingFunction *stitchingFunc = (StitchingFunction*)func;
+-              double *bounds = stitchingFunc->getBounds();
++              const double *bounds = stitchingFunc->getBounds();
+               int num_funcs = stitchingFunc->getNumFuncs();
+               // Add stops from all the stitched functions
+               for ( int i = 0 ; i < num_funcs ; i++ )
+@@ -1889,8 +1889,7 @@ GBool SlaOutputDev::axialShadedFill(GfxState *state, 
GfxAxialShading *shading, d
+       state->getClipBBox(&xmin, &ymin, &xmax, &ymax);
+       QRectF crect = QRectF(QPointF(xmin, ymin), QPointF(xmax, ymax));
+       crect = crect.normalized();
+-      double *ctm;
+-      ctm = state->getCTM();
++      const double *ctm = state->getCTM();
+       m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+       FPointArray gr;
+       gr.addPoint(GrStartX, GrStartY);
+@@ -1969,14 +1968,14 @@ GBool SlaOutputDev::radialShadedFill(GfxState *state, 
GfxRadialShading *shading,
+       double GrEndX;
+       double GrEndY;
+       int shade = 100;
+-      Function *func = shading->getFunc(0);
++      POPPLER_CONST_070 Function *func = shading->getFunc(0);
+       VGradient FillGradient = VGradient(VGradient::linear);
+       FillGradient.clearStops();
+       GfxColorSpace *color_space = shading->getColorSpace();
+       if (func->getType() == 3)
+       {
+               StitchingFunction *stitchingFunc = (StitchingFunction*)func;
+-              double *bounds = stitchingFunc->getBounds();
++              const double *bounds = stitchingFunc->getBounds();
+               int num_funcs = stitchingFunc->getNumFuncs();
+               // Add stops from all the stitched functions
+               for ( int i = 0 ; i < num_funcs ; i++ )
+@@ -2015,8 +2014,7 @@ GBool SlaOutputDev::radialShadedFill(GfxState *state, 
GfxRadialShading *shading,
+       double GrFocalY = y1;
+       GrEndX = GrFocalX + r1;
+       GrEndY = GrFocalY;
+-      double *ctm;
+-      ctm = state->getCTM();
++      const double *ctm = state->getCTM();
+       m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+       FPointArray gr;
+       gr.addPoint(GrStartX, GrStartY);
+@@ -2098,8 +2096,7 @@ GBool SlaOutputDev::gouraudTriangleShadedFill(GfxState 
*state, GfxGouraudTriangl
+       output += QString("Z");
+       pathIsClosed = true;
+       Coords = output;
+-      double *ctm;
+-      ctm = state->getCTM();
++      const double *ctm = state->getCTM();
+       m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+       int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + 
crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, CurrColorFill, 
CommonStrings::None);
+       PageItem* ite = m_doc->Items->at(z);
+@@ -2179,8 +2176,7 @@ GBool SlaOutputDev::patchMeshShadedFill(GfxState *state, 
GfxPatchMeshShading *sh
+       output += QString("Z");
+       pathIsClosed = true;
+       Coords = output;
+-      double *ctm;
+-      ctm = state->getCTM();
++      const double *ctm = state->getCTM();
+       m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+       int z = m_doc->itemAdd(PageItem::Polygon, PageItem::Rectangle, xCoor + 
crect.x(), yCoor + crect.y(), crect.width(), crect.height(), 0, CurrColorFill, 
CommonStrings::None);
+       PageItem* ite = m_doc->Items->at(z);
+@@ -2205,7 +2201,7 @@ GBool SlaOutputDev::patchMeshShadedFill(GfxState *state, 
GfxPatchMeshShading *sh
+       for (int i = 0; i < shading->getNPatches(); i++)
+       {
+               int shade = 100;
+-              GfxPatch *patch = shading->getPatch(i);
++              const GfxPatch *patch = shading->getPatch(i);
+               GfxColor color;
+               meshGradientPatch patchM;
+               int u, v;
+@@ -2330,7 +2326,6 @@ GBool SlaOutputDev::tilingPatternFill(GfxState *state, 
Gfx * /*gfx*/, Catalog *c
+       box.x2 = bbox[2];
+       box.y2 = bbox[3];
+-      double *ctm;
+-      ctm = state->getCTM();
++      const double *ctm = state->getCTM();
+       m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], ctm[4], ctm[5]);
+       QTransform mm = QTransform(mat[0], mat[1], mat[2], mat[3], mat[4], 
mat[5]);
+       QTransform mmx = mm * m_ctm;
+@@ -2507,8 +2502,7 @@ void SlaOutputDev::drawImageMask(GfxState *state, Object 
*ref, Stream *str, int
+                       t++;
+               }
+       }
+-      double *ctm;
+-      ctm = state->getCTM();
++      const double *ctm = state->getCTM();
+       double xCoor = m_doc->currentPage()->xOffset();
+       double yCoor = m_doc->currentPage()->yOffset();
+       QRectF crect = QRectF(0, 0, width, height);
+@@ -2653,8 +2647,7 @@ void SlaOutputDev::drawSoftMaskedImage(GfxState *state, 
Object *ref, Stream *str
+                       t++;
+               }
+       }
+-      double *ctm;
+-      ctm = state->getCTM();
++      const double *ctm = state->getCTM();
+       double xCoor = m_doc->currentPage()->xOffset();
+       double yCoor = m_doc->currentPage()->yOffset();
+       QRectF crect = QRectF(0, 0, width, height);
+@@ -2803,8 +2796,7 @@ void SlaOutputDev::drawMaskedImage(GfxState *state, 
Object *ref, Stream *str,  i
+                       t++;
+               }
+       }
+-      double *ctm;
+-      ctm = state->getCTM();
++      const double *ctm = state->getCTM();
+       double xCoor = m_doc->currentPage()->xOffset();
+       double yCoor = m_doc->currentPage()->yOffset();
+       QRectF crect = QRectF(0, 0, width, height);
+@@ -2968,8 +2960,7 @@ void SlaOutputDev::drawImage(GfxState *state, Object 
*ref, Stream *str, int widt
+               delete image;
+               return;
+       }
+-      double *ctm;
+-      ctm = state->getCTM();
++      const double *ctm = state->getCTM();
+       double xCoor = m_doc->currentPage()->xOffset();
+       double yCoor = m_doc->currentPage()->yOffset();
+       QRectF crect = QRectF(0, 0, width, height);
+@@ -3329,7 +3320,7 @@ void SlaOutputDev::updateFont(GfxState *state)
+       char *tmpBuf;
+       int tmpBufLen = 0;
+       int *codeToGID;
+-      double *textMat;
++      const double *textMat;
+       double m11, m12, m21, m22, fontSize;
+       SplashCoord mat[4];
+       int n = 0;
+@@ -3796,8 +3787,7 @@ void SlaOutputDev::drawChar(GfxState *state, double x, 
double y, double dx, doub
+                               if (f & splashPathLast)
+                                       qPath.closeSubpath();
+                       }
+-                      double *ctm;
+-                      ctm = state->getCTM();
++                      const double *ctm = state->getCTM();
+                       m_ctm = QTransform(ctm[0], ctm[1], ctm[2], ctm[3], 
ctm[4], ctm[5]);
+                       double xCoor = m_doc->currentPage()->xOffset();
+                       double yCoor = m_doc->currentPage()->yOffset();
+@@ -3951,7 +3941,7 @@ void SlaOutputDev::endTextObject(GfxState *state)
+       }
+ }
+ 
+-QString SlaOutputDev::getColor(GfxColorSpace *color_space, GfxColor *color, 
int *shade)
++QString SlaOutputDev::getColor(GfxColorSpace *color_space, POPPLER_CONST_070 
GfxColor *color, int *shade)
+ {
+       QString fNam;
+       QString namPrefix = "FromPDF";
+diff --git a/scribus/plugins/import/pdf/slaoutput.h 
b/scribus/plugins/import/pdf/slaoutput.h
+index 075595c..c46448b 100644
+--- a/scribus/plugins/import/pdf/slaoutput.h
++++ b/scribus/plugins/import/pdf/slaoutput.h
+@@ -137,7 +137,7 @@ public:
+       GooString *m_fontName;
+       GooString *m_itemText;
+ private:
+-      QString getColor(GfxColorSpace *color_space, GfxColor *color, int 
*shade);
++      QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor 
*color, int *shade);
+       ScribusDoc* m_doc;
+       QStringList *m_importedColors;
+ };
+@@ -263,7 +263,7 @@ public:
+ 
+ private:
+       void getPenState(GfxState *state);
+-      QString getColor(GfxColorSpace *color_space, GfxColor *color, int 
*shade);
++      QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor 
*color, int *shade);
+       QString getAnnotationColor(const AnnotColor *color);
+       QString convertPath(GfxPath *path);
+       int getBlendMode(GfxState *state);

Reply via email to