[Libreoffice-commits] core.git: drawinglayer/source

Michael Stahl mstahl at redhat.com
Fri Jan 17 06:26:23 PST 2014


 drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

New commits:
commit c8e9038b13c64df430fb4e3fecac65a3c507e3e8
Author: Michael Stahl <mstahl at redhat.com>
Date:   Fri Jan 17 15:17:55 2014 +0100

    fdo#72530: drawinglayer: fix PDF export of lossless picture
    
    Don't pass empty Rectangle to PDFExtOutDevData::EndGroup(), it will
    result in early return from PDFWriterImpl::drawJPGBitmap() and no
    picture in the PDF.  Passing in the same Rectangle for the 3rd and 4th
    parameter will avoid cropping in PDFExtOutDevData.
    
    (regression from 677df250becd5cde71c6310f647e78ac3763347e)
    
    Change-Id: Icf110fe3e635319419fcacc7bc684c792a34d6ad

diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index ac5d6e7..5e14161 100644
--- a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
+++ b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
@@ -824,7 +824,8 @@ namespace drawinglayer
                             sal_Int32(floor(aCurrentRange.getMinX())), sal_Int32(floor(aCurrentRange.getMinY())),
                             sal_Int32(ceil(aCurrentRange.getMaxX())), sal_Int32(ceil(aCurrentRange.getMaxY())));
                         const GraphicAttr& rAttr = rGraphicPrimitive.getGraphicAttr();
-                        Rectangle aCropRect;
+                        // fdo#72530 don't pass empty Rectangle to EndGroup
+                        Rectangle aCropRect(aCurrentRect);
 
                         if(rAttr.IsCropped())
                         {


More information about the Libreoffice-commits mailing list