hi
ok
On 12/02/26 20:10 +0100, Matthias Kilian wrote:
> Hi,
>
> this fixes libreoffice for the upcoming update to poppler-26.02.0.
>
> Patches are from upstream, with proper #if's, so it should still
> build with poppler-26.01.0.
>
> ok?
>
> Ciao,
> Kili
>
> Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
> ===================================================================
> RCS file: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
> diff -N patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_cxx
> 11 Feb 2026 21:37:27 -0000
> @@ -0,0 +1,75 @@
> +Fix build with poppler-26.02.0.
> +
> +From upstream commit 3c29b709cd2b5b18776b3c15638b66bd8a7dcb07.
> +
> +Index: sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
> +--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx.orig
> ++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
> +@@ -711,13 +711,17 @@ void PDFOutDev::restoreState(GfxState*)
> + printf( "restoreState\n" );
> + }
> +
> +-#if POPPLER_CHECK_VERSION(0, 71, 0)
> ++#if POPPLER_CHECK_VERSION(26, 2, 0)
> ++void PDFOutDev::setDefaultCTM(const std::array<double, 6> &pMat)
> ++#elif POPPLER_CHECK_VERSION(0, 71, 0)
> + void PDFOutDev::setDefaultCTM(const double *pMat)
> + #else
> + void PDFOutDev::setDefaultCTM(double *pMat)
> + #endif
> + {
> ++#if !POPPLER_CHECK_VERSION(26, 2, 0)
> + assert(pMat);
> ++#endif
> +
> + OutputDev::setDefaultCTM(pMat);
> +
> +@@ -737,8 +741,12 @@ void PDFOutDev::updateCTM(GfxState* state,
> + {
> + assert(state);
> +
> ++#if POPPLER_CHECK_VERSION(26, 2, 0)
> ++ const std::array<double, 6> pMat = state->getCTM();
> ++#else
> + const double* const pMat = state->getCTM();
> + assert(pMat);
> ++#endif
> +
> + printf( "updateCtm %f %f %f %f %f %f\n",
> + normalize(pMat[0]),
> +@@ -1044,7 +1052,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, do
> +
> + double csdx = 0.0;
> + double csdy = 0.0;
> ++#if POPPLER_CHECK_VERSION(26, 2, 0)
> ++ if (!state->getFont() || GfxFont::WritingMode::Horizontal ==
> state->getFont()->getWMode())
> ++#else
> + if (!state->getFont() || !state->getFont()->getWMode())
> ++#endif
> + {
> + csdx = state->getCharSpace();
> + if (*u == ' ')
> +@@ -1067,7 +1079,11 @@ void PDFOutDev::drawChar(GfxState *state, double x, do
> + const double aPositionX(x-originX);
> + const double aPositionY(y-originY);
> +
> ++#if POPPLER_CHECK_VERSION(26, 2, 0)
> ++ const std::array<double, 6> pTextMat=state->getTextMat();
> ++#else
> + const double* pTextMat=state->getTextMat();
> ++#endif
> + printf( "drawChar %f %f %f %f %f %f %f %f %f ",
> + normalize(aPositionX),
> + normalize(aPositionY),
> +@@ -1348,7 +1364,11 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState *st
> +
> + const int nDPI = 72; // GfxState seems to have 72.0 as magic for some
> reason
> + auto pSplashGfxState = new GfxState(nDPI, nDPI, &aBox, 0, false);
> ++#if POPPLER_CHECK_VERSION(26, 2, 0)
> ++ auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, nullptr);
> ++#else
> + auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, false,
> nullptr);
> ++#endif
> + pSplashOut->setEnableFreeType(false);
> + pSplashOut->startDoc(m_pDoc);
> + pSplashOut->startPage(0 /* pageNum */, pSplashGfxState, nullptr /* xref
> */);
> Index: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
> ===================================================================
> RCS file: patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
> diff -N patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-sdext_source_pdfimport_xpdfwrapper_pdfioutdev_gpl_hxx
> 11 Feb 2026 21:37:27 -0000
> @@ -0,0 +1,62 @@
> +Fix build with poppler-26.02.0.
> +
> +From upstream commit 3c29b709cd2b5b18776b3c15638b66bd8a7dcb07.
> +
> +Index: sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
> +--- sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx.orig
> ++++ sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
> +@@ -84,13 +84,21 @@ namespace pdfi
> + isUnderline(rSrc.isUnderline),
> + size(rSrc.size)
> + {
> ++#if POPPLER_CHECK_VERSION(26, 2, 0)
> ++ familyName.append(rSrc.getFamilyName());
> ++#else
> + familyName.append(&rSrc.getFamilyName());
> ++#endif
> + }
> +
> + FontAttributes& operator=( const FontAttributes& rSrc )
> + {
> + familyName.clear();
> ++#if POPPLER_CHECK_VERSION(26, 2, 0)
> ++ familyName.append(rSrc.getFamilyName());
> ++#else
> + familyName.append(&rSrc.getFamilyName());
> ++#endif
> +
> + isEmbedded = rSrc.isEmbedded;
> + maFontWeight= rSrc.maFontWeight;
> +@@ -103,12 +111,21 @@ namespace pdfi
> +
> + bool operator==(const FontAttributes& rFont) const
> + {
> ++#if POPPLER_CHECK_VERSION(26, 2, 0)
> ++ return getFamilyName().compare(rFont.getFamilyName())==0 &&
> ++ isEmbedded == rFont.isEmbedded &&
> ++ maFontWeight == rFont.maFontWeight &&
> ++ isItalic == rFont.isItalic &&
> ++ isUnderline == rFont.isUnderline &&
> ++ size == rFont.size;
> ++#else
> + return getFamilyName().cmp(&rFont.getFamilyName())==0 &&
> + isEmbedded == rFont.isEmbedded &&
> + maFontWeight == rFont.maFontWeight &&
> + isItalic == rFont.isItalic &&
> + isUnderline == rFont.isUnderline &&
> + size == rFont.size;
> ++#endif
> + }
> +
> + GooString familyName;
> +@@ -171,7 +188,9 @@ namespace pdfi
> + //----- initialization and control
> +
> + // Set default transform matrix.
> +-#if POPPLER_CHECK_VERSION(0, 71, 0)
> ++#if POPPLER_CHECK_VERSION(26, 2, 0)
> ++void setDefaultCTM(const std::array<double, 6> &pMat) override;
> ++#elif POPPLER_CHECK_VERSION(0, 71, 0)
> + virtual void setDefaultCTM(const double *ctm) override;
> + #else
> + virtual void setDefaultCTM(double *ctm) override;
--
Regards,
Robert Nagy