Ticket #22759: libreoffice-26.2.0.3-poppler_26.02-1.patch

File libreoffice-26.2.0.3-poppler_26.02-1.patch, 3.6 KB (added by martyj19, 8 months ago)

Adjust for build failures provoked by poppler 26.02.0

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

    diff -Naur libreoffice-26.2.0.3.orig/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx libreoffice-26.2.0.3/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
    old new  
    712712}
    713713
    714714#if POPPLER_CHECK_VERSION(0, 71, 0)
    715 void PDFOutDev::setDefaultCTM(const double *pMat)
     715void PDFOutDev::setDefaultCTM(const std::array<double, 6> & pMat)
    716716#else
    717717void PDFOutDev::setDefaultCTM(double *pMat)
    718718#endif
    … …  
    737737{
    738738    assert(state);
    739739
    740     const double* const pMat = state->getCTM();
    741     assert(pMat);
     740    const std::array<double, 6> pMat = state->getCTM();
    742741
    743742    printf( "updateCtm %f %f %f %f %f %f\n",
    744743            normalize(pMat[0]),
    … …  
    10441043
    10451044    double csdx = 0.0;
    10461045    double csdy = 0.0;
    1047     if (!state->getFont() || !state->getFont()->getWMode())
     1046    if (!state->getFont() || state->getFont()->getWMode() == GfxFont::WritingMode::Horizontal)
    10481047    {
    10491048        csdx = state->getCharSpace();
    10501049        if (*u == ' ')
    … …  
    10671066    const double aPositionX(x-originX);
    10681067    const double aPositionY(y-originY);
    10691068
    1070     const double* pTextMat=state->getTextMat();
     1069    const std::array<double, 6> pTextMat=state->getTextMat();
    10711070    printf( "drawChar %f %f %f %f %f %f %f %f %f ",
    10721071            normalize(aPositionX),
    10731072            normalize(aPositionY),
    … …  
    13481347
    13491348    const int nDPI = 72; // GfxState seems to have 72.0 as magic for some reason
    13501349    auto pSplashGfxState = new GfxState(nDPI, nDPI, &aBox, 0, false);
    1351     auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, false, nullptr);
     1350    auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, nullptr);
    13521351    pSplashOut->setEnableFreeType(false);
    13531352    pSplashOut->startDoc(m_pDoc);
    13541353    pSplashOut->startPage(0 /* pageNum */, pSplashGfxState, nullptr /* xref */);
  • sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx

    diff -Naur libreoffice-26.2.0.3.orig/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx libreoffice-26.2.0.3/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.hxx
    old new  
    8484            isUnderline(rSrc.isUnderline),
    8585            size(rSrc.size)
    8686        {
    87             familyName.append(&rSrc.getFamilyName());
     87            familyName.append(rSrc.getFamilyName());
    8888        }
    8989
    9090        FontAttributes& operator=( const FontAttributes& rSrc )
    9191        {
    9292            familyName.clear();
    93             familyName.append(&rSrc.getFamilyName());
     93            familyName.append(rSrc.getFamilyName());
    9494
    9595            isEmbedded  = rSrc.isEmbedded;
    9696            maFontWeight= rSrc.maFontWeight;
    … …  
    103103
    104104        bool operator==(const FontAttributes& rFont) const
    105105        {
    106             return getFamilyName().cmp(&rFont.getFamilyName())==0 &&
     106            return getFamilyName().compare(rFont.getFamilyName())==0 &&
    107107                isEmbedded == rFont.isEmbedded &&
    108108                maFontWeight == rFont.maFontWeight &&
    109109                isItalic == rFont.isItalic &&
    … …  
    172172
    173173        // Set default transform matrix.
    174174#if POPPLER_CHECK_VERSION(0, 71, 0)
    175         virtual void setDefaultCTM(const double *ctm) override;
     175        virtual void setDefaultCTM(const std::array<double, 6> & ctm) override;
    176176#else
    177177        virtual void setDefaultCTM(double *ctm) override;
    178178#endif