Accepting request 1218617 from KDE:Extra
- Add poppler 24.10 compatibility patch: * 0001-Fix-build-with-poppler-24.10.0.patch OBS-URL: https://build.opensuse.org/request/show/1218617 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/scribus?expand=0&rev=87
This commit is contained in:
commit
46258da329
105
0001-Fix-build-with-poppler-24.10.0.patch
Normal file
105
0001-Fix-build-with-poppler-24.10.0.patch
Normal file
@ -0,0 +1,105 @@
|
||||
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
|
||||
|
@ -1,3 +1,9 @@
|
||||
-------------------------------------------------------------------
|
||||
Fri Oct 25 14:39:51 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
- Add poppler 24.10 compatibility patch:
|
||||
* 0001-Fix-build-with-poppler-24.10.0.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jul 2 14:52:57 UTC 2024 - Christophe Marin <christophe@krop.fr>
|
||||
|
||||
|
@ -34,7 +34,7 @@ Source2: scribus.keyring
|
||||
# PATCH-FIX-OPENSUSE
|
||||
Patch0: 0001-Make-sure-information-displayed-on-the-about-window-.patch
|
||||
# PATCH-FIX-UPSTREAM poppler...
|
||||
|
||||
Patch1: 0001-Fix-build-with-poppler-24.10.0.patch
|
||||
BuildRequires: cmake >= 3.14.0
|
||||
BuildRequires: cups-devel
|
||||
BuildRequires: dos2unix
|
||||
|
Loading…
Reference in New Issue
Block a user