View Issue Details
ID | Project | Category | View Status | Date Submitted | Last Update |
---|---|---|---|---|---|
0017170 | Scribus | public | 2024-03-05 00:31 | 2024-09-16 20:54 | |
Reporter | heirecka | Assigned To | jghali | ||
Priority | normal | Severity | minor | Reproducibility | always |
Status | closed | Resolution | fixed | ||
Platform | Linux | ||||
Fixed in Version | 1.6.2.svn | ||||
Summary | 0017170: 1.6.1 fails to build against poppler >=24.03.0 | ||||
Description | ... with the following error: /var/tmp/paludis/build/app-office-scribus-1.6.1/work/scribus-1.6.1/scribus/plugins/import/pdf/slaoutput.cpp: In member function 'virtual bool SlaOutputDev::axialShadedFill(GfxStat e*, GfxAxialShading*, double, double)': /var/tmp/paludis/build/app-office-scribus-1.6.1/work/scribus-1.6.1/scribus/plugins/import/pdf/slaoutput.cpp:1848:29: error: no match for 'operator==' (operand types are 'Function::Type' and 'int') 1848 | if (func->getType() == 3) | ~~~~~~~~~~~~~~~ ^~ ~ | | | | | int | Function::Type /var/tmp/paludis/build/app-office-scribus-1.6.1/work/scribus-1.6.1/scribus/plugins/import/pdf/slaoutput.cpp:1870:35: error: no match for 'operator==' (operand types are 'Function::Type' and 'int') 1870 | else if ((func->getType() == 2) || (func->getType() == 0)) | ~~~~~~~~~~~~~~~ ^~ ~ | | | | | int | Function::Type ... This is due to https://gitlab.freedesktop.org/poppler/poppler/-/commit/6e3824d45d42cb806a28a2df84e4ab6bb3587083 which replaced an int with an enum. I attached a patch against Version16x, which should fix it. | ||||
Tags | No tags attached. | ||||
Patch | Yes | ||||
|
0001-Fix-build-with-poppler-24.03.0.patch (2,975 bytes)
From 0b0e2574e5693b7ea252e0a75520811c0863146e Mon Sep 17 00:00:00 2001 From: Heiko Becker <mail@heiko-becker.de> Date: Tue, 5 Mar 2024 00:43:12 +0100 Subject: [PATCH] Fix build with poppler >= 24.03.0 --- scribus/plugins/import/pdf/slaoutput.cpp | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/scribus/plugins/import/pdf/slaoutput.cpp b/scribus/plugins/import/pdf/slaoutput.cpp index da824a1a2..04f9c05f0 100644 --- a/scribus/plugins/import/pdf/slaoutput.cpp +++ b/scribus/plugins/import/pdf/slaoutput.cpp @@ -14,6 +14,7 @@ for which a new license (GPL+exception) is in place. #include <poppler/GlobalParams.h> #include <poppler/poppler-config.h> +#include <poppler/glib/poppler-features.h> #include <poppler/FileSpec.h> #include <poppler/fofi/FoFiTrueType.h> @@ -1845,7 +1846,11 @@ GBool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, d VGradient FillGradient = VGradient(VGradient::linear); FillGradient.clearStops(); GfxColorSpace *color_space = shading->getColorSpace(); +#if POPPLER_CHECK_VERSION(24, 3, 0) + if (func->getType() == Function::Type::Stitching) +#else if (func->getType() == 3) +#endif { StitchingFunction *stitchingFunc = (StitchingFunction*)func; const double *bounds = stitchingFunc->getBounds(); @@ -1867,7 +1872,11 @@ GBool SlaOutputDev::axialShadedFill(GfxState *state, GfxAxialShading *shading, d FillGradient.addStop( ScColorEngine::getShadeColor(m_doc->PageColors[stopColor], m_doc, shade), stopPoint, 0.5, 1.0, stopColor, shade ); } } +#if POPPLER_CHECK_VERSION(24, 3, 0) + else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Sampled)) +#else else if ((func->getType() == 2) || (func->getType() == 0)) +#endif { GfxColor stop1; shading->getColor(0.0, &stop1); @@ -1979,7 +1988,11 @@ GBool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, VGradient FillGradient = VGradient(VGradient::linear); FillGradient.clearStops(); GfxColorSpace *color_space = shading->getColorSpace(); - if (func->getType() == 3) +#if POPPLER_CHECK_VERSION(24, 3, 0) + if (func->getType() == Function::Type::Stitching) +#else + if (func->getType() == 3) +#endif { StitchingFunction *stitchingFunc = (StitchingFunction*)func; const double *bounds = stitchingFunc->getBounds(); @@ -2001,7 +2014,11 @@ GBool SlaOutputDev::radialShadedFill(GfxState *state, GfxRadialShading *shading, FillGradient.addStop( ScColorEngine::getShadeColor(m_doc->PageColors[stopColor], m_doc, shade), stopPoint, 0.5, 1.0, stopColor, shade ); } } +#if POPPLER_CHECK_VERSION(24, 3, 0) + else if ((func->getType() == Function::Type::Exponential) || (func->getType() == Function::Type::Sampled)) +#else else if ((func->getType() == 2) || (func->getType() == 0)) +#endif { GfxColor stop1; shading->getColor(0.0, &stop1); -- 2.44.0 |
|
This is already fixed in r26045. |
Date Modified | Username | Field | Change |
---|---|---|---|
2024-03-05 00:31 | heirecka | New Issue | |
2024-03-05 00:31 | heirecka | File Added: 0001-Fix-build-with-poppler-24.03.0.patch | |
2024-03-05 07:45 | jghali | Assigned To | => jghali |
2024-03-05 07:45 | jghali | Status | new => resolved |
2024-03-05 07:45 | jghali | Resolution | open => fixed |
2024-03-05 07:45 | jghali | Fixed in Version | => 1.6.2.svn |
2024-03-05 07:45 | jghali | Note Added: 0051026 | |
2024-09-16 20:54 | cbradney | Status | resolved => closed |