summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-01-17 15:17:55 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2014-01-21 09:40:11 +0000
commit1d2ef1adfbee6ac1fe1fa2ba369d2cbd28dd8246 (patch)
tree5713bdb0bfba9fa7afd9798bc05df0d587e2f7b6
parenta8de4627134ed8bf79a50c78a39f42fbc3be1051 (diff)
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 (cherry picked from commit c8e9038b13c64df430fb4e3fecac65a3c507e3e8) Reviewed-on: https://gerrit.libreoffice.org/7502 Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 9c569b326c9d2d71132e722a1783e7e201c1bf3c) Reviewed-on: https://gerrit.libreoffice.org/7503 Reviewed-by: Eike Rathke <erack@redhat.com> Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
-rw-r--r--drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx b/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx
index f6aad734bbbf..94fc97259f02 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())
{