[Libreoffice-commits] .: oox/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Sep 20 07:34:58 PDT 2012
oox/source/vml/vmlshape.cxx | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
New commits:
commit b5a1db961372b3fa66724ee580726c67e7683dbc
Author: Miklos Vajna <vmiklos at suse.cz>
Date: Thu Sep 20 16:13:51 2012 +0200
n#779834 fix VML import of absolutely positioned image with no left margin
Given that we talk about mm100, changing 0 to 1 is not that harmful, and
it seems later core would crash without at least a small margin.
Change-Id: I913e4a5eeaba2e36b55f2d7d7fb5bdfbad8eae94
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx
index 0bd3399..fecade9 100644
--- a/oox/source/vml/vmlshape.cxx
+++ b/oox/source/vml/vmlshape.cxx
@@ -172,8 +172,13 @@ Rectangle ShapeType::getAbsRectangle() const
if ( nHeight == 0 )
nHeight = 1;
+ sal_Int32 nLeft = ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maLeft, 0, true, true )
+ + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maMarginLeft, 0, true, true );
+ if (nLeft == 0 && maTypeModel.maPosition == "absolute")
+ nLeft = 1;
+
return Rectangle(
- ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maLeft, 0, true, true ) + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maMarginLeft, 0, true, true ),
+ nLeft,
ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maTop, 0, false, true ) + ConversionHelper::decodeMeasureToHmm( rGraphicHelper, maTypeModel.maMarginTop, 0, false, true ),
nWidth, nHeight );
}
More information about the Libreoffice-commits
mailing list