Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Factory:Rebuild
scribus
0001-Fix-build-with-poppler-24.10.0.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File 0001-Fix-build-with-poppler-24.10.0.patch of Package scribus
From 4e83dbc1fd484d93c8d1f737f7dd393bdefce443 Mon Sep 17 00:00:00 2001 From: jghali <jghali@11d20701-8431-0410-a711-e3c959e3b870> Date: Tue, 15 Oct 2024 21:10:37 +0000 Subject: [PATCH] Fix build with poppler 24.10.0 git-svn-id: svn://scribus.net/trunk/Scribus@26325 11d20701-8431-0410-a711-e3c959e3b870 --- scribus/plugins/import/pdf/slaoutput.cpp | 32 ++++++++++++++++++++++++ scribus/plugins/import/pdf/slaoutput.h | 6 ++++- 2 files changed, 37 insertions(+), 1 deletion(-) diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp index a0a2762..b96d097 100644 --- a/scribus/plugins/import/pdf/slaoutput.cpp +++ b/scribus/plugins/import/pdf/slaoutput.cpp @@ -81,6 +81,8 @@ namespace } } +#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(24, 10, 0) + LinkSubmitForm::LinkSubmitForm(Object *actionObj) { if (!actionObj->isDict()) @@ -111,6 +113,8 @@ LinkSubmitForm::~LinkSubmitForm() delete fileName; } +#endif + LinkImportData::LinkImportData(Object *actionObj) { if (!actionObj->isDict()) @@ -1078,6 +1082,30 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) } } } + else if (Lact->getKind() == actionResetForm) + { + ite->annotation().setActionType(4); + } +#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 10, 0) + else if (Lact->getKind() == actionSubmitForm) + { + const auto* impo = (LinkSubmitForm*) Lact; + if (impo->isOk()) + { + ite->annotation().setActionType(3); + ite->annotation().setAction(UnicodeParsedString(impo->getUrl())); + int fl = impo->getFlags(); + if (fl == 0) + ite->annotation().setHTML(0); + else if (fl == 4) + ite->annotation().setHTML(1); + else if (fl == 64) + ite->annotation().setHTML(2); + else if (fl == 512) + ite->annotation().setHTML(3); + } + } +#endif else if (Lact->getKind() == actionUnknown) { auto *uno = (LinkUnknown*) Lact; @@ -1106,7 +1134,11 @@ void SlaOutputDev::handleActions(PageItem* ite, AnnotWidget *ano) if (impo->isOk()) { ite->annotation().setActionType(3); +#if POPPLER_ENCODED_VERSION >= POPPLER_VERSION_ENCODE(24, 10, 0) + ite->annotation().setAction(UnicodeParsedString(impo->getUrl())); +#else ite->annotation().setAction(UnicodeParsedString(impo->getFileName())); +#endif int fl = impo->getFlags(); if (fl == 0) ite->annotation().setHTML(0); diff --git a/scribus/plugins/import/pdf/slaoutput.h b/scribus/plugins/import/pdf/slaoutput.h index 5942120..ad6e628 100644 --- a/scribus/plugins/import/pdf/slaoutput.h +++ b/scribus/plugins/import/pdf/slaoutput.h @@ -56,9 +56,11 @@ for which a new license (GPL+exception) is in place. #include <poppler/splash/SplashGlyphBitmap.h> //------------------------------------------------------------------------ -// LinkSubmitData +// LinkSubmitForm //------------------------------------------------------------------------ +#if POPPLER_ENCODED_VERSION < POPPLER_VERSION_ENCODE(24, 10, 0) + class LinkSubmitForm: public LinkAction { public: @@ -79,6 +81,8 @@ private: int m_flags {0}; }; +#endif + //------------------------------------------------------------------------ // LinkImportData //------------------------------------------------------------------------ -- 2.47.0
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor