Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 778139 Details for
Bug 843605
app-office/calligra-3.2.1-r5 w/ app-text/poppler-22.05.0: SvgOutputDev.cpp:413:36: error: cannot convert ‘const std::shared_ptr<GfxFont>’ to ‘GfxFont*’ in initialization
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
02_6b75bec784c9835c78993349845d8c2ef22ec3de.patch
02_6b75bec784c9835c78993349845d8c2ef22ec3de.patch (text/plain), 3.44 KB, created by
Attila Tóth
on 2022-05-11 15:53:59 UTC
(
hide
)
Description:
02_6b75bec784c9835c78993349845d8c2ef22ec3de.patch
Filename:
MIME Type:
Creator:
Attila Tóth
Created:
2022-05-11 15:53:59 UTC
Size:
3.44 KB
patch
obsolete
>From 6b75bec784c9835c78993349845d8c2ef22ec3de Mon Sep 17 00:00:00 2001 >From: Dag Andersen <dag.andersen@kdemail.net> >Date: Wed, 13 Apr 2022 14:45:33 +0200 >Subject: [PATCH] PdfImport: Fix compile with newer poppler > >Also fixes odg2pdf filter. > >Same solution as commit 236bacbe13739414e919de868283b0caf2df5d8a >by accid@kde.org. >--- > filters/karbon/pdf/CMakeLists.txt | 2 +- > filters/karbon/pdf/Pdf2OdgImport.cpp | 9 +++++++++ > filters/karbon/pdf/SvgOutputDev.cpp | 9 +++++++++ > 3 files changed, 19 insertions(+), 1 deletion(-) > >diff --git a/filters/karbon/pdf/CMakeLists.txt b/filters/karbon/pdf/CMakeLists.txt >index b71c92cbf04..4ce138ccdd6 100644 >--- a/filters/karbon/pdf/CMakeLists.txt >+++ b/filters/karbon/pdf/CMakeLists.txt >@@ -33,6 +33,6 @@ set(pdf2odg_PART_SRCS PdfImportDebug.cpp Pdf2OdgImport.cpp SvgOutputDev.cpp) > add_library(calligra_filter_pdf2odg MODULE ${pdf2odg_PART_SRCS}) > calligra_filter_desktop_to_json(calligra_filter_pdf2odg calligra_filter_pdf2odg.desktop) > >-target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core) >+target_link_libraries(calligra_filter_pdf2odg kopageapp karbonui Poppler::Core Poppler::Qt5) > > install(TARGETS calligra_filter_pdf2odg DESTINATION ${PLUGIN_INSTALL_DIR}/calligra/formatfilters) >diff --git a/filters/karbon/pdf/Pdf2OdgImport.cpp b/filters/karbon/pdf/Pdf2OdgImport.cpp >index 934e31dd5aa..a21eac97a77 100644 >--- a/filters/karbon/pdf/Pdf2OdgImport.cpp >+++ b/filters/karbon/pdf/Pdf2OdgImport.cpp >@@ -40,6 +40,8 @@ > > #include <kpluginfactory.h> > >+#include <poppler-version.h> >+ > // Don't show this warning: it's an issue in poppler > #ifdef __GNUC__ > #pragma GCC diagnostic ignored "-Wunused-parameter" >@@ -49,6 +51,8 @@ > #include <PDFDoc.h> > #include <GlobalParams.h> > >+#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) >+ > K_PLUGIN_FACTORY_WITH_JSON(Pdf2OdgImportFactory, "calligra_filter_pdf2odg.json", > registerPlugin<Pdf2OdgImport>();) > >@@ -86,11 +90,12 @@ KoFilter::ConversionStatus PdfImport::co > if (! globalParams) > return KoFilter::NotImplemented; > >-#ifdef HAVE_POPPLER_PRE_22_3 >+#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) > 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())); >+ std::unique_ptr<GooString> fname = std::make_unique<GooString>(QFile::encodeName(m_chain->inputFile()).data()); >+ PDFDoc * pdfDoc = new PDFDoc(std::move(fname)); > #endif > if (! pdfDoc) { > #ifdef HAVE_POPPLER_PRE_0_83 >diff --git a/filters/karbon/pdf/SvgOutputDev.cpp b/filters/karbon/pdf/SvgOutputDev.cpp >index 0e6e5a934ca..7caec15175a 100644 >--- a/filters/karbon/pdf/SvgOutputDev.cpp >+++ b/filters/karbon/pdf/SvgOutputDev.cpp >@@ -35,6 +35,10 @@ > #include <QPen> > #include <QImage> > >+#include <poppler-version.h> >+ >+#define POPPLER_VERSION_MACRO ((POPPLER_VERSION_MAJOR << 16) | (POPPLER_VERSION_MINOR << 8) | (POPPLER_VERSION_MICRO)) >+ > class SvgOutputDev::Private > { > public: >@@ -410,7 +414,12 @@ void SvgOutputDev::drawString(GfxState * state, const GooString * s) > if (s->getLength() == 0) > return; > >+#if POPPLER_VERSION_MACRO < QT_VERSION_CHECK(22, 03, 0) > GfxFont * font = state->getFont(); >+#else >+ std::shared_ptr<GfxFont> font = state->getFont(); >+#endif >+ > > QString str; > >-- >GitLab
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 843605
:
777971
|
778136
| 778139 |
778142