blob: a20747df5e445eb05a2e22c67924161e301ee121 (
about) (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
diff -uprw calligra-3.2.1.orig/filters/karbon/pdf/CMakeLists.txt calligra-3.2.1/filters/karbon/pdf/CMakeLists.txt
--- calligra-3.2.1.orig/filters/karbon/pdf/CMakeLists.txt 2020-05-14 09:51:30.000000000 +0300
+++ calligra-3.2.1/filters/karbon/pdf/CMakeLists.txt 2022-03-02 12:19:08.039939530 +0200
@@ -14,6 +14,10 @@ if(Poppler_VERSION VERSION_LESS "0.83.0"
add_definitions("-DHAVE_POPPLER_PRE_0_83")
endif()
+if(Poppler_VERSION VERSION_LESS "22.3.0")
+ add_definitions("-DHAVE_POPPLER_PRE_22_3")
+endif()
+
set(pdf2svg_PART_SRCS PdfImportDebug.cpp PdfImport.cpp SvgOutputDev.cpp )
add_library(calligra_filter_pdf2svg MODULE ${pdf2svg_PART_SRCS})
diff -uprw calligra-3.2.1.orig/filters/karbon/pdf/Pdf2OdgImport.cpp calligra-3.2.1/filters/karbon/pdf/Pdf2OdgImport.cpp
--- calligra-3.2.1.orig/filters/karbon/pdf/Pdf2OdgImport.cpp 2020-05-14 09:51:30.000000000 +0300
+++ calligra-3.2.1/filters/karbon/pdf/Pdf2OdgImport.cpp 2022-03-02 12:20:35.125605950 +0200
@@ -86,8 +86,12 @@ KoFilter::ConversionStatus Pdf2OdgImport
if (! globalParams)
return KoFilter::NotImplemented;
+#ifdef HAVE_POPPLER_PRE_22_3
GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data());
PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0);
+#else
+ PDFDoc * pdfDoc = new PDFDoc(std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()));
+#endif
if (! pdfDoc) {
#ifdef HAVE_POPPLER_PRE_0_83
delete globalParams;
diff -uprw calligra-3.2.1.orig/filters/karbon/pdf/PdfImport.cpp calligra-3.2.1/filters/karbon/pdf/PdfImport.cpp
--- calligra-3.2.1.orig/filters/karbon/pdf/PdfImport.cpp 2020-05-14 09:51:30.000000000 +0300
+++ calligra-3.2.1/filters/karbon/pdf/PdfImport.cpp 2022-03-02 12:21:46.197510028 +0200
@@ -73,8 +73,12 @@ KoFilter::ConversionStatus PdfImport::co
if (! globalParams)
return KoFilter::NotImplemented;
+#ifdef HAVE_POPPLER_PRE_22_3
GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data());
PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0);
+#else
+ PDFDoc * pdfDoc = new PDFDoc(std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()));
+#endif
if (! pdfDoc) {
#ifdef HAVE_POPPLER_PRE_0_83
delete globalParams;
|