$ git diff --patch-with-stat --summary 5fcf6d9bb71db2fb085edd7ae9ffe02837f4010b..3e1b63df91ccfc07b681271433b8b75a08fa4872
.abf.yml | 5 +-
58b2a685e6b9ef437435ad119912d1e3ea9d2eae.patch | 25 -
76561c1a55cd07c268f8f2b2fea888532933700b.patch | 785 -------------------------
7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch | 243 --------
8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch | 80 ---
d867ec3c386baaed1b8e076dd70b278863411480.patch | 70 ---
fix-15289-2.patch | 243 --------
fix-15289.patch | 70 ---
scribus-1.5.4-fix-warnings.patch | 23 -
scribus-1.5.4-poppler-0.72.patch | 213 -------
scribus-1.5.4-poppler-0.74.patch | 132 -----
scribus-1.5.4-poppler-69.patch | 35 --
scribus-poppler-0.70.patch | 277 ---------
scribus.spec | 16 +-
14 files changed, 4 insertions(+), 2213 deletions(-)
delete mode 100644 58b2a685e6b9ef437435ad119912d1e3ea9d2eae.patch
delete mode 100644 76561c1a55cd07c268f8f2b2fea888532933700b.patch
delete mode 100644 7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch
delete mode 100644 8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch
delete mode 100644 d867ec3c386baaed1b8e076dd70b278863411480.patch
delete mode 100644 fix-15289-2.patch
delete mode 100644 fix-15289.patch
delete mode 100644 scribus-1.5.4-fix-warnings.patch
delete mode 100644 scribus-1.5.4-poppler-0.72.patch
delete mode 100644 scribus-1.5.4-poppler-0.74.patch
delete mode 100644 scribus-1.5.4-poppler-69.patch
delete mode 100644 scribus-poppler-0.70.patch
diff --git a/.abf.yml b/.abf.yml
index 102877e..e43ba8a 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,5 +1,2 @@
-removed_sources:
- scribus-1.5.2.tar.xz: 87f426863be8057d83e73b58649ccc2a3266c73b
- scribus-1.5.4.tar.xz: 40a8819df4572a3fb752ecda38520a792f69c54f
sources:
- scribus-20190705.tar.xz: 4ed48d37946ff0a441d362b0f18d8a2858c81993
+ scribus-1.5.5.tar.xz: 2f657d42df810bcf1a223cf4c38bf18278486907
diff --git a/58b2a685e6b9ef437435ad119912d1e3ea9d2eae.patch b/58b2a685e6b9ef437435ad119912d1e3ea9d2eae.patch
deleted file mode 100644
index 1d05621..0000000
--- a/58b2a685e6b9ef437435ad119912d1e3ea9d2eae.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 58b2a685e6b9ef437435ad119912d1e3ea9d2eae Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-Date: Thu, 1 Nov 2018 10:50:47 +0000
-Subject: [PATCH] Fix for building pdf importer with poppler 0.71.0
-
-git-svn-id: svn://scribus.net/trunk/Scribus@22745 11d20701-8431-0410-a711-e3c959e3b870
----
- scribus/plugins/import/pdf/importpdfconfig.h | 6 ++++++
- 1 file changed, 6 insertions(+)
-
-diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
-index 60d299c69d..9698e01aec 100644
---- a/scribus/plugins/import/pdf/importpdfconfig.h
-+++ b/scribus/plugins/import/pdf/importpdfconfig.h
-@@ -27,4 +27,10 @@ for which a new license (GPL+exception) is in place.
- #define POPPLER_CONST_070
- #endif
-
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 71, 0)
-+#define GBool bool
-+#define gTrue true
-+#define gFalse false
-+#endif
-+
- #endif
diff --git a/76561c1a55cd07c268f8f2b2fea888532933700b.patch b/76561c1a55cd07c268f8f2b2fea888532933700b.patch
deleted file mode 100644
index d48d2b5..0000000
--- a/76561c1a55cd07c268f8f2b2fea888532933700b.patch
+++ /dev/null
@@ -1,785 +0,0 @@
-From 76561c1a55cd07c268f8f2b2fea888532933700b Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-Date: Wed, 2 May 2018 15:12:35 +0000
-Subject: [PATCH] Amend r22498 so as to allow building with the old poppler
- version (< 0.35.0) used by travis
-
-git-svn-id: svn://scribus.net/trunk/Scribus@22514 11d20701-8431-0410-a711-e3c959e3b870
----
- scribus/plugins/import/pdf/importpdf.cpp | 2 +-
- scribus/plugins/import/pdf/importpdf.h | 12 +-
- scribus/plugins/import/pdf/importpdfconfig.h | 24 +
- scribus/plugins/import/pdf/slaoutput.cpp | 2 +-
- scribus/plugins/import/pdf/slaoutput.h | 671 +++++++++----------
- 5 files changed, 362 insertions(+), 349 deletions(-)
- create mode 100644 scribus/plugins/import/pdf/importpdfconfig.h
-
-diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
-index d4c5a9ba49..6dca080014 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(const GooString *s1)
-+QString PdfPlug::UnicodeParsedString(POPPLER_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 5249562692..fbf607bf03 100644
---- a/scribus/plugins/import/pdf/importpdf.h
-+++ b/scribus/plugins/import/pdf/importpdf.h
-@@ -7,11 +7,6 @@ for which a new license (GPL+exception) is in place.
- #ifndef IMPORTPDF_H
- #define IMPORTPDF_H
-
--
--#include "pluginapi.h"
--#include "pageitem.h"
--#include "sccolor.h"
--#include "fpointarray.h"
- #include <QList>
- #include <QTransform>
- #include <QMultiMap>
-@@ -26,6 +21,11 @@ for which a new license (GPL+exception) is in place.
- #include <QPen>
- #include <QImage>
-
-+#include "fpointarray.h"
-+#include "importpdfconfig.h"
-+#include "pluginapi.h"
-+#include "pageitem.h"
-+#include "sccolor.h"
-
- class QColor;
- class QMatrix;
-@@ -81,7 +81,7 @@ class PdfPlug : public QObject
- private:
- bool convert(const QString& fn);
- QRectF getCBox(int box, int pgNum);
-- QString UnicodeParsedString(const GooString *s1);
-+ QString UnicodeParsedString(POPPLER_CONST GooString *s1);
-
- QList<PageItem*> Elements;
- double baseX, baseY;
-diff --git a/scribus/plugins/import/pdf/importpdfconfig.h b/scribus/plugins/import/pdf/importpdfconfig.h
-new file mode 100644
-index 0000000000..769594bcd0
---- /dev/null
-+++ b/scribus/plugins/import/pdf/importpdfconfig.h
-@@ -0,0 +1,24 @@
-+/*
-+For general Scribus (>=1.3.2) copyright and licensing information please refer
-+to the COPYING file provided with the program. Following this notice may exist
-+a copyright and/or license notice that predates the release of Scribus 1.3.2
-+for which a new license (GPL+exception) is in place.
-+*/
-+#ifndef IMPORTPDFCONFIG_H
-+#define IMPORTPDFCONFIG_H
-+
-+#include <poppler/cpp/poppler-version.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
-+
-+#endif
-diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp
-index 96847508ba..08ef72698a 100644
---- a/scribus/plugins/import/pdf/slaoutput.cpp
-+++ b/scribus/plugins/import/pdf/slaoutput.cpp
-@@ -4253,7 +4253,7 @@ void SlaOutputDev::pushGroup(QString maskName, GBool forSoftMask, GBool alpha, b
- m_groupStack.push(gElements);
- }
-
--QString SlaOutputDev::UnicodeParsedString(const GooString *s1)
-+QString SlaOutputDev::UnicodeParsedString(POPPLER_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 7317cae210..b8497d94de 100644
---- a/scribus/plugins/import/pdf/slaoutput.h
-+++ b/scribus/plugins/import/pdf/slaoutput.h
-@@ -1,341 +1,330 @@
--/*
--For general Scribus (>=1.3.2) copyright and licensing information please refer
--to the COPYING file provided with the program. Following this notice may exist
--a copyright and/or license notice that predates the release of Scribus 1.3.2
--for which a new license (GPL+exception) is in place.
--*/
--#ifndef SLAOUTPUT_H
--#define SLAOUTPUT_H
--
--#include <QString>
--#include <QTextStream>
--#include <QSizeF>
--#include <QBuffer>
--#include <QColor>
--#include <QBrush>
--#include <QPen>
--#include <QImage>
--#include <QList>
--#include <QTransform>
--#include <QStack>
--#include <QDebug>
--#include "fpointarray.h"
--#include "pageitem.h"
--#include "scribusdoc.h"
--#include "scribusview.h"
--#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>
--#include <poppler/Gfx.h>
--#include <poppler/GfxState.h>
--#include <poppler/Stream.h>
--#include <poppler/GfxFont.h>
--#include <poppler/Link.h>
--#include <poppler/PDFDoc.h>
--#include <poppler/Error.h>
--#include <poppler/Form.h>
--#include <poppler/Page.h>
--#include <poppler/Catalog.h>
--#include <poppler/CharCodeToUnicode.h>
--#include <poppler/FontEncodingTables.h>
--#include <poppler/splash/SplashFontFileID.h>
--#include <poppler/splash/SplashFontFile.h>
--#include <poppler/splash/SplashFontEngine.h>
--#include <poppler/splash/SplashFont.h>
--#include <poppler/splash/SplashMath.h>
--#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
--//------------------------------------------------------------------------
--
--class LinkSubmitForm: public LinkAction
--{
--public:
-- // Build a LinkImportData from an action dictionary.
-- LinkSubmitForm(Object *actionObj);
-- // Destructor.
-- virtual ~LinkSubmitForm();
-- // Was the LinkImportData created successfully?
-- virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
-- // Accessors.
-- virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
-- GooString *getFileName() { return fileName; }
-- int getFlags() { return m_flags; }
--private:
-- GooString *fileName; // file name
-- int m_flags;
--};
--
--//------------------------------------------------------------------------
--// LinkImportData
--//------------------------------------------------------------------------
--
--class LinkImportData: public LinkAction
--{
--public:
-- // Build a LinkImportData from an action dictionary.
-- LinkImportData(Object *actionObj);
-- // Destructor.
-- virtual ~LinkImportData();
-- // Was the LinkImportData created successfully?
-- virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
-- // Accessors.
-- virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
-- GooString *getFileName() { return fileName; }
--private:
-- GooString *fileName; // file name
--};
--//------------------------------------------------------------------------
--// SplashOutFontFileID
--//------------------------------------------------------------------------
--
--class SplashOutFontFileID: public SplashFontFileID
--{
--public:
--
-- SplashOutFontFileID(const Ref *rA) { r = *rA; }
-- ~SplashOutFontFileID() {}
-- GBool matches(SplashFontFileID *id)
-- {
-- return ((SplashOutFontFileID *)id)->r.num == r.num && ((SplashOutFontFileID *)id)->r.gen == r.gen;
-- }
--
--private:
-- Ref r;
--};
--
--
--class AnoOutputDev : public OutputDev
--{
--public:
-- AnoOutputDev(ScribusDoc* doc, QStringList *importedColors);
-- virtual ~AnoOutputDev();
-- GBool isOk() { return gTrue; }
-- virtual GBool upsideDown() { return gTrue; }
-- virtual GBool useDrawChar() { return gFalse; }
-- virtual GBool interpretType3Chars() { return gFalse; }
-- virtual GBool useTilingPatternFill() { return gFalse; }
-- virtual GBool useShadedFills(int type) { return gFalse; }
-- virtual GBool useFillColorStop() { return gFalse; }
-- virtual GBool useDrawForm() { return gFalse; }
-- virtual void stroke(GfxState *state);
-- virtual void eoFill(GfxState *state);
-- virtual void fill(GfxState *state);
-- virtual void drawString(GfxState *state, GooString *s);
--
-- QString CurrColorText;
-- QString CurrColorFill;
-- QString CurrColorStroke;
-- double m_fontSize;
-- GooString *m_fontName;
-- GooString *m_itemText;
--private:
-- QString getColor(GfxColorSpace *color_space, GfxColor *color, int *shade);
-- ScribusDoc* m_doc;
-- QStringList *m_importedColors;
--};
--
--
--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);
-- bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
-- bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
-- bool handleWidgetAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
-- void applyTextStyle(PageItem* ite, QString fontName, QString textColor, double fontSize);
-- void handleActions(PageItem* ite, AnnotWidget *ano);
-- void startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA);
--
-- GBool isOk() { return gTrue; }
-- virtual GBool upsideDown() { return gTrue; }
-- virtual GBool useDrawChar() { return gTrue; }
-- virtual GBool interpretType3Chars() { return gTrue; }
-- virtual GBool useTilingPatternFill() { return gTrue; }
-- virtual GBool useShadedFills(int type) { return type <= 7; }
-- virtual GBool useFillColorStop() { return gTrue; }
-- virtual GBool useDrawForm() { return gFalse; }
--// virtual GBool needClipToCropBox() { return gTrue; }
-- virtual void startPage(int pageNum, GfxState *, XRef *);
-- virtual void endPage();
-- // graphics state
-- virtual void saveState(GfxState *state);
-- virtual void restoreState(GfxState *state);
--
-- //----- path painting
-- virtual void stroke(GfxState *state);
-- virtual void fill(GfxState *state);
-- virtual void eoFill(GfxState *state);
-- GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep);
-- virtual GBool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/) { qDebug() << "Function Shaded Fill"; return gFalse; }
-- virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax);
-- virtual GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) { return (shading->getExtend0() == shading->getExtend1()); }
-- virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax);
-- virtual GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) { return (shading->getExtend0() == shading->getExtend1()); }
-- virtual GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading);
-- virtual GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading);
-- //----- path clipping
-- virtual void clip(GfxState *state);
-- virtual void eoClip(GfxState *state);
-- virtual void clipToStrokePath(GfxState * /*state*/) { qDebug() << "Clip to StrokePath"; }
-- virtual GBool deviceHasTextClip(GfxState *state) { return gFalse; }
--
-- // If current colorspace is pattern,
-- // does this device support text in pattern colorspace?
-- virtual GBool supportTextCSPattern(GfxState *state)
-- {
-- return state->getFillColorSpace()->getMode() == csPattern;
-- }
--
-- // If current colorspace is pattern,
-- // need this device special handling for masks in pattern colorspace?
-- virtual GBool fillMaskCSPattern(GfxState * state)
-- {
-- return state->getFillColorSpace()->getMode() == csPattern;
-- }
--
-- virtual void endMaskClip(GfxState *state) { qDebug() << "End Mask Clip"; }
--
-- //----- grouping operators
-- virtual void beginMarkedContent(char *name, Dict *properties);
-- virtual void beginMarkedContent(char *name, Object *dictRef);
-- virtual void endMarkedContent(GfxState *state);
-- virtual void markPoint(char *name);
-- virtual void markPoint(char *name, Dict *properties);
-- //----- image drawing
-- virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg);
-- virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg);
-- virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
-- int width, int height,
-- GfxImageColorMap *colorMap,
-- GBool interpolate,
-- Stream *maskStr,
-- int maskWidth, int maskHeight,
-- GfxImageColorMap *maskColorMap,
-- GBool maskInterpolate);
--
-- virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
-- int width, int height,
-- GfxImageColorMap *colorMap,
-- GBool interpolate,
-- Stream *maskStr,
-- int maskWidth, int maskHeight,
-- GBool maskInvert, GBool maskInterpolate); // { qDebug() << "Draw Masked Image"; }
--
-- //----- transparency groups and soft masks
-- virtual void beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace * /*blendingColorSpace*/, GBool /*isolated*/, GBool /*knockout*/, GBool /*forSoftMask*/);
-- virtual void paintTransparencyGroup(GfxState *state, double *bbox);
-- virtual void endTransparencyGroup(GfxState *state);
-- virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/);
-- virtual void clearSoftMask(GfxState * /*state*/);
--
-- virtual void updateFillColor(GfxState *state);
-- virtual void updateStrokeColor(GfxState *state);
-- virtual void updateFont(GfxState *state);
-- //----- text drawing
-- virtual void beginTextObject(GfxState *state);
-- virtual void endTextObject(GfxState *state);
-- 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*/);
-- virtual GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/);
-- virtual void endType3Char(GfxState * /*state*/);
-- virtual void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/);
-- virtual void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/);
-- //----- form XObjects
-- virtual void drawForm(Ref /*id*/) { qDebug() << "Draw Form"; }
-- //----- links
-- virtual void processLink(AnnotLink * /*link*/) { qDebug() << "Draw Link"; }
-- bool layersSetByOCG;
-- double cropOffsetX;
-- double cropOffsetY;
-- int rotate;
--
--private:
-- void getPenState(GfxState *state);
-- QString getColor(GfxColorSpace *color_space, GfxColor *color, int *shade);
-- QString getAnnotationColor(const AnnotColor *color);
-- QString convertPath(GfxPath *path);
-- int getBlendMode(GfxState *state);
-- void applyMask(PageItem *ite);
-- void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
-- QString UnicodeParsedString(const GooString *s1);
-- bool checkClip();
-- bool pathIsClosed;
-- QString CurrColorFill;
-- int CurrFillShade;
-- QString CurrColorStroke;
-- int CurrStrokeShade;
-- Qt::PenCapStyle PLineEnd;
-- Qt::PenJoinStyle PLineJoin;
-- QVector<double> DashValues;
-- double DashOffset;
-- QString Coords;
-- FPointArray m_currentClipPath;
-- QStack<FPointArray> m_clipPaths;
-- struct groupEntry
-- {
-- QList<PageItem*> Items;
-- GBool forSoftMask;
-- GBool isolated;
-- GBool alpha;
-- QString maskName;
-- bool inverted;
-- };
-- QStack<groupEntry> m_groupStack;
-- QString m_currentMask;
-- ScribusDoc* m_doc;
-- Selection* tmpSel;
-- QList<PageItem*> *m_Elements;
-- QStringList *m_importedColors;
-- QTransform m_ctm;
-- struct F3Entry
-- {
-- bool colored;
-- };
-- QStack<F3Entry> m_F3Stack;
-- struct mContent
-- {
-- QString name;
-- QString ocgName;
-- };
-- QStack<mContent> m_mcStack;
-- int inPattern;
-- int layerNum;
-- int currentLayer;
-- bool firstLayer;
-- int importerFlags;
-- int updateGUICounter;
-- XRef *xref; // xref table for current document
-- PDFDoc *pdfDoc;
-- Catalog *catalog;
-- SplashFontEngine *m_fontEngine;
-- SplashFont *m_font;
-- FormPageWidgets *m_formWidgets;
-- QHash<QString, QList<int> > m_radioMap;
-- QHash<int, PageItem*> m_radioButtons;
-- int m_actPage;
--};
--
--#endif
-+/*
-+For general Scribus (>=1.3.2) copyright and licensing information please refer
-+to the COPYING file provided with the program. Following this notice may exist
-+a copyright and/or license notice that predates the release of Scribus 1.3.2
-+for which a new license (GPL+exception) is in place.
-+*/
-+#ifndef SLAOUTPUT_H
-+#define SLAOUTPUT_H
-+
-+#include <QBuffer>
-+#include <QColor>
-+#include <QBrush>
-+#include <QDebug>
-+#include <QImage>
-+#include <QPen>
-+#include <QList>
-+#include <QSizeF>
-+#include <QStack>
-+#include <QString>
-+#include <QTextStream>
-+#include <QTransform>
-+
-+#include "fpointarray.h"
-+#include "importpdfconfig.h"
-+#include "pageitem.h"
-+#include "scribusdoc.h"
-+#include "scribusview.h"
-+#include "selection.h"
-+#include "vgradient.h"
-+
-+#include <poppler/goo/gtypes.h>
-+#include <poppler/Object.h>
-+#include <poppler/OutputDev.h>
-+#include <poppler/Gfx.h>
-+#include <poppler/GfxState.h>
-+#include <poppler/Stream.h>
-+#include <poppler/GfxFont.h>
-+#include <poppler/Link.h>
-+#include <poppler/PDFDoc.h>
-+#include <poppler/Error.h>
-+#include <poppler/Form.h>
-+#include <poppler/Page.h>
-+#include <poppler/Catalog.h>
-+#include <poppler/CharCodeToUnicode.h>
-+#include <poppler/FontEncodingTables.h>
-+#include <poppler/splash/SplashFontFileID.h>
-+#include <poppler/splash/SplashFontFile.h>
-+#include <poppler/splash/SplashFontEngine.h>
-+#include <poppler/splash/SplashFont.h>
-+#include <poppler/splash/SplashMath.h>
-+#include <poppler/splash/SplashPath.h>
-+#include <poppler/splash/SplashGlyphBitmap.h>
-+
-+//------------------------------------------------------------------------
-+// LinkSubmitData
-+//------------------------------------------------------------------------
-+
-+class LinkSubmitForm: public LinkAction
-+{
-+public:
-+ // Build a LinkImportData from an action dictionary.
-+ LinkSubmitForm(Object *actionObj);
-+ // Destructor.
-+ virtual ~LinkSubmitForm();
-+ // Was the LinkImportData created successfully?
-+ virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
-+ // Accessors.
-+ virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
-+ GooString *getFileName() { return fileName; }
-+ int getFlags() { return m_flags; }
-+private:
-+ GooString *fileName; // file name
-+ int m_flags;
-+};
-+
-+//------------------------------------------------------------------------
-+// LinkImportData
-+//------------------------------------------------------------------------
-+
-+class LinkImportData: public LinkAction
-+{
-+public:
-+ // Build a LinkImportData from an action dictionary.
-+ LinkImportData(Object *actionObj);
-+ // Destructor.
-+ virtual ~LinkImportData();
-+ // Was the LinkImportData created successfully?
-+ virtual GBool isOk() POPPLER_CONST { return fileName != NULL; }
-+ // Accessors.
-+ virtual LinkActionKind getKind() POPPLER_CONST { return actionUnknown; }
-+ GooString *getFileName() { return fileName; }
-+private:
-+ GooString *fileName; // file name
-+};
-+//------------------------------------------------------------------------
-+// SplashOutFontFileID
-+//------------------------------------------------------------------------
-+
-+class SplashOutFontFileID: public SplashFontFileID
-+{
-+public:
-+
-+ SplashOutFontFileID(const Ref *rA) { r = *rA; }
-+ ~SplashOutFontFileID() {}
-+ GBool matches(SplashFontFileID *id)
-+ {
-+ return ((SplashOutFontFileID *)id)->r.num == r.num && ((SplashOutFontFileID *)id)->r.gen == r.gen;
-+ }
-+
-+private:
-+ Ref r;
-+};
-+
-+
-+class AnoOutputDev : public OutputDev
-+{
-+public:
-+ AnoOutputDev(ScribusDoc* doc, QStringList *importedColors);
-+ virtual ~AnoOutputDev();
-+ GBool isOk() { return gTrue; }
-+ virtual GBool upsideDown() { return gTrue; }
-+ virtual GBool useDrawChar() { return gFalse; }
-+ virtual GBool interpretType3Chars() { return gFalse; }
-+ virtual GBool useTilingPatternFill() { return gFalse; }
-+ virtual GBool useShadedFills(int type) { return gFalse; }
-+ virtual GBool useFillColorStop() { return gFalse; }
-+ virtual GBool useDrawForm() { return gFalse; }
-+ virtual void stroke(GfxState *state);
-+ virtual void eoFill(GfxState *state);
-+ virtual void fill(GfxState *state);
-+ virtual void drawString(GfxState *state, GooString *s);
-+
-+ QString CurrColorText;
-+ QString CurrColorFill;
-+ QString CurrColorStroke;
-+ double m_fontSize;
-+ GooString *m_fontName;
-+ GooString *m_itemText;
-+private:
-+ QString getColor(GfxColorSpace *color_space, GfxColor *color, int *shade);
-+ ScribusDoc* m_doc;
-+ QStringList *m_importedColors;
-+};
-+
-+
-+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);
-+ bool handleTextAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
-+ bool handleLinkAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
-+ bool handleWidgetAnnot(Annot* annota, double xCoor, double yCoor, double width, double height);
-+ void applyTextStyle(PageItem* ite, QString fontName, QString textColor, double fontSize);
-+ void handleActions(PageItem* ite, AnnotWidget *ano);
-+ void startDoc(PDFDoc *doc, XRef *xrefA, Catalog *catA);
-+
-+ GBool isOk() { return gTrue; }
-+ virtual GBool upsideDown() { return gTrue; }
-+ virtual GBool useDrawChar() { return gTrue; }
-+ virtual GBool interpretType3Chars() { return gTrue; }
-+ virtual GBool useTilingPatternFill() { return gTrue; }
-+ virtual GBool useShadedFills(int type) { return type <= 7; }
-+ virtual GBool useFillColorStop() { return gTrue; }
-+ virtual GBool useDrawForm() { return gFalse; }
-+// virtual GBool needClipToCropBox() { return gTrue; }
-+ virtual void startPage(int pageNum, GfxState *, XRef *);
-+ virtual void endPage();
-+ // graphics state
-+ virtual void saveState(GfxState *state);
-+ virtual void restoreState(GfxState *state);
-+
-+ //----- path painting
-+ virtual void stroke(GfxState *state);
-+ virtual void fill(GfxState *state);
-+ virtual void eoFill(GfxState *state);
-+ GBool tilingPatternFill(GfxState *state, Gfx *gfx, Catalog *cat, Object *str, double *pmat, int paintType, int tilingType, Dict *resDict, double *mat, double *bbox, int x0, int y0, int x1, int y1, double xStep, double yStep);
-+ virtual GBool functionShadedFill(GfxState * /*state*/, GfxFunctionShading * /*shading*/) { qDebug() << "Function Shaded Fill"; return gFalse; }
-+ virtual GBool axialShadedFill(GfxState *state, GfxAxialShading *shading, double tMin, double tMax);
-+ virtual GBool axialShadedSupportExtend(GfxState *state, GfxAxialShading *shading) { return (shading->getExtend0() == shading->getExtend1()); }
-+ virtual GBool radialShadedFill(GfxState *state, GfxRadialShading *shading, double sMin, double sMax);
-+ virtual GBool radialShadedSupportExtend(GfxState *state, GfxRadialShading *shading) { return (shading->getExtend0() == shading->getExtend1()); }
-+ virtual GBool gouraudTriangleShadedFill(GfxState *state, GfxGouraudTriangleShading *shading);
-+ virtual GBool patchMeshShadedFill(GfxState *state, GfxPatchMeshShading *shading);
-+ //----- path clipping
-+ virtual void clip(GfxState *state);
-+ virtual void eoClip(GfxState *state);
-+ virtual void clipToStrokePath(GfxState * /*state*/) { qDebug() << "Clip to StrokePath"; }
-+ virtual GBool deviceHasTextClip(GfxState *state) { return gFalse; }
-+
-+ // If current colorspace is pattern,
-+ // does this device support text in pattern colorspace?
-+ virtual GBool supportTextCSPattern(GfxState *state)
-+ {
-+ return state->getFillColorSpace()->getMode() == csPattern;
-+ }
-+
-+ // If current colorspace is pattern,
-+ // need this device special handling for masks in pattern colorspace?
-+ virtual GBool fillMaskCSPattern(GfxState * state)
-+ {
-+ return state->getFillColorSpace()->getMode() == csPattern;
-+ }
-+
-+ virtual void endMaskClip(GfxState *state) { qDebug() << "End Mask Clip"; }
-+
-+ //----- grouping operators
-+ virtual void beginMarkedContent(char *name, Dict *properties);
-+ virtual void beginMarkedContent(char *name, Object *dictRef);
-+ virtual void endMarkedContent(GfxState *state);
-+ virtual void markPoint(char *name);
-+ virtual void markPoint(char *name, Dict *properties);
-+ //----- image drawing
-+ virtual void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg);
-+ virtual void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg);
-+ virtual void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
-+ int width, int height,
-+ GfxImageColorMap *colorMap,
-+ GBool interpolate,
-+ Stream *maskStr,
-+ int maskWidth, int maskHeight,
-+ GfxImageColorMap *maskColorMap,
-+ GBool maskInterpolate);
-+
-+ virtual void drawMaskedImage(GfxState *state, Object *ref, Stream *str,
-+ int width, int height,
-+ GfxImageColorMap *colorMap,
-+ GBool interpolate,
-+ Stream *maskStr,
-+ int maskWidth, int maskHeight,
-+ GBool maskInvert, GBool maskInterpolate); // { qDebug() << "Draw Masked Image"; }
-+
-+ //----- transparency groups and soft masks
-+ virtual void beginTransparencyGroup(GfxState *state, double *bbox, GfxColorSpace * /*blendingColorSpace*/, GBool /*isolated*/, GBool /*knockout*/, GBool /*forSoftMask*/);
-+ virtual void paintTransparencyGroup(GfxState *state, double *bbox);
-+ virtual void endTransparencyGroup(GfxState *state);
-+ virtual void setSoftMask(GfxState * /*state*/, double * /*bbox*/, GBool /*alpha*/, Function * /*transferFunc*/, GfxColor * /*backdropColor*/);
-+ virtual void clearSoftMask(GfxState * /*state*/);
-+
-+ virtual void updateFillColor(GfxState *state);
-+ virtual void updateStrokeColor(GfxState *state);
-+ virtual void updateFont(GfxState *state);
-+ //----- text drawing
-+ virtual void beginTextObject(GfxState *state);
-+ virtual void endTextObject(GfxState *state);
-+ 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*/);
-+ virtual GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/);
-+ virtual void endType3Char(GfxState * /*state*/);
-+ virtual void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/);
-+ virtual void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/);
-+ //----- form XObjects
-+ virtual void drawForm(Ref /*id*/) { qDebug() << "Draw Form"; }
-+ //----- links
-+ virtual void processLink(AnnotLink * /*link*/) { qDebug() << "Draw Link"; }
-+ bool layersSetByOCG;
-+ double cropOffsetX;
-+ double cropOffsetY;
-+ int rotate;
-+
-+private:
-+ void getPenState(GfxState *state);
-+ QString getColor(GfxColorSpace *color_space, GfxColor *color, int *shade);
-+ QString getAnnotationColor(const AnnotColor *color);
-+ QString convertPath(GfxPath *path);
-+ int getBlendMode(GfxState *state);
-+ void applyMask(PageItem *ite);
-+ void pushGroup(QString maskName = "", GBool forSoftMask = gFalse, GBool alpha = gFalse, bool inverted = false);
-+ QString UnicodeParsedString(POPPLER_CONST GooString *s1);
-+ bool checkClip();
-+ bool pathIsClosed;
-+ QString CurrColorFill;
-+ int CurrFillShade;
-+ QString CurrColorStroke;
-+ int CurrStrokeShade;
-+ Qt::PenCapStyle PLineEnd;
-+ Qt::PenJoinStyle PLineJoin;
-+ QVector<double> DashValues;
-+ double DashOffset;
-+ QString Coords;
-+ FPointArray m_currentClipPath;
-+ QStack<FPointArray> m_clipPaths;
-+ struct groupEntry
-+ {
-+ QList<PageItem*> Items;
-+ GBool forSoftMask;
-+ GBool isolated;
-+ GBool alpha;
-+ QString maskName;
-+ bool inverted;
-+ };
-+ QStack<groupEntry> m_groupStack;
-+ QString m_currentMask;
-+ ScribusDoc* m_doc;
-+ Selection* tmpSel;
-+ QList<PageItem*> *m_Elements;
-+ QStringList *m_importedColors;
-+ QTransform m_ctm;
-+ struct F3Entry
-+ {
-+ bool colored;
-+ };
-+ QStack<F3Entry> m_F3Stack;
-+ struct mContent
-+ {
-+ QString name;
-+ QString ocgName;
-+ };
-+ QStack<mContent> m_mcStack;
-+ int inPattern;
-+ int layerNum;
-+ int currentLayer;
-+ bool firstLayer;
-+ int importerFlags;
-+ int updateGUICounter;
-+ XRef *xref; // xref table for current document
-+ PDFDoc *pdfDoc;
-+ Catalog *catalog;
-+ SplashFontEngine *m_fontEngine;
-+ SplashFont *m_font;
-+ FormPageWidgets *m_formWidgets;
-+ QHash<QString, QList<int> > m_radioMap;
-+ QHash<int, PageItem*> m_radioButtons;
-+ int m_actPage;
-+};
-+
-+#endif
diff --git a/7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch b/7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch
deleted file mode 100644
index f6b3c1b..0000000
--- a/7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch
+++ /dev/null
@@ -1,243 +0,0 @@
-From 7d4ceeb5cac32287769e3c0238699e0b3e56c24d Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-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);
diff --git a/8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch b/8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch
deleted file mode 100644
index bc0df95..0000000
--- a/8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-From 8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-Date: Sat, 22 Sep 2018 23:11:15 +0000
-Subject: [PATCH] Fix failure to build PDF import plugin with poppler 0.69
-
-git-svn-id: svn://scribus.net/trunk/Scribus@22703 11d20701-8431-0410-a711-e3c959e3b870
----
- scribus/plugins/import/pdf/importpdf.cpp | 40 +++++++++++++++++++-----
- 1 file changed, 32 insertions(+), 8 deletions(-)
-
-diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
-index a5ce57fdfc..e3690cca8b 100644
---- a/scribus/plugins/import/pdf/importpdf.cpp
-+++ b/scribus/plugins/import/pdf/importpdf.cpp
-@@ -548,10 +548,21 @@ bool PdfPlug::convert(const QString& fn)
- }
- else
- {
-- GooList *ocgs;
-- int i;
-- ocgs = ocg->getOCGs ();
-- for (i = 0; i < ocgs->getLength (); ++i)
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 69, 0)
-+ const auto& ocgs = ocg->getOCGs ();
-+ for (const auto& ocg : ocgs)
-+ {
-+ OptionalContentGroup *oc = ocg.second.get();
-+ QString ocgName = UnicodeParsedString(oc->getName());
-+ if (!ocgNames.contains(ocgName))
-+ {
-+ ocgGroups.prepend(oc);
-+ ocgNames.append(ocgName);
-+ }
-+ }
-+#else
-+ GooList *ocgs = ocg->getOCGs ();
-+ for (int i = 0; i < ocgs->getLength (); ++i)
- {
- OptionalContentGroup *oc = (OptionalContentGroup *)ocgs->get(i);
- QString ocgName = UnicodeParsedString(oc->getName());
-@@ -561,15 +572,27 @@ bool PdfPlug::convert(const QString& fn)
- ocgNames.append(ocgName);
- }
- }
-+#endif
- }
- }
- }
- else
- {
-- GooList *ocgs;
-- int i;
-- ocgs = ocg->getOCGs ();
-- for (i = 0; i < ocgs->getLength (); ++i)
-+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 69, 0)
-+ const auto& ocgs = ocg->getOCGs ();
-+ for (const auto& ocg : ocgs)
-+ {
-+ OptionalContentGroup *oc = ocg.second.get();
-+ QString ocgName = UnicodeParsedString(oc->getName());
-+ if (!ocgNames.contains(ocgName))
-+ {
-+ ocgGroups.prepend(oc);
-+ ocgNames.append(ocgName);
-+ }
-+ }
-+#else
-+ GooList *ocgs = ocg->getOCGs ();
-+ for (int i = 0; i < ocgs->getLength (); ++i)
- {
- OptionalContentGroup *oc = (OptionalContentGroup *)ocgs->get(i);
- QString ocgName = UnicodeParsedString(oc->getName());
-@@ -579,6 +602,7 @@ bool PdfPlug::convert(const QString& fn)
- ocgNames.append(ocgName);
- }
- }
-+#endif
- }
- }
- }
diff --git a/d867ec3c386baaed1b8e076dd70b278863411480.patch b/d867ec3c386baaed1b8e076dd70b278863411480.patch
deleted file mode 100644
index 1c35064..0000000
--- a/d867ec3c386baaed1b8e076dd70b278863411480.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From d867ec3c386baaed1b8e076dd70b278863411480 Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-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;
diff --git a/fix-15289-2.patch b/fix-15289-2.patch
deleted file mode 100644
index 8e5d65a..0000000
--- a/fix-15289-2.patch
+++ /dev/null
@@ -1,243 +0,0 @@
-From 7d4ceeb5cac32287769e3c0238699e0b3e56c24d Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-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);
diff --git a/fix-15289.patch b/fix-15289.patch
deleted file mode 100644
index 1c35064..0000000
--- a/fix-15289.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From d867ec3c386baaed1b8e076dd70b278863411480 Mon Sep 17 00:00:00 2001
-From: Jean Ghali <jghali@libertysurf.fr>
-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;
diff --git a/scribus-1.5.4-fix-warnings.patch b/scribus-1.5.4-fix-warnings.patch
deleted file mode 100644
index c090305..0000000
--- a/scribus-1.5.4-fix-warnings.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-diff -up scribus-1.5.4/scribus/iconmanager.cpp.omv~ scribus-1.5.4/scribus/iconmanager.cpp
---- scribus-1.5.4/scribus/iconmanager.cpp.omv~ 2018-10-11 12:42:28.147175023 +0200
-+++ scribus-1.5.4/scribus/iconmanager.cpp 2018-10-11 12:42:45.431300401 +0200
-@@ -179,7 +179,7 @@ void IconManager::readIconConfigFiles()
- )
- {
- m_backupSetBasename=m_activeSetBasename;
-- m_backupSetVersion=m_backupSetVersion;
-+ m_backupSetVersion=m_activeSetVersion;
- m_activeSetBasename=isd.baseName;
- m_activeSetVersion=isd.activeversion;
- //qDebug()<<"backupSetBasename"<<m_backupSetBasename<<"activeSetBasename"<<m_activeSetBasename;
-diff -up scribus-1.5.4/scribus/ui/vruler.cpp.omv~ scribus-1.5.4/scribus/ui/vruler.cpp
---- scribus-1.5.4/scribus/ui/vruler.cpp.omv~ 2018-10-11 12:43:02.701424477 +0200
-+++ scribus-1.5.4/scribus/ui/vruler.cpp 2018-10-11 12:43:34.760651755 +0200
-@@ -137,7 +137,6 @@ void Vruler::paintEvent(QPaintEvent *e)
- tx += QChar(0xBD);
- if ((frac > 0.74) && (frac < 0.76))
- tx += QChar(0xBE);
-- tx = tx;
- break;
- case SC_P:
- case SC_C:
diff --git a/scribus-1.5.4-poppler-0.72.patch b/scribus-1.5.4-poppler-0.72.patch
deleted file mode 100644
index 18b3ad2..0000000
--- a/scribus-1.5.4-poppler-0.72.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-diff -up scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.cpp.omv~ scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.cpp
---- scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.cpp.omv~ 2019-02-04 02:09:16.666464727 +0100
-+++ scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.cpp 2019-02-04 02:09:33.801718333 +0100
-@@ -223,7 +223,7 @@ QString AnoOutputDev::getColor(GfxColorS
- else if (color_space->getMode() == csSeparation)
- {
- GfxCMYK cmyk;
-- QString name = QString(((GfxSeparationColorSpace*)color_space)->getName()->getCString());
-+ QString name = QString(((GfxSeparationColorSpace*)color_space)->getName()->c_str());
- double Cc, Mc, Yc, Kc;
- bool isRegistrationColor = (name == "All");
- if (!isRegistrationColor)
-@@ -3183,13 +3183,13 @@ void SlaOutputDev::beginMarkedContent(ch
- #if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 58, 0)
- Object obj = properties->lookup((char*) "Title");
- if (obj.isString())
-- lName = QString(obj.getString()->getCString());
-+ lName = QString(obj.getString()->c_str());
- #else
- Object obj;
- if (properties->lookup((char*)"Title", &obj))
- {
- if (obj.isString())
-- lName = QString(obj.getString()->getCString());
-+ lName = QString(obj.getString()->c_str());
- obj.free();
- }
- #endif
-@@ -3348,7 +3348,7 @@ void SlaOutputDev::updateFont(GfxState *
-
- if (!(fontLoc = gfxFont->locateFont(xref, 0))) {
- error(errSyntaxError, -1, "Couldn't find a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString()
-+ gfxFont->getName() ? gfxFont->getName()->c_str()
- : "(unnamed)");
- goto err2;
- }
-@@ -3381,7 +3381,7 @@ void SlaOutputDev::updateFont(GfxState *
- (const char **)((Gfx8BitFont *)gfxFont)->getEncoding())))
- {
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString()
-+ gfxFont->getName() ? gfxFont->getName()->c_str()
- : "(unnamed)");
- goto err2;
- }
-@@ -3393,7 +3393,7 @@ void SlaOutputDev::updateFont(GfxState *
- (const char **)((Gfx8BitFont *)gfxFont)->getEncoding())))
- {
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString()
-+ gfxFont->getName() ? gfxFont->getName()->c_str()
- : "(unnamed)");
- goto err2;
- }
-@@ -3405,7 +3405,7 @@ void SlaOutputDev::updateFont(GfxState *
- (const char **)((Gfx8BitFont *)gfxFont)->getEncoding())))
- {
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString()
-+ gfxFont->getName() ? gfxFont->getName()->c_str()
- : "(unnamed)");
- goto err2;
- }
-@@ -3413,7 +3413,7 @@ void SlaOutputDev::updateFont(GfxState *
- case fontTrueType:
- case fontTrueTypeOT:
- if (fileName)
-- ff = FoFiTrueType::load(fileName->getCString());
-+ ff = FoFiTrueType::load(fileName->c_str());
- else
- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
- if (ff) {
-@@ -3430,7 +3430,7 @@ void SlaOutputDev::updateFont(GfxState *
- codeToGID, n)))
- {
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString()
-+ gfxFont->getName() ? gfxFont->getName()->c_str()
- : "(unnamed)");
- goto err2;
- }
-@@ -3442,7 +3442,7 @@ void SlaOutputDev::updateFont(GfxState *
- fontsrc)))
- {
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString()
-+ gfxFont->getName() ? gfxFont->getName()->c_str()
- : "(unnamed)");
- goto err2;
- }
-@@ -3463,7 +3463,7 @@ void SlaOutputDev::updateFont(GfxState *
- codeToGID, n)))
- {
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString()
-+ gfxFont->getName() ? gfxFont->getName()->c_str()
- : "(unnamed)");
- goto err2;
- }
-@@ -3481,7 +3481,7 @@ void SlaOutputDev::updateFont(GfxState *
- }
- } else {
- if (fileName)
-- ff = FoFiTrueType::load(fileName->getCString());
-+ ff = FoFiTrueType::load(fileName->c_str());
- else
- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
- if (! ff)
-@@ -3495,7 +3495,7 @@ void SlaOutputDev::updateFont(GfxState *
- codeToGID, n, faceIndex)))
- {
- error(errSyntaxError, -1, "Couldn't create a font for '{0:s}'",
-- gfxFont->getName() ? gfxFont->getName()->getCString()
-+ gfxFont->getName() ? gfxFont->getName()->c_str()
- : "(unnamed)");
- goto err2;
- }
-@@ -3597,7 +3597,7 @@ void SlaOutputDev::updateFont(GfxState *
- }
- if (!dfp)
- {
-- // error(-1, "Couldn't find a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ // error(-1, "Couldn't find a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
- goto err2;
- }
- switch (dfp->kind)
-@@ -3624,28 +3624,28 @@ void SlaOutputDev::updateFont(GfxState *
- case fontType1:
- if (!(fontFile = m_fontEngine->loadType1Font( id, fontsrc, ((Gfx8BitFont *)gfxFont)->getEncoding())))
- {
-- // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
- goto err2;
- }
- break;
- case fontType1C:
- if (!(fontFile = m_fontEngine->loadType1CFont( id, fontsrc, ((Gfx8BitFont *)gfxFont)->getEncoding())))
- {
-- // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
- goto err2;
- }
- break;
- case fontType1COT:
- if (!(fontFile = m_fontEngine->loadOpenTypeT1CFont( id, fontsrc, ((Gfx8BitFont *)gfxFont)->getEncoding())))
- {
-- // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
- goto err2;
- }
- break;
- case fontTrueType:
- case fontTrueTypeOT:
- if (fileName)
-- ff = FoFiTrueType::load(fileName->getCString());
-+ ff = FoFiTrueType::load(fileName->c_str());
- else
- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
- if (ff)
-@@ -3661,7 +3661,7 @@ void SlaOutputDev::updateFont(GfxState *
- }
- if (!(fontFile = m_fontEngine->loadTrueTypeFont( id, fontsrc, codeToGID, n)))
- {
-- // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
- goto err2;
- }
- break;
-@@ -3669,14 +3669,14 @@ void SlaOutputDev::updateFont(GfxState *
- case fontCIDType0C:
- if (!(fontFile = m_fontEngine->loadCIDFont( id, fontsrc)))
- {
-- // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
- goto err2;
- }
- break;
- case fontCIDType0COT:
- if (!(fontFile = m_fontEngine->loadOpenTypeCFFFont( id, fontsrc)))
- {
-- // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
- goto err2;
- }
- break;
-@@ -3696,7 +3696,7 @@ void SlaOutputDev::updateFont(GfxState *
- else
- {
- if (fileName)
-- ff = FoFiTrueType::load(fileName->getCString());
-+ ff = FoFiTrueType::load(fileName->c_str());
- else
- ff = FoFiTrueType::make(tmpBuf, tmpBufLen);
- if (!ff)
-@@ -3706,7 +3706,7 @@ void SlaOutputDev::updateFont(GfxState *
- }
- if (!(fontFile = m_fontEngine->loadTrueTypeFont( id, fontsrc, codeToGID, n, faceIndex)))
- {
-- // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->getCString() : "(unnamed)");
-+ // error(-1, "Couldn't create a font for '%s'", gfxFont->getName() ? gfxFont->getName()->c_str() : "(unnamed)");
- goto err2;
- }
- break;
-@@ -3985,7 +3985,7 @@ QString SlaOutputDev::getColor(GfxColorS
- else if (color_space->getMode() == csSeparation)
- {
- GfxCMYK cmyk;
-- QString name = QString(((GfxSeparationColorSpace*)color_space)->getName()->getCString());
-+ QString name = QString(((GfxSeparationColorSpace*)color_space)->getName()->c_str());
- double Cc, Mc, Yc, Kc;
- bool isRegistrationColor = (name == "All");
- if (!isRegistrationColor)
diff --git a/scribus-1.5.4-poppler-0.74.patch b/scribus-1.5.4-poppler-0.74.patch
deleted file mode 100644
index 89c48d0..0000000
--- a/scribus-1.5.4-poppler-0.74.patch
+++ /dev/null
@@ -1,132 +0,0 @@
-diff -up scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.cpp.omv~ scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.cpp
---- scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.cpp.omv~ 2019-02-12 14:06:32.701982499 +0100
-+++ scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.cpp 2019-02-12 14:07:04.668618223 +0100
-@@ -2438,7 +2438,7 @@ void SlaOutputDev::drawImageMask(GfxStat
- int x, y, i, bit;
- unsigned char *dest = 0;
- unsigned char *buffer;
-- Guchar *pix;
-+ unsigned char *pix;
- ImageStream * imgStr = new ImageStream(str, width, 1, 1);
- imgStr->reset();
- #ifdef WORDS_BIGENDIAN
-@@ -2605,7 +2605,7 @@ void SlaOutputDev::drawSoftMaskedImage(G
- for (int y = 0; y < height; y++)
- {
- dest = (unsigned int *)(buffer + y * 4 * width);
-- Guchar * pix = imgStr->getLine();
-+ unsigned char * pix = imgStr->getLine();
- colorMap->getRGBLine(pix, dest, width);
- }
- image = new QImage(buffer, width, height, QImage::Format_RGB32);
-@@ -2618,13 +2618,13 @@ void SlaOutputDev::drawSoftMaskedImage(G
- }
- ImageStream *mskStr = new ImageStream(maskStr, maskWidth, maskColorMap->getNumPixelComps(), maskColorMap->getBits());
- mskStr->reset();
-- Guchar *mdest = 0;
-+ unsigned char *mdest = 0;
- unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight];
- memset(mbuffer, 0, maskWidth * maskHeight);
- for (int y = 0; y < maskHeight; y++)
- {
-- mdest = (Guchar *)(mbuffer + y * maskWidth);
-- Guchar * pix = mskStr->getLine();
-+ mdest = (unsigned char *)(mbuffer + y * maskWidth);
-+ unsigned char * pix = mskStr->getLine();
- maskColorMap->getGrayLine(pix, mdest, maskWidth);
- }
- if ((maskWidth != width) || (maskHeight != height))
-@@ -2747,7 +2747,7 @@ void SlaOutputDev::drawMaskedImage(GfxSt
- for (int y = 0; y < height; y++)
- {
- dest = (unsigned int *)(buffer + y * 4 * width);
-- Guchar * pix = imgStr->getLine();
-+ unsigned char * pix = imgStr->getLine();
- colorMap->getRGBLine(pix, dest, width);
- }
- image = new QImage(buffer, width, height, QImage::Format_RGB32);
-@@ -2760,14 +2760,14 @@ void SlaOutputDev::drawMaskedImage(GfxSt
- }
- ImageStream *mskStr = new ImageStream(maskStr, maskWidth, 1, 1);
- mskStr->reset();
-- Guchar *mdest = 0;
-+ unsigned char *mdest = 0;
- int invert_bit = maskInvert ? 1 : 0;
- unsigned char * mbuffer = new unsigned char[maskWidth * maskHeight];
- memset(mbuffer, 0, maskWidth * maskHeight);
- for (int y = 0; y < maskHeight; y++)
- {
-- mdest = (Guchar *)(mbuffer + y * maskWidth);
-- Guchar * pix = mskStr->getLine();
-+ mdest = (unsigned char *)(mbuffer + y * maskWidth);
-+ unsigned char * pix = mskStr->getLine();
- for (int x = 0; x < maskWidth; x++)
- {
- if (pix[x] ^ invert_bit)
-@@ -2898,7 +2898,7 @@ void SlaOutputDev::drawImage(GfxState *s
- for (int y = 0; y < height; y++)
- {
- QRgb *s = (QRgb*)(image->scanLine(y));
-- Guchar *pix = imgStr->getLine();
-+ unsigned char *pix = imgStr->getLine();
- for (int x = 0; x < width; x++)
- {
- GfxRGB rgb;
-@@ -2926,7 +2926,7 @@ void SlaOutputDev::drawImage(GfxState *s
- for (int y = 0; y < height; y++)
- {
- QRgb *s = (QRgb*)(image->scanLine(y));
-- Guchar *pix = imgStr->getLine();
-+ unsigned char *pix = imgStr->getLine();
- for (int x = 0; x < width; x++)
- {
- if (colorMap->getNumPixelComps() == 4)
-@@ -3477,7 +3477,7 @@ void SlaOutputDev::updateFont(GfxState *
- if (n) {
- codeToGID = (int *)gmallocn(n, sizeof(int));
- memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(),
-- n * sizeof(Gushort));
-+ n * sizeof(unsigned short));
- }
- } else {
- if (fileName)
-@@ -3552,7 +3552,7 @@ void SlaOutputDev::updateFont(GfxState *
- GooString *fileName;
- char *tmpBuf;
- int tmpBufLen;
-- Gushort *codeToGID;
-+ unsigned short *codeToGID;
- DisplayFontParam *dfp;
- double *textMat;
- double m11, m12, m21, m22, fontSize;
-@@ -3689,8 +3689,8 @@ void SlaOutputDev::updateFont(GfxState *
- n = ((GfxCIDFont *)gfxFont)->getCIDToGIDLen();
- if (n)
- {
-- codeToGID = (Gushort *)gmallocn(n, sizeof(Gushort));
-- memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(Gushort));
-+ codeToGID = (unsigned short *)gmallocn(n, sizeof(unsigned short));
-+ memcpy(codeToGID, ((GfxCIDFont *)gfxFont)->getCIDToGID(), n * sizeof(unsigned short));
- }
- }
- else
-@@ -3768,7 +3768,7 @@ void SlaOutputDev::drawChar(GfxState *st
- qPath.setFillRule(Qt::WindingFill);
- for (int i = 0; i < fontPath->getLength(); ++i)
- {
-- Guchar f;
-+ unsigned char f;
- fontPath->getPoint(i, &x1, &y1, &f);
- if (f & splashPathFirst)
- qPath.moveTo(x1,y1);
-diff -up scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.h.omv~ scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.h
---- scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.h.omv~ 2019-02-12 14:05:55.846212161 +0100
-+++ scribus-1.5.4/scribus/plugins/import/pdf/slaoutput.h 2019-02-12 14:05:58.167261906 +0100
-@@ -28,7 +28,6 @@ for which a new license (GPL+exception)
- #include "selection.h"
- #include "vgradient.h"
-
--#include <poppler/goo/gtypes.h>
- #include <poppler/Object.h>
- #include <poppler/OutputDev.h>
- #include <poppler/Gfx.h>
diff --git a/scribus-1.5.4-poppler-69.patch b/scribus-1.5.4-poppler-69.patch
deleted file mode 100644
index 53e01e9..0000000
--- a/scribus-1.5.4-poppler-69.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-diff -up scribus-1.5.4/scribus/plugins/import/pdf/importpdf.cpp.omv~ scribus-1.5.4/scribus/plugins/import/pdf/importpdf.cpp
---- scribus-1.5.4/scribus/plugins/import/pdf/importpdf.cpp.omv~ 2018-10-11 12:47:45.405315500 +0200
-+++ scribus-1.5.4/scribus/plugins/import/pdf/importpdf.cpp 2018-10-11 13:10:49.745005104 +0200
-@@ -556,12 +556,10 @@ bool PdfPlug::convert(const QString& fn)
- }
- else
- {
-- GooList *ocgs;
-- int i;
-- ocgs = ocg->getOCGs ();
-- for (i = 0; i < ocgs->getLength (); ++i)
-+ const auto &ocgs = ocg->getOCGs ();
-+ for (const auto &ocg : ocgs)
- {
-- OptionalContentGroup *oc = (OptionalContentGroup *)ocgs->get(i);
-+ OptionalContentGroup *oc = ocg.second.get();
- QString ocgName = UnicodeParsedString(oc->getName());
- if (!ocgNames.contains(ocgName))
- {
-@@ -574,12 +572,10 @@ bool PdfPlug::convert(const QString& fn)
- }
- else
- {
-- GooList *ocgs;
-- int i;
-- ocgs = ocg->getOCGs ();
-- for (i = 0; i < ocgs->getLength (); ++i)
-+ const auto &ocgs = ocg->getOCGs ();
-+ for (const auto &ocg : ocgs)
- {
-- OptionalContentGroup *oc = (OptionalContentGroup *)ocgs->get(i);
-+ OptionalContentGroup *oc = ocg.second.get();
- QString ocgName = UnicodeParsedString(oc->getName());
- if (!ocgNames.contains(ocgName))
- {
diff --git a/scribus-poppler-0.70.patch b/scribus-poppler-0.70.patch
deleted file mode 100644
index c2c4531..0000000
--- a/scribus-poppler-0.70.patch
+++ /dev/null
@@ -1,277 +0,0 @@
-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);
diff --git a/scribus.spec b/scribus.spec
index 9426b5e..541c25e 100644
--- a/scribus.spec
+++ b/scribus.spec
@@ -1,22 +1,12 @@
-%define snapshot 20190705
Summary: Scribus - Open Source Page Layout
Name: scribus
-Version: %{snapshot}
-Release: 8
+Version: 1.5.5
+Release: 2
License: GPLv2+
Group: Office
Url: http://www.scribus.net/
-Source0: http://ignum.dl.sourceforge.net/project/%name/%name/%version/%name-%version.tar.xz
+Source0: https://downloads.sourceforge.net/project/scribus/scribus-devel/%{version}/scribus-%{version}.tar.xz
Source10: scribus.rpmlintrc
-#Patch3: scribus-1.5.4-fix-warnings.patch
-#Patch4: https://github.com/scribusproject/scribus/commit/d867ec3c386baaed1b8e076dd70b278863411480.patch
-#Patch5: https://github.com/scribusproject/scribus/commit/7d4ceeb5cac32287769e3c0238699e0b3e56c24d.patch
-#Patch6: https://github.com/scribusproject/scribus/commit/76561c1a55cd07c268f8f2b2fea888532933700b.patch
-#Patch7: https://github.com/scribusproject/scribus/commit/8e05d26c19097ac2ad5b4ebbf40a3771ee6faf9c.patch
-#Patch8: scribus-poppler-0.70.patch
-#Patch9: https://github.com/scribusproject/scribus/commit/58b2a685e6b9ef437435ad119912d1e3ea9d2eae.patch
-#Patch10: scribus-1.5.4-poppler-0.72.patch
-#Patch11: scribus-1.5.4-poppler-0.74.patch
BuildRequires: cmake
BuildRequires: ninja
BuildRequires: desktop-file-utils