r22906 by jghali - Fixes for enabling building with poppler 0.75.0
scribus-commit
scribus-commit at lists.scribus.net
Thu Mar 21 12:36:54 UTC 2019
Author: jghali
Date: Thu Mar 21 12:36:54 2019
New Revision: 22906
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=22906
Log:
Fixes for enabling building with poppler 0.75.0
Modified:
trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
trunk/Scribus/scribus/plugins/import/pdf/importpdfconfig.h
trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22906&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp (original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp Thu Mar 21 12:36:54 2019
@@ -511,7 +511,6 @@
hasOcg = ocg->hasOCGs();
if (hasOcg)
{
-
QStringList ocgNames;
Array *order = ocg->getOrderArray();
if (order)
@@ -521,7 +520,7 @@
Object orderItem = order->get(i);
if (orderItem.isDict())
{
- Object ref = order->getNF(i);
+ POPPLER_CONST_075 Object POPPLER_REF ref = order->getNF(i);
if (ref.isRef())
{
OptionalContentGroup *oc = ocg->findOcgByRef(ref.getRef());
Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdfconfig.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22906&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 Thu Mar 21 12:36:54 2019
@@ -44,4 +44,12 @@
#define Gulong unsigned long
#endif
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 75, 0)
+#define POPPLER_CONST_075 const
+#define POPPLER_REF &
+#else
+#define POPPLER_CONST_075
+#define POPPLER_REF
#endif
+
+#endif
Modified: trunk/Scribus/scribus/plugins/import/pdf/slaoutput.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=22906&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 Thu Mar 21 12:36:54 2019
@@ -277,12 +277,12 @@
LinkAction *linkAction = nullptr;
Object obj;
Ref refa = ano->getRef();
- Object additionalActions;
+
obj = xref->fetch(refa.num, refa.gen);
if (obj.isDict())
{
Dict* adic = obj.getDict();
- additionalActions = adic->lookupNF("A");
+ POPPLER_CONST_075 Object POPPLER_REF additionalActions = adic->lookupNF("A");
Object additionalActionsObject = additionalActions.fetch(pdfDoc->getXRef());
if (additionalActionsObject.isDict())
{
@@ -306,13 +306,12 @@
LinkAction *linkAction = nullptr;
Object obj;
Ref refa = ano->getRef();
- Object additionalActions;
obj = xref->fetch(refa.num, refa.gen);
if (obj.isDict())
{
Dict* adic = obj.getDict();
- additionalActions = adic->lookupNF("AA");
+ POPPLER_CONST_075 Object POPPLER_REF additionalActions = adic->lookupNF("AA");
Object additionalActionsObject = additionalActions.fetch(pdfDoc->getXRef());
if (additionalActionsObject.isDict())
{
@@ -853,7 +852,7 @@
QList<int> radList;
for (int i = 0; i < obj2.arrayGetLength(); i++)
{
- Object childRef = obj2.arrayGetNF(i);
+ POPPLER_CONST_075 Object POPPLER_REF childRef = obj2.arrayGetNF(i);
if (!childRef.isRef())
continue;
Object childObj = obj2.arrayGet(i);
More information about the scribus-commit
mailing list