• Miklos Vajna's avatar
    tdf#106702 PDF export: fix missing images from Writer headers/footers · 4c2172a3
    Miklos Vajna yazdı
    Position of an image is determined by the relevant bitmap scale metafile
    action when recompressing images.
    
    The same position was determined by PDFExtOutDevData "meta" info when
    not recompressing images. This second rectangle was never correct for
    images repeated in Writer headers/footers on non-first pages: the
    position was relative to the page, while PDF export sets the map mode
    (origin) of the output device during export, so such positions are
    expected to be absolute ones.
    
    The root of the problem seems to be that header images in Writer are
    both repeated (as the user sees it) and unrepeated (as the doc model
    sees it), and by the time we want to get its position, we only see the
    unrepeated SdrObject.
    
    Fix the problem by using the correct position from the scale action and
    not from PDFExtOutDevData if possible.
    
    (Also give up on running CppunitTest_vcl_pdfexport in the non-pdfium
    case, most of the tests there do require pdfium anyway, and the growing
    ifdef forest in that file just made it hard to read the code.)
    
    Change-Id: I31c14d4bd223b2804859982542ebd6d5f9abd312
    Reviewed-on: https://gerrit.libreoffice.org/54674Reviewed-by: 's avatarMiklos Vajna <vmiklos@collabora.co.uk>
    Tested-by: 's avatarJenkins <ci@libreoffice.org>
    4c2172a3
Module_vcl.mk 6.03 KB