Author: jghali
Date: Tue Oct 23 21:53:35 2018
New Revision: 22741

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22741
Log:
#15462: FTBFS with poppler 0.70.0

Modified:
    trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
    trunk/Scribus/scribus/plugins/import/pdf/importpdfconfig.h
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
    trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22741&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp      (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp      Tue Oct 23 
21:53:35 2018
@@ -449,7 +449,7 @@
                                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 @@
 
 QRectF PdfPlug::getCBox(int box, int pgNum)
 {
-       PDFRectangle *cBox = nullptr;
+       const PDFRectangle *cBox = nullptr;
        if (box == Media_Box)
                cBox = m_pdfDoc->getPage(pgNum)->getMediaBox();
        else if (box == Bleed_Box)

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdfconfig.h
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22741&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdfconfig.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdfconfig.h  (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdfconfig.h  Tue Oct 23 
21:53:35 2018
@@ -21,4 +21,10 @@
 #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

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22741&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp      (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp      Tue Oct 23 
21:53:35 2018
@@ -133,7 +133,7 @@
        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";
@@ -1471,7 +1471,7 @@
 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());
@@ -1508,7 +1508,7 @@
 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());
@@ -1545,7 +1545,7 @@
 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();
@@ -1637,7 +1637,7 @@
 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();
@@ -1682,7 +1682,7 @@
 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();
@@ -1731,14 +1731,14 @@
        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++ )
@@ -1772,8 +1772,7 @@
        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);
@@ -1842,14 +1841,14 @@
        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++ )
@@ -1888,8 +1887,7 @@
        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);
@@ -1971,8 +1969,7 @@
        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);
@@ -2052,8 +2049,7 @@
        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);
@@ -2078,7 +2074,7 @@
        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;
@@ -2207,7 +2203,7 @@
        box.x2 = bbox[2];
        box.y2 = bbox[3];
 
-       double *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;
@@ -2375,8 +2371,7 @@
                        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);
@@ -2521,8 +2516,7 @@
                        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);
@@ -2671,8 +2665,7 @@
                        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);
@@ -2836,8 +2829,7 @@
                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);
@@ -3124,7 +3116,7 @@
        char *tmpBuf;
        int tmpBufLen = 0;
        int *codeToGID;
-       double *textMat;
+       const double *textMat;
        double m11, m12, m21, m22, fontSize;
        SplashCoord mat[4];
        int n = 0;
@@ -3384,8 +3376,7 @@
                                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();
@@ -3539,7 +3530,7 @@
        }
 }
 
-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";

Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
URL: 
http://scribus.net/websvn/diff.php?repname=Scribus&rev=22741&path=/trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h        (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h        Tue Oct 23 
21:53:35 2018
@@ -137,7 +137,7 @@
        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 @@
 
 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);


_______________________________________________
scribus-commit mailing list
[email protected]
http://lists.scribus.net/mailman/listinfo/scribus-commit

Reply via email to