Author: alg Date: Tue Feb 18 22:09:25 2014 New Revision: 1569541 URL: http://svn.apache.org/r1569541 Log: i121494 Corrected text decomposition when no text distances for text frame are given
Modified: openoffice/trunk/main/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx Modified: openoffice/trunk/main/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx URL: http://svn.apache.org/viewvc/openoffice/trunk/main/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx?rev=1569541&r1=1569540&r2=1569541&view=diff ============================================================================== --- openoffice/trunk/main/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx (original) +++ openoffice/trunk/main/svx/source/sdr/primitive2d/sdrdecompositiontools.cxx Tue Feb 18 22:09:25 2014 @@ -256,10 +256,13 @@ namespace drawinglayer aTextAnchorRange.expand(aTopLeft); aTextAnchorRange.expand(aBottomRight); - // now create a transformation from this basic range (aTextAnchorRange) - aAnchorTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( - aTextAnchorRange.getWidth(), aTextAnchorRange.getHeight(), - aTextAnchorRange.getMinX(), aTextAnchorRange.getMinY()); + // now create a transformation from this basic range (aTextAnchorRange) + // #121494# if we have no scale use at least 1.0 to have a carrier e.g. for + // mirror values, else these will get lost + aAnchorTransform = basegfx::tools::createScaleTranslateB2DHomMatrix( + basegfx::fTools::equalZero(aTextAnchorRange.getWidth()) ? 1.0 : aTextAnchorRange.getWidth(), + basegfx::fTools::equalZero(aTextAnchorRange.getHeight()) ? 1.0 : aTextAnchorRange.getHeight(), + aTextAnchorRange.getMinX(), aTextAnchorRange.getMinY()); // apply mirroring aAnchorTransform.scale(bMirrorX ? -1.0 : 1.0, bMirrorY ? -1.0 : 1.0);