Ticket #23238: libreoffice-26.2.4.2-poppler_26.06-1.patch

File libreoffice-26.2.4.2-poppler_26.06-1.patch, 2.7 KB (added by martyj19, 4 months ago)

Adjustment for poppler 26.06

  • sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx

    diff -Naur libreoffice-26.2.4.2.orig/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx libreoffice-26.2.4.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
    old new  
    12241224            GfxRGB aMinRGB;
    12251225            colorMap->getColorSpace()->getRGB(
    12261226#if POPPLER_CHECK_VERSION(0, 82, 0)
    1227                 reinterpret_cast<const GfxColor*>(maskColors),
     1227                *(reinterpret_cast<const GfxColor*>(maskColors)),
    12281228#else
    12291229                reinterpret_cast<GfxColor*>(maskColors),
    12301230#endif
    … …  
    12331233            GfxRGB aMaxRGB;
    12341234            colorMap->getColorSpace()->getRGB(
    12351235#if POPPLER_CHECK_VERSION(0, 82, 0)
    1236                 reinterpret_cast<const GfxColor*>(maskColors)+gfxColorMaxComps,
     1236                *(reinterpret_cast<const GfxColor*>(maskColors)+gfxColorMaxComps),
    12371237#else
    12381238                reinterpret_cast<GfxColor*>(maskColors)+gfxColorMaxComps,
    12391239#endif
    … …  
    13651365    aBox.y2 = pBbox[3];
    13661366
    13671367    const int nDPI = 72; // GfxState seems to have 72.0 as magic for some reason
    1368     auto pSplashGfxState = new GfxState(nDPI, nDPI, &aBox, 0, false);
     1368    auto pSplashGfxState = new GfxState(nDPI, nDPI, aBox, 0, false);
    13691369#if POPPLER_CHECK_VERSION(26, 2, 0)
    13701370    auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, nullptr);
    13711371#else
    … …  
    13751375    pSplashOut->startDoc(m_pDoc);
    13761376    pSplashOut->startPage(0 /* pageNum */, pSplashGfxState, nullptr /* xref */);
    13771377
    1378     auto pSplashGfx = new Gfx(m_pDoc, pSplashOut, pResDict, &aBox, nullptr);
     1378    auto pSplashGfx = new Gfx(m_pDoc, pSplashOut, pResDict, aBox, nullptr);
    13791379    pSplashGfx->display(aStr);
    13801380    std::unique_ptr<SplashBitmap> pSplashBitmap(pSplashOut->takeBitmap());
    13811381    // Poppler tells us to free the splash device immediately after taking the
    13821382    // bitmap
    1383     delete pSplashGfxState;
    1384     delete pSplashGfx;
    13851383    delete pSplashOut;
    13861384
    13871385    // Add a vertical flip, we can't do this in LO for an image filled poly
  • sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx

    diff -Naur libreoffice-26.2.4.2.orig/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx libreoffice-26.2.4.2/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
    old new  
    3737#include <GfxFont.h>
    3838#include <UnicodeMap.h>
    3939#include <Link.h>
     40#include <Annot.h>
    4041#include <Object.h>
    4142#include <OutputDev.h>
    4243#include <GlobalParams.h>