Author: alg Date: Mon Jan 20 20:20:44 2014 New Revision: 1559824 URL: http://svn.apache.org/r1559824 Log: Corrected initialization of CropRect on Metafile output when creating extra data for PDF export
Modified: openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx Modified: openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx?rev=1559824&r1=1559823&r2=1559824&view=diff ============================================================================== --- openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx (original) +++ openoffice/trunk/main/drawinglayer/source/processor2d/vclmetafileprocessor2d.cxx Mon Jan 20 20:20:44 2014 @@ -796,7 +796,19 @@ 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; + + // #123295# As described below this is the expanded, uncropped region + // and needs to be given in any case, especially when no cropping it is + // equal to the current rect. To make clear: normally the uncropped region + // (aka the aCropRect) is bigger than the CurrentRect. Or in other words: + // The current rect is the object area. This internal crop definition is + // somewhat crude, but used (and defined in graphic-dependent units what + // leads to even more problems, percentages would have been better). All + // in all this is a place that makes clear that a pure PDF export which does + // not use Metafile and the associated hacks (like this one) but is based on + // Primitves and uses a Primitive Renderer would be the better choice for + // the future. + Rectangle aCropRect(aCurrentRect); if(rAttr.IsCropped()) {