sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx |    1 +
 1 file changed, 1 insertion(+)

New commits:
commit aec41175e8e150e0cb728aa5fa1a4f40cd1fb718
Author:     Dr. David Alan Gilbert <d...@treblig.org>
AuthorDate: Tue Sep 10 13:11:10 2024 +0100
Commit:     Hossein <hoss...@libreoffice.org>
CommitDate: Fri Sep 27 15:59:14 2024 +0200

    tdf#162887 sdext.pdfimport: Fix tilingPatternFill crash
    
    regression from
      commit 8ac5f40b330c6cd248073b8686c05f566ecd7195
      Author: Dr. David Alan Gilbert <d...@treblig.org>
      tdf#113050 sdext.pdfimport: Write the tiling pattern image
    
    The logo in the test file in tdf#159115 appears to be a tiling pattern
    fill where the fill is actually rendered text (instead of just an image)
    and this triggers splash to try and look at it's font code (even though
    I've already got EnableFreeType off) and that was initialised by
    startDoc which I'd failed to call.  Call it.
    
    Note this doesn't fix tdf#159115, which originally had 4 copies of the
    logo, the current state is it has one unrendered white blob, but lets
    get rid of the crash first.
    
    Change-Id: I4e3f29cedcb8aefbb5adf96f696bf08457fbd58a
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173139
    Tested-by: Hossein   <hoss...@libreoffice.org>
    Tested-by: Jenkins
    Reviewed-by: Hossein   <hoss...@libreoffice.org>

diff --git a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx 
b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
index 57164f27cb42..e656df393b53 100644
--- a/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
+++ b/sdext/source/pdfimport/xpdfwrapper/pdfioutdev_gpl.cxx
@@ -1262,6 +1262,7 @@ poppler_bool PDFOutDev::tilingPatternFill(GfxState 
*state, Gfx *, Catalog *,
     auto pSplashGfxState = new GfxState(nDPI, nDPI, &aBox, 0, false);
     auto pSplashOut = new SplashOutputDev(splashModeRGB8, 1, false, nullptr);
     pSplashOut->setEnableFreeType(false);
+    pSplashOut->startDoc(m_pDoc);
     pSplashOut->startPage(0 /* pageNum */, pSplashGfxState, nullptr /* xref 
*/);
 
     auto pSplashGfx = new Gfx(m_pDoc, pSplashOut, pResDict, &aBox, nullptr);

Reply via email to