summaryrefslogtreecommitdiff
path: root/user/calligra/poppler-83.patch
diff options
context:
space:
mode:
authorCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
committerCyberLeo <cyberleo@cyberleo.net>2020-03-28 05:45:52 -0500
commit9297468fa579836e3a6a381b798feb6b78217c2d (patch)
tree53168212f427afbcf0693b534530a4af803152e9 /user/calligra/poppler-83.patch
parenta63cc05c53a6f4c22422dc8c69808b14d87a6f6e (diff)
parentda5a69b65a8791fffa6e93366ee585f87eff136d (diff)
downloadpackages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.gz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.bz2
packages-9297468fa579836e3a6a381b798feb6b78217c2d.tar.xz
packages-9297468fa579836e3a6a381b798feb6b78217c2d.zip
Merge branch 'master' into zfs
Diffstat (limited to 'user/calligra/poppler-83.patch')
-rw-r--r--user/calligra/poppler-83.patch102
1 files changed, 102 insertions, 0 deletions
diff --git a/user/calligra/poppler-83.patch b/user/calligra/poppler-83.patch
new file mode 100644
index 000000000..e158ac4ff
--- /dev/null
+++ b/user/calligra/poppler-83.patch
@@ -0,0 +1,102 @@
+--- calligra-3.1.0/filters/karbon/pdf/CMakeLists.txt.old 2020-01-13 11:57:23.529485941 +0000
++++ calligra-3.1.0/filters/karbon/pdf/CMakeLists.txt 2020-01-13 12:08:05.610601265 +0000
+@@ -3,6 +3,10 @@
+ add_definitions("-DHAVE_POPPLER_PRE_0_82")
+ endif()
+
++if(Poppler_VERSION VERSION_LESS "0.83.0")
++ add_definitions("-DHAVE_POPPLER_PRE_0_83")
++endif()
++
+ set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp SvgOutputDev.cpp )
+
+ add_library(calligra_filter_pdf2svg MODULE ${pdf2svg_PART_SRCS})
+--- calligra-3.1.0/filters/karbon/pdf/PdfImport.cpp.old 2020-01-13 10:34:30.622852616 +0000
++++ calligra-3.1.0/filters/karbon/pdf/PdfImport.cpp 2020-01-13 12:26:57.029441237 +0000
+@@ -60,19 +60,31 @@
+ }
+
+ // read config file
++#ifdef HAVE_POPPLER_PRE_0_83
+ globalParams = new GlobalParams();
++#else
++ globalParams = std::unique_ptr<GlobalParams>(new GlobalParams());
++#endif
+ if (! globalParams)
+ return KoFilter::NotImplemented;
+
+ GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data());
+ PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0);
+ if (! pdfDoc) {
++#ifdef HAVE_POPPLER_PRE_0_83
+ delete globalParams;
++#else
++ globalParams.reset();
++#endif
+ return KoFilter::StupidError;
+ }
+
+ if (! pdfDoc->isOk()) {
++#ifdef HAVE_POPPLER_PRE_0_83
+ delete globalParams;
++#else
++ globalParams.reset();
++#endif
+ delete pdfDoc;
+ return KoFilter::StupidError;
+ }
+@@ -99,8 +111,12 @@
+
+ delete dev;
+ delete pdfDoc;
++#ifdef HAVE_POPPLER_PRE_0_83
+ delete globalParams;
+ globalParams = 0;
++#else
++ globalParams.reset();
++#endif
+
+ return KoFilter::OK;
+ }
+--- calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.cpp.old 2020-01-13 11:57:43.537339118 +0000
++++ calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.cpp 2020-01-13 12:18:49.211663293 +0000
+@@ -172,7 +172,11 @@
+ *d->body << "/>" << endl;
+ }
+
++#ifdef HAVE_POPPLER_PRE_0_83
+ QString SvgOutputDev::convertPath(GfxPath *path)
++#else
++QString SvgOutputDev::convertPath(const GfxPath *path)
++#endif
+ {
+ if (! path)
+ return QString();
+@@ -180,7 +184,12 @@
+ QString output;
+
+ for (int i = 0; i < path->getNumSubpaths(); ++i) {
+- GfxSubpath * subpath = path->getSubpath(i);
++#ifdef HAVE_POPPLER_PRE_0_83
++ GfxSubpath * subpath;
++#else
++ const GfxSubpath * subpath;
++#endif
++ subpath = path->getSubpath(i);
+ if (subpath->getNumPoints() > 0) {
+ output += QString("M%1 %2").arg(subpath->getX(0)).arg(subpath->getY(0));
+ int j = 1;
+--- calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.h.old 2020-01-13 11:57:23.529485941 +0000
++++ calligra-3.1.0/filters/karbon/pdf/SvgOutputDev.h 2020-01-13 12:11:30.918610131 +0000
+@@ -87,7 +87,11 @@
+ /// Dumps content to svg file
+ void dumpContent();
+ private:
++#ifdef HAVE_POPPLER_PRE_0_83
+ QString convertPath(GfxPath *path);
++#else
++ QString convertPath(const GfxPath *path);
++#endif
+ QString convertMatrix(const QMatrix &matrix);
+ QString convertMatrix(const double * matrix);
+ QString printFill();