r23289 by jghali - Use same mechanism as with previous poppler versions to support change of constness in function signatures
scribus-commit
scribus-commit at lists.scribus.net
Tue Oct 29 01:55:42 UTC 2019
Author: jghali
Date: Tue Oct 29 01:55:42 2019
New Revision: 23289
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23289
Log:
Use same mechanism as with previous poppler versions to support change of constness in function signatures
Modified:
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/importpdfconfig.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23289&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 29 01:55:42 2019
@@ -52,4 +52,10 @@
#define POPPLER_REF
#endif
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 82, 0)
+#define POPPLER_CONST_082 const
+#else
+#define POPPLER_CONST_082
#endif
+
+#endif
Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23289&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 29 01:55:42 2019
@@ -1606,7 +1606,7 @@
ite->PoLine = out.copy();
ite->ClipEdited = true;
ite->FrameType = 3;
- ite->setWidthHeight(wh.x(),wh.y());
+ ite->setWidthHeight(wh.x(), wh.y());
m_doc->adjustItemSize(ite);
if (m_Elements->count() != 0)
{
@@ -2471,7 +2471,7 @@
out.translate(-ite->xPos(), -ite->yPos());
ite->PoLine = out.copy();
FPoint wh = getMaxClipF(&ite->PoLine);
- ite->setWidthHeight(wh.x(),wh.y());
+ ite->setWidthHeight(wh.x(), wh.y());
ite->setTextFlowMode(PageItem::TextFlowDisabled);
ite->ScaleType = true;
m_doc->adjustItemSize(ite);
@@ -2613,7 +2613,7 @@
out.translate(-ite->xPos(), -ite->yPos());
ite->PoLine = out.copy();
FPoint wh = getMaxClipF(&ite->PoLine);
- ite->setWidthHeight(wh.x(),wh.y());
+ ite->setWidthHeight(wh.x(), wh.y());
ite->setTextFlowMode(PageItem::TextFlowDisabled);
ite->ScaleType = true;
m_doc->adjustItemSize(ite);
@@ -2762,7 +2762,7 @@
out.translate(-ite->xPos(), -ite->yPos());
ite->PoLine = out.copy();
FPoint wh = getMaxClipF(&ite->PoLine);
- ite->setWidthHeight(wh.x(),wh.y());
+ ite->setWidthHeight(wh.x(), wh.y());
ite->setTextFlowMode(PageItem::TextFlowDisabled);
ite->ScaleType = true;
m_doc->adjustItemSize(ite);
@@ -2784,11 +2784,7 @@
delete[] mbuffer;
}
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int* maskColors, GBool inlineImg)
-#else
-void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, const int* maskColors, GBool inlineImg)
-#endif
+void SlaOutputDev::drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int* maskColors, GBool inlineImg)
{
ImageStream * imgStr = new ImageStream(str, width, colorMap->getNumPixelComps(), colorMap->getBits());
// qDebug() << "Image Components" << colorMap->getNumPixelComps() << "Mask" << maskColors;
@@ -3369,11 +3365,7 @@
fontsrc->unref();
}
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
-void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, Unicode *u, int uLen)
-#else
-void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, const Unicode *u, int uLen)
-#endif
+void SlaOutputDev::drawChar(GfxState *state, double x, double y, double dx, double dy, double originX, double originY, CharCode code, int nBytes, POPPLER_CONST_082 Unicode *u, int uLen)
{
double x1, y1, x2, y2;
int render;
@@ -3460,11 +3452,7 @@
}
}
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, Unicode *u, int uLen)
-#else
-GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, const Unicode *u, int uLen)
-#endif
+GBool SlaOutputDev::beginType3Char(GfxState *state, double x, double y, double dx, double dy, CharCode code, POPPLER_CONST_082 Unicode *u, int uLen)
{
// qDebug() << "beginType3Char";
GfxFont *gfxFont;
Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23289&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 29 01:55:42 2019
@@ -229,11 +229,7 @@
//----- image drawing
void drawImageMask(GfxState *state, Object *ref, Stream *str, int width, int height, GBool invert, GBool interpolate, GBool inlineImg) override;
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, int *maskColors, GBool inlineImg) override;
-#else
- void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, const int *maskColors, GBool inlineImg) override;
-#endif
+ void drawImage(GfxState *state, Object *ref, Stream *str, int width, int height, GfxImageColorMap *colorMap, GBool interpolate, POPPLER_CONST_082 int *maskColors, GBool inlineImg) override;
void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
int width, int height,
GfxImageColorMap *colorMap,
@@ -265,13 +261,8 @@
//----- text drawing
void beginTextObject(GfxState *state) override;
void endTextObject(GfxState *state) override;
-#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(0, 82, 0)
- void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, Unicode * /*u*/, int /*uLen*/) override;
- GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, Unicode * /*u*/, int /*uLen*/) override;
-#else
- void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, const Unicode * /*u*/, int /*uLen*/) override;
- GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, const Unicode * /*u*/, int /*uLen*/) override;
-#endif
+ void drawChar(GfxState *state, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, double /*originX*/, double /*originY*/, CharCode /*code*/, int /*nBytes*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;
+ GBool beginType3Char(GfxState * /*state*/, double /*x*/, double /*y*/, double /*dx*/, double /*dy*/, CharCode /*code*/, POPPLER_CONST_082 Unicode * /*u*/, int /*uLen*/) override;
void endType3Char(GfxState * /*state*/) override;
void type3D0(GfxState * /*state*/, double /*wx*/, double /*wy*/) override;
void type3D1(GfxState * /*state*/, double /*wx*/, double /*wy*/, double /*llx*/, double /*lly*/, double /*urx*/, double /*ury*/) override;
More information about the scribus-commit
mailing list