Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 843605 | Differences between
and this patch

Collapse All | Expand All

(-)a/filters/karbon/pdf/CMakeLists.txt (-1 / +1 lines)
Lines 33-38 set(pdf2odg_PART_SRCS PdfImportDebug.cpp Pdf2OdgImport.cpp SvgOutputDev.cpp) Link Here
33
add_library(calligra_filter_pdf2odg MODULE ${pdf2odg_PART_SRCS})
33
add_library(calligra_filter_pdf2odg MODULE ${pdf2odg_PART_SRCS})
34
calligra_filter_desktop_to_json(calligra_filter_pdf2odg calligra_filter_pdf2odg.desktop)
34
calligra_filter_desktop_to_json(calligra_filter_pdf2odg calligra_filter_pdf2odg.desktop)
35
35
36
target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core)
36
target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core Poppler::Qt5)
37
37
38
install(TARGETS calligra_filter_pdf2odg DESTINATION ${PLUGIN_INSTALL_DIR}/calligra/formatfilters)
38
install(TARGETS calligra_filter_pdf2odg DESTINATION ${PLUGIN_INSTALL_DIR}/calligra/formatfilters)
(-)a/filters/karbon/pdf/Pdf2OdgImport.cpp (-2 / +7 lines)
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
(-)a/filters/karbon/pdf/SvgOutputDev.cpp (-1 / +9 lines)
Lines 35-40 Link Here
35
#include <QPen>
35
#include <QPen>
36
#include <QImage>
36
#include <QImage>
37
37
38
#include <poppler-version.h>
39
40
#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO))
41
38
class SvgOutputDev::Private
42
class SvgOutputDev::Private
39
{
43
{
40
public:
44
public:
Lines 410-416 void SvgOutputDev::drawString(GfxState * state, const GooString * s) Link Here
410
    if (s->getLength() == 0)
414
    if (s->getLength() == 0)
411
        return;
415
        return;
412
416
417
#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0)
413
    GfxFont * font = state->getFont();
418
    GfxFont * font = state->getFont();
419
#else
420
    std::shared_ptr<GfxFont> font = state->getFont();
421
#endif
422
414
423
415
    QString str;
424
    QString str;
416
425
417
- 

Return to bug 843605