Hi,

this fixes the build of print/scribus against puppler-0.86. Ugly,
but what can I do (it's what I found in upstreams svn repository)?

Survived a build on amd64, and i also successfully imported a PDF
(as image) and exported the result back to PDF.

If i don't get any complaints, i'll just put this in in a day or two,
together with the poppler update.

Ciao,
        Kili

Index: patches/patch-scribus_plugins_import_pdf_importpdf_cpp
===================================================================
RCS file: 
/cvs/ports/print/scribus/patches/patch-scribus_plugins_import_pdf_importpdf_cpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-scribus_plugins_import_pdf_importpdf_cpp
--- patches/patch-scribus_plugins_import_pdf_importpdf_cpp      19 Feb 2020 
12:15:45 -0000      1.1
+++ patches/patch-scribus_plugins_import_pdf_importpdf_cpp      10 Mar 2020 
22:12:35 -0000
@@ -2,6 +2,8 @@ $OpenBSD: patch-scribus_plugins_import_p
 
 Fix build with newer poppler, from archlinux
 
+Fix for poppler-0.86.x from svn r23478.
+
 Index: scribus/plugins/import/pdf/importpdf.cpp
 --- scribus/plugins/import/pdf/importpdf.cpp.orig
 +++ scribus/plugins/import/pdf/importpdf.cpp
@@ -75,7 +77,29 @@ Index: scribus/plugins/import/pdf/import
                                                return false;
                                        }
                                        pageString = optImp->getPagesString();
-@@ -908,8 +926,12 @@ bool PdfPlug::convert(const QString& fn)
+@@ -838,11 +856,20 @@ bool PdfPlug::convert(const QString& fn)
+                                                               names = 
catDict.dictLookup("OpenAction");
+                                                               if 
(names.isDict())
+                                                               {
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                                                                      
std::unique_ptr<LinkAction> linkAction;
++                                                                      
linkAction = LinkAction::parseAction(&names, 
pdfDoc->getCatalog()->getBaseURI());
++#else
+                                                                       
LinkAction *linkAction = nullptr;
+                                                                       
linkAction = LinkAction::parseAction(&names, 
pdfDoc->getCatalog()->getBaseURI());
++#endif
+                                                                       if 
(linkAction)
+                                                                       {
+-                                                                              
LinkJavaScript *jsa = (LinkJavaScript*)linkAction;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                                                                              
LinkJavaScript *jsa = (LinkJavaScript*) linkAction.get();
++#else
++                                                                              
LinkJavaScript *jsa = (LinkJavaScript*) linkAction;
++#endif
+                                                                               
if (jsa->isOk())
+                                                                               
{
+                                                                               
        QString script = UnicodeParsedString(jsa->getScript());
+@@ -908,8 +935,12 @@ bool PdfPlug::convert(const QString& fn)
                }
                delete pdfDoc;
        }
@@ -88,3 +112,50 @@ Index: scribus/plugins/import/pdf/import
  
  //    qDebug() << "converting finished";
  //    qDebug() << "Imported" << Elements.count() << "Elements";
+@@ -1037,6 +1068,46 @@ QString PdfPlug::UnicodeParsedString(POPPLER_CONST Goo
+               else
+               {
+                       u = s1->getChar(i) & 0xff;
++                      ++i;
++              }
++              // #15616: imagemagick may write unicode strings incorrectly in 
PDF
++              if (u == 0)
++                      continue;
++              result += QChar( u );
++      }
++      return result;
++}
++
++QString PdfPlug::UnicodeParsedString(const std::string& s1)
++{
++      if (s1.length() == 0)
++              return QString();
++      GBool isUnicode;
++      int i;
++      Unicode u;
++      QString result;
++      if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) 
== 0xff))
++      {
++              isUnicode = gTrue;
++              i = 2;
++              result.reserve((s1.length() - 2) / 2);
++      }
++      else
++      {
++              isUnicode = gFalse;
++              i = 0;
++              result.reserve(s1.length());
++      }
++      while (i < s1.length())
++      {
++              if (isUnicode)
++              {
++                      u = ((s1.at(i) & 0xff) << 8) | (s1.at(i+1) & 0xff);
++                      i += 2;
++              }
++              else
++              {
++                      u = s1.at(i) & 0xff;
+                       ++i;
+               }
+               // #15616: imagemagick may write unicode strings incorrectly in 
PDF
Index: patches/patch-scribus_plugins_import_pdf_importpdf_h
===================================================================
RCS file: patches/patch-scribus_plugins_import_pdf_importpdf_h
diff -N patches/patch-scribus_plugins_import_pdf_importpdf_h
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ patches/patch-scribus_plugins_import_pdf_importpdf_h        10 Mar 2020 
22:12:35 -0000
@@ -0,0 +1,45 @@
+$OpenBSD$
+
+Fix for poppler-0.86.x from svn r23478.
+
+Index: scribus/plugins/import/pdf/importpdf.h
+--- scribus/plugins/import/pdf/importpdf.h.orig
++++ scribus/plugins/import/pdf/importpdf.h
+@@ -7,19 +7,21 @@ for which a new license (GPL+exception) is in place.
+ #ifndef IMPORTPDF_H
+ #define IMPORTPDF_H
+ 
++#include <QBrush>
++#include <QBuffer>
++#include <QColor>
++#include <QImage>
+ #include <QList>
+-#include <QTransform>
+ #include <QMultiMap>
+-#include <QtGlobal>
+ #include <QObject>
++#include <QPen>
++#include <QtGlobal>
++#include <QSizeF>
+ #include <QString>
+ #include <QTextStream>
+-#include <QSizeF>
+-#include <QBuffer>
+-#include <QColor>
+-#include <QBrush>
+-#include <QPen>
+-#include <QImage>
++#include <QTransform>
++ 
++#include <memory>
+ 
+ #include "fpointarray.h"
+ #include "importpdfconfig.h"
+@@ -82,6 +84,7 @@ class PdfPlug : public QObject (private)
+       bool convert(const QString& fn);
+       QRectF getCBox(int box, int pgNum);
+       QString UnicodeParsedString(POPPLER_CONST GooString *s1);
++      QString UnicodeParsedString(const std::string& s1);
+       
+       QList<PageItem*> Elements;
+       double baseX, baseY;
Index: patches/patch-scribus_plugins_import_pdf_slaoutput_cpp
===================================================================
RCS file: 
/cvs/ports/print/scribus/patches/patch-scribus_plugins_import_pdf_slaoutput_cpp,v
retrieving revision 1.1
diff -u -p -r1.1 patch-scribus_plugins_import_pdf_slaoutput_cpp
--- patches/patch-scribus_plugins_import_pdf_slaoutput_cpp      19 Feb 2020 
12:15:45 -0000      1.1
+++ patches/patch-scribus_plugins_import_pdf_slaoutput_cpp      10 Mar 2020 
22:12:35 -0000
@@ -3,10 +3,305 @@ $OpenBSD: patch-scribus_plugins_import_p
 
 Fix build with newer poppler, from archlinux
 
+Fix for poppler-0.86.x from svn r23478.
+
 Index: scribus/plugins/import/pdf/slaoutput.cpp
 --- scribus/plugins/import/pdf/slaoutput.cpp.orig
 +++ scribus/plugins/import/pdf/slaoutput.cpp
-@@ -1224,6 +1224,11 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, 
+@@ -308,9 +308,15 @@ LinkAction* SlaOutputDev::SC_getAction(AnnotWidget *an
+ }
+ 
+ /* Replacement for the crippled Poppler function LinkAction* 
AnnotWidget::getAdditionalAction(AdditionalActionsType type) */
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++std::unique_ptr<LinkAction> SlaOutputDev::SC_getAdditionalAction(const char 
*key, AnnotWidget *ano)
++{
++      std::unique_ptr<LinkAction> linkAction;
++#else
+ LinkAction* SlaOutputDev::SC_getAdditionalAction(const char *key, AnnotWidget 
*ano)
+ {
+       LinkAction *linkAction = nullptr;
++#endif
+       Object obj;
+       Ref refa = ano->getRef();
+ 
+@@ -455,7 +461,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, doub
+                       POPPLER_CONST GooString *ndst = gto->getNamedDest();
+                       if (ndst)
+                       {
+-                              LinkDest *dstn = pdfDoc->findDest(ndst);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                              std::unique_ptr<LinkDest> dstn = 
pdfDoc->findDest(ndst);
++#else
++                              LinkDest *dstn = pdfDoc->findDest(ndst);
++#endif
+                               if (dstn)
+                               {
+                                       if (dstn->getKind() == destXYZ)
+@@ -499,7 +509,11 @@ bool SlaOutputDev::handleLinkAnnot(Annot* annota, doub
+                       POPPLER_CONST GooString *ndst = gto->getNamedDest();
+                       if (ndst)
+                       {
+-                              LinkDest *dstn = pdfDoc->findDest(ndst);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                              std::unique_ptr<LinkDest> dstn = 
pdfDoc->findDest(ndst);
++#else
++                              LinkDest *dstn = pdfDoc->findDest(ndst);
++#endif
+                               if (dstn)
+                               {
+                                       if (dstn->getKind() == destXYZ)
+@@ -967,7 +981,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW
+                               POPPLER_CONST GooString *ndst = 
gto->getNamedDest();
+                               if (ndst)
+                               {
+-                                      LinkDest *dstn = pdfDoc->findDest(ndst);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                                      std::unique_ptr<LinkDest> dstn = 
pdfDoc->findDest(ndst);
++#else
++                                      LinkDest *dstn = pdfDoc->findDest(ndst);
++#endif
+                                       if (dstn)
+                                       {
+                                               if (dstn->getKind() == destXYZ)
+@@ -1019,7 +1037,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW
+                               POPPLER_CONST GooString *ndst = 
gto->getNamedDest();
+                               if (ndst)
+                               {
+-                                      LinkDest *dstn = pdfDoc->findDest(ndst);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                                      std::unique_ptr<LinkDest> dstn = 
pdfDoc->findDest(ndst);
++#else
++                                      LinkDest *dstn = pdfDoc->findDest(ndst);
++#endif
+                                       if (dstn)
+                                       {
+                                               if (dstn->getKind() == destXYZ)
+@@ -1088,96 +1110,148 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW
+               else
+                       qDebug() << "Found unsupported Action of type" << 
Lact->getKind();
+       }
+-      LinkAction *Aact = SC_getAdditionalAction("D", ano);
++      auto Aact = SC_getAdditionalAction("D", ano);
+       if (Aact)
+       {
+               if (Aact->getKind() == actionJavaScript)
+               {
+-                      LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+                       if (jsa->isOk())
+                       {
+                               
ite->annotation().setD_act(UnicodeParsedString(jsa->getScript()));
+                               ite->annotation().setAAact(true);
+                       }
+               }
+-              Aact = nullptr;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++              Aact.reset();
++#else
++              Aact = nullptr;
++#endif
+       }
+       Aact = SC_getAdditionalAction("E", ano);
+       if (Aact)
+       {
+               if (Aact->getKind() == actionJavaScript)
+               {
+-                      LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+                       if (jsa->isOk())
+                       {
+                               
ite->annotation().setE_act(UnicodeParsedString(jsa->getScript()));
+                               ite->annotation().setAAact(true);
+                       }
+               }
+-              Aact = nullptr;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++              Aact.reset();
++#else
++              Aact = nullptr;
++#endif
+       }
+       Aact = SC_getAdditionalAction("X", ano);
+       if (Aact)
+       {
+               if (Aact->getKind() == actionJavaScript)
+               {
+-                      LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+                       if (jsa->isOk())
+                       {
+                               
ite->annotation().setX_act(UnicodeParsedString(jsa->getScript()));
+                               ite->annotation().setAAact(true);
+                       }
+               }
+-              Aact = nullptr;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++              Aact.reset();
++#else
++              Aact = nullptr;
++#endif
+       }
+       Aact = SC_getAdditionalAction("Fo", ano);
+       if (Aact)
+       {
+               if (Aact->getKind() == actionJavaScript)
+               {
+-                      LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+                       if (jsa->isOk())
+                       {
+                               
ite->annotation().setFo_act(UnicodeParsedString(jsa->getScript()));
+                               ite->annotation().setAAact(true);
+                       }
+               }
+-              Aact = nullptr;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++              Aact.reset();
++#else
++              Aact = nullptr;
++#endif
+       }
+       Aact = SC_getAdditionalAction("Bl", ano);
+       if (Aact)
+       {
+               if (Aact->getKind() == actionJavaScript)
+               {
+-                      LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+                       if (jsa->isOk())
+                       {
+                               
ite->annotation().setBl_act(UnicodeParsedString(jsa->getScript()));
+                               ite->annotation().setAAact(true);
+                       }
+               }
+-              Aact = nullptr;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++              Aact.reset();
++#else
++              Aact = nullptr;
++#endif
+       }
+       Aact = SC_getAdditionalAction("C", ano);
+       if (Aact)
+       {
+               if (Aact->getKind() == actionJavaScript)
+               {
+-                      LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+                       if (jsa->isOk())
+                       {
+                               
ite->annotation().setC_act(UnicodeParsedString(jsa->getScript()));
+                               ite->annotation().setAAact(true);
+                       }
+               }
+-              Aact = nullptr;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++              Aact.reset();
++#else
++              Aact = nullptr;
++#endif
+       }
+       Aact = SC_getAdditionalAction("F", ano);
+       if (Aact)
+       {
+               if (Aact->getKind() == actionJavaScript)
+               {
+-                      LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+                       if (jsa->isOk())
+                       {
+                               
ite->annotation().setF_act(UnicodeParsedString(jsa->getScript()));
+@@ -1185,14 +1259,22 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW
+                               ite->annotation().setFormat(5);
+                       }
+               }
+-              Aact = nullptr;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++              Aact.reset();
++#else
++              Aact = nullptr;
++#endif
+       }
+       Aact = SC_getAdditionalAction("K", ano);
+       if (Aact)
+       {
+               if (Aact->getKind() == actionJavaScript)
+               {
+-                      LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+                       if (jsa->isOk())
+                       {
+                               
ite->annotation().setK_act(UnicodeParsedString(jsa->getScript()));
+@@ -1200,21 +1282,33 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotW
+                               ite->annotation().setFormat(5);
+                       }
+               }
+-              Aact = nullptr;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++              Aact.reset();
++#else
++              Aact = nullptr;
++#endif
+       }
+       Aact = SC_getAdditionalAction("V", ano);
+       if (Aact)
+       {
+               if (Aact->getKind() == actionJavaScript)
+               {
+-                      LinkJavaScript *jsa = (LinkJavaScript*)Aact;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact.get();
++#else
++                      LinkJavaScript *jsa = (LinkJavaScript*) Aact;
++#endif
+                       if (jsa->isOk())
+                       {
+                               
ite->annotation().setV_act(UnicodeParsedString(jsa->getScript()));
+                               ite->annotation().setAAact(true);
+                       }
+               }
+-              Aact = nullptr;
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++              Aact.reset();
++#else
++              Aact = nullptr;
++#endif
+       }
+ }
+ 
+@@ -1224,6 +1318,11 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, 
        catalog = catA;
        pdfDoc = doc;
        updateGUICounter = 0;
@@ -18,7 +313,7 @@ Index: scribus/plugins/import/pdf/slaout
        m_fontEngine = new SplashFontEngine(
  #if HAVE_T1LIB_H
        globalParams->getEnableT1lib(),
-@@ -1234,6 +1239,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, 
+@@ -1234,6 +1333,7 @@ void SlaOutputDev::startDoc(PDFDoc *doc, XRef *xrefA, 
        true,
  #endif
        true);
@@ -26,7 +321,7 @@ Index: scribus/plugins/import/pdf/slaout
  }
  
  void SlaOutputDev::startPage(int pageNum, GfxState *, XRef *)
-@@ -3705,7 +3711,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotCo
+@@ -3705,7 +3805,7 @@ QString SlaOutputDev::getAnnotationColor(const AnnotCo
        return fNam;
  }
  
@@ -35,7 +330,7 @@ Index: scribus/plugins/import/pdf/slaout
  {
        if (! path)
                return QString();
-@@ -3715,7 +3721,7 @@ QString SlaOutputDev::convertPath(GfxPath *path)
+@@ -3715,7 +3815,7 @@ QString SlaOutputDev::convertPath(GfxPath *path)
  
        for (int i = 0; i < path->getNumSubpaths(); ++i)
        {
@@ -44,3 +339,50 @@ Index: scribus/plugins/import/pdf/slaout
                if (subpath->getNumPoints() > 0)
                {
                        output += QString("M %1 
%2").arg(subpath->getX(0)).arg(subpath->getY(0));
+@@ -3917,6 +4017,46 @@ QString SlaOutputDev::UnicodeParsedString(POPPLER_CONS
+                       u = s1->getChar(i) & 0xff;
+                       ++i;
+               }
++              result += QChar( u );
++      }
++      return result;
++}
++
++QString SlaOutputDev::UnicodeParsedString(const std::string& s1)
++{
++      if (s1.length() == 0)
++              return QString();
++      GBool isUnicode;
++      int i;
++      Unicode u;
++      QString result;
++      if ((s1.at(0) & 0xff) == 0xfe && (s1.length() > 1 && (s1.at(1) & 0xff) 
== 0xff))
++      {
++              isUnicode = gTrue;
++              i = 2;
++              result.reserve((s1.length() - 2) / 2);
++      }
++      else
++      {
++              isUnicode = gFalse;
++              i = 0;
++              result.reserve(s1.length());
++      }
++      while (i < s1.length())
++      {
++              if (isUnicode)
++              {
++                      u = ((s1.at(i) & 0xff) << 8) | (s1.at(i+1) & 0xff);
++                      i += 2;
++              }
++              else
++              {
++                      u = s1.at(i) & 0xff;
++                      ++i;
++              }
++              // #15616: imagemagick may write unicode strings incorrectly in 
PDF
++              if (u == 0)
++                      continue;
+               result += QChar( u );
+       }
+       return result;
Index: patches/patch-scribus_plugins_import_pdf_slaoutput_h
===================================================================
RCS file: 
/cvs/ports/print/scribus/patches/patch-scribus_plugins_import_pdf_slaoutput_h,v
retrieving revision 1.1
diff -u -p -r1.1 patch-scribus_plugins_import_pdf_slaoutput_h
--- patches/patch-scribus_plugins_import_pdf_slaoutput_h        19 Feb 2020 
12:15:45 -0000      1.1
+++ patches/patch-scribus_plugins_import_pdf_slaoutput_h        10 Mar 2020 
22:12:35 -0000
@@ -1,9 +1,33 @@
 $OpenBSD: patch-scribus_plugins_import_pdf_slaoutput_h,v 1.1 2020/02/19 
12:15:45 landry Exp $
 
+Fix for poppler-0.86.x from svn r23478.
+
 Index: scribus/plugins/import/pdf/slaoutput.h
 --- scribus/plugins/import/pdf/slaoutput.h.orig
 +++ scribus/plugins/import/pdf/slaoutput.h
-@@ -229,7 +229,7 @@ class SlaOutputDev : public OutputDev (public)
+@@ -20,6 +20,8 @@ for which a new license (GPL+exception) is in place.
+ #include <QTextStream>
+ #include <QTransform>
+ 
++#include <memory>
++
+ #include "fpointarray.h"
+ #include "importpdfconfig.h"
+ #include "pageitem.h"
+@@ -159,7 +161,11 @@ class SlaOutputDev : public OutputDev (public)
+       virtual ~SlaOutputDev();
+ 
+       LinkAction* SC_getAction(AnnotWidget *ano);
+-      LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano);
++#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(0, 86, 0)
++      std::unique_ptr<LinkAction> SC_getAdditionalAction(const char *key, 
AnnotWidget *ano);
++#else
++      LinkAction* SC_getAdditionalAction(const char *key, AnnotWidget *ano);
++#endif
+       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);
+@@ -229,7 +235,7 @@ class SlaOutputDev : public OutputDev (public)
  
        //----- image drawing
        void drawImageMask(GfxState *state, Object *ref, Stream *str, int 
width, int height, GBool invert, GBool interpolate, GBool inlineImg) override;
@@ -12,7 +36,7 @@ Index: scribus/plugins/import/pdf/slaout
        void drawSoftMaskedImage(GfxState *state, Object *ref, Stream *str,
                                   int width, int height,
                                   GfxImageColorMap *colorMap,
-@@ -261,8 +261,8 @@ class SlaOutputDev : public OutputDev (public)
+@@ -261,8 +267,8 @@ class SlaOutputDev : public OutputDev (public)
        //----- text drawing
        void  beginTextObject(GfxState *state) override;
        void  endTextObject(GfxState *state) override;
@@ -23,7 +47,7 @@ Index: scribus/plugins/import/pdf/slaout
        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;
-@@ -282,7 +282,7 @@ class SlaOutputDev : public OutputDev (public)
+@@ -282,11 +288,12 @@ class SlaOutputDev : public OutputDev (public)
        void getPenState(GfxState *state);
        QString getColor(GfxColorSpace *color_space, POPPLER_CONST_070 GfxColor 
*color, int *shade);
        QString getAnnotationColor(const AnnotColor *color);
@@ -32,3 +56,8 @@ Index: scribus/plugins/import/pdf/slaout
        int getBlendMode(GfxState *state);
        void applyMask(PageItem *ite);
        void pushGroup(const QString& maskName = "", GBool forSoftMask = 
gFalse, GBool alpha = gFalse, bool inverted = false);
+       QString UnicodeParsedString(POPPLER_CONST GooString *s1);
++      QString UnicodeParsedString(const std::string& s1);
+       bool checkClip();
+       bool pathIsClosed;
+       QString CurrColorFill;

Reply via email to