summaryrefslogtreecommitdiff
path: root/user/calligra/poppler-83.patch
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2020-01-14 01:57:58 +0000
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2020-01-14 01:57:58 +0000
commit1b5ac6b603626d26dbb3484ae4cb7624cb18a620 (patch)
tree9041a4b00af7a77dac1b32806fb24d03fbe30134 /user/calligra/poppler-83.patch
parenteb2ee1e3dc396b3dcf52e391c7227faaeb858d20 (diff)
downloadpackages-1b5ac6b603626d26dbb3484ae4cb7624cb18a620.tar.gz
packages-1b5ac6b603626d26dbb3484ae4cb7624cb18a620.tar.bz2
packages-1b5ac6b603626d26dbb3484ae4cb7624cb18a620.tar.xz
packages-1b5ac6b603626d26dbb3484ae4cb7624cb18a620.zip
user/*: Modernise / fix syntax / deps / code
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();