mirror of
https://github.com/archlinuxarm/PKGBUILDs.git
synced 2024-11-28 22:57:37 +00:00
46 lines
2.2 KiB
Diff
46 lines
2.2 KiB
Diff
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;
|