aboutsummaryrefslogtreecommitdiffstats
path: root/community/scribus/poppler-22.03.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/scribus/poppler-22.03.patch')
-rw-r--r--community/scribus/poppler-22.03.patch35
1 files changed, 24 insertions, 11 deletions
diff --git a/community/scribus/poppler-22.03.patch b/community/scribus/poppler-22.03.patch
index d185b2765cc..ed7aeb19b90 100644
--- a/community/scribus/poppler-22.03.patch
+++ b/community/scribus/poppler-22.03.patch
@@ -1,38 +1,51 @@
-Patch-Source: https://github.com/archlinux/svntogit-community/blob/b51bcb6c80f4b4102b4d59dcded7901a4e30a3bb/trunk/poppler-22.03.0.patch
-diff -upr scribus-1.5.8.orig/scribus/plugins/import/pdf/importpdf.cpp scribus-1.5.8/scribus/plugins/import/pdf/importpdf.cpp
---- scribus-1.5.8.orig/scribus/plugins/import/pdf/importpdf.cpp 2022-01-23 18:16:01.000000000 +0200
-+++ scribus-1.5.8/scribus/plugins/import/pdf/importpdf.cpp 2022-03-02 14:03:29.851352471 +0200
-@@ -90,7 +90,11 @@ QImage PdfPlug::readThumbnail(const QStr
+Patch-Source: https://github.com/scribusproject/scribus/commit/f19410ac3b27e33dd62105746784e61e85b90a1d
+From f19410ac3b27e33dd62105746784e61e85b90a1d Mon Sep 17 00:00:00 2001
+From: Jean Ghali <jghali@libertysurf.fr>
+Date: Wed, 2 Mar 2022 22:22:53 +0000
+Subject: [PATCH] #16764: Build break with poppler 22.03.0
+
+git-svn-id: svn://scribus.net/trunk/Scribus@24982 11d20701-8431-0410-a711-e3c959e3b870
+---
+ scribus/plugins/import/pdf/importpdf.cpp | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+diff --git a/scribus/plugins/import/pdf/importpdf.cpp b/scribus/plugins/import/pdf/importpdf.cpp
+index 154e58a3f0..392dcd9e64 100644
+--- a/scribus/plugins/import/pdf/importpdf.cpp
++++ b/scribus/plugins/import/pdf/importpdf.cpp
+@@ -89,7 +89,11 @@ QImage PdfPlug::readThumbnail(const QString& fName)
#endif
globalParams->setErrQuiet(gTrue);
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
-+ PDFDoc pdfDoc{std::make_unique<GooString>(fname)};
++ PDFDoc pdfDoc{ std::make_unique<GooString>(fname) };
+#else
PDFDoc pdfDoc{fname, nullptr, nullptr, nullptr};
+#endif
if (!pdfDoc.isOk() || pdfDoc.getErrorCode() == errEncrypted)
return QImage();
-@@ -343,7 +347,11 @@ bool PdfPlug::convert(const QString& fn)
+@@ -342,7 +346,11 @@ bool PdfPlug::convert(const QString& fn)
globalParams->setErrQuiet(gTrue);
// globalParams->setPrintCommands(gTrue);
QList<OptionalContentGroup*> ocgGroups;
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
-+ auto pdfDoc = std::unique_ptr<PDFDoc>(new PDFDoc(std::make_unique<GooString>(fname)));
++ auto pdfDoc = std::make_unique<PDFDoc>(std::make_unique<GooString>(fname));
+#else
auto pdfDoc = std::unique_ptr<PDFDoc>(new PDFDoc(fname, nullptr, nullptr, nullptr));
+#endif
if (pdfDoc)
{
if (pdfDoc->getErrorCode() == errEncrypted)
-@@ -363,7 +371,11 @@ bool PdfPlug::convert(const QString& fn)
+@@ -361,8 +369,13 @@ bool PdfPlug::convert(const QString& fn)
+ #else
auto fname = new GooString(QFile::encodeName(fn).data());
#endif
- auto userPW = new GooString(text.toLocal8Bit().data());
+#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(22, 3, 0)
-+ pdfDoc.reset(new PDFDoc(std::make_unique<GooString>(fname), GooString(userPW), GooString(userPW)));
++ std::optional<GooString> userPW(std::in_place, text.toLocal8Bit().data());
++ pdfDoc.reset(new PDFDoc(std::make_unique<GooString>(fname), userPW, userPW, nullptr));
+#else
+ auto userPW = new GooString(text.toLocal8Bit().data());
pdfDoc.reset(new PDFDoc(fname, userPW, userPW, nullptr));
+#endif
qApp->changeOverrideCursor(QCursor(Qt::WaitCursor));