Lines 40-45
Link Here
|
40 |
|
40 |
|
41 |
#include <kpluginfactory.h> |
41 |
#include <kpluginfactory.h> |
42 |
|
42 |
|
|
|
43 |
#include <poppler-version.h> |
44 |
|
43 |
// Don't show this warning: it's an issue in poppler |
45 |
// Don't show this warning: it's an issue in poppler |
44 |
#ifdef __GNUC__ |
46 |
#ifdef __GNUC__ |
45 |
#pragma GCC diagnostic ignored "-Wunused-parameter" |
47 |
#pragma GCC diagnostic ignored "-Wunused-parameter" |
Lines 49-54
Link Here
|
49 |
#include <PDFDoc.h> |
51 |
#include <PDFDoc.h> |
50 |
#include <GlobalParams.h> |
52 |
#include <GlobalParams.h> |
51 |
|
53 |
|
|
|
54 |
#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) |
55 |
|
52 |
K_PLUGIN_FACTORY_WITH_JSON(Pdf2OdgImportFactory, "calligra_filter_pdf2odg.json", |
56 |
K_PLUGIN_FACTORY_WITH_JSON(Pdf2OdgImportFactory, "calligra_filter_pdf2odg.json", |
53 |
registerPlugin<Pdf2OdgImport>();) |
57 |
registerPlugin<Pdf2OdgImport>();) |
54 |
|
58 |
|
Lines 86-96
KoFilter::ConversionStatus PdfImport::co
Link Here
|
86 |
if (! globalParams) |
90 |
if (! globalParams) |
87 |
return KoFilter::NotImplemented; |
91 |
return KoFilter::NotImplemented; |
88 |
|
92 |
|
89 |
#ifdef HAVE_POPPLER_PRE_22_3 |
93 |
#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) |
90 |
GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); |
94 |
GooString * fname = new GooString(QFile::encodeName(m_chain->inputFile()).data()); |
91 |
PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); |
95 |
PDFDoc * pdfDoc = new PDFDoc(fname, 0, 0, 0); |
92 |
#else |
96 |
#else |
93 |
PDFDoc * pdfDoc = new PDFDoc(std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data())); |
97 |
std::unique_ptr<GooString> fname = std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()); |
|
|
98 |
PDFDoc * pdfDoc = new PDFDoc(std::move(fname)); |
94 |
#endif |
99 |
#endif |
95 |
if (! pdfDoc) { |
100 |
if (! pdfDoc) { |
96 |
#ifdef HAVE_POPPLER_PRE_0_83 |
101 |
#ifdef HAVE_POPPLER_PRE_0_83 |