diff options
author | Miklos Vajna <vmiklos@suse.cz> | 2013-08-23 10:45:58 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@suse.cz> | 2013-08-23 16:13:09 +0200 |
commit | b6a4247ea5eec433493672770e3023fb9ae7880a (patch) | |
tree | 27a0f79fbb164d7d2c8ddfb703803324df6cf53f /oox | |
parent | a1c4ab09ddd669810a412e5ab40d7f06326b55cc (diff) |
VML import: fix default value of mso-wrap-distance-left/right
Change-Id: I2168358076d9c5ce3271b21cd5a541e51aa502f9
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index e5eb0175996b..186bd509f537 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -520,14 +520,19 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes convertShapeProperties( xShape ); // Handle left/right/top/bottom wrap distance. + // Default value of mso-wrap-distance-left/right is supposed to be 0 (see + // 19.1.2.19 of the VML spec), but Word implements a non-zero value. + // [MS-ODRAW] says the below default value in 2.3.4.9. const GraphicHelper& rGraphicHelper = mrDrawing.getFilter().getGraphicHelper(); - sal_Int32 nWrapDistanceLeft = 0; + OUString aWrapDistanceLeft = OUString::number(0x0001BE7C); if (!maTypeModel.maWrapDistanceLeft.isEmpty()) - nWrapDistanceLeft = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceLeft, 0, true, true); + aWrapDistanceLeft = maTypeModel.maWrapDistanceLeft; + sal_Int32 nWrapDistanceLeft = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, aWrapDistanceLeft, 0, true, false); PropertySet(xShape).setAnyProperty(PROP_LeftMargin, uno::makeAny(nWrapDistanceLeft)); - sal_Int32 nWrapDistanceRight = 0; + OUString aWrapDistanceRight = OUString::number(0x0001BE7C); if (!maTypeModel.maWrapDistanceRight.isEmpty()) - nWrapDistanceRight = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, maTypeModel.maWrapDistanceRight, 0, true, true); + aWrapDistanceRight = maTypeModel.maWrapDistanceRight; + sal_Int32 nWrapDistanceRight = ConversionHelper::decodeMeasureToHmm(rGraphicHelper, aWrapDistanceRight, 0, true, false); PropertySet(xShape).setAnyProperty(PROP_RightMargin, uno::makeAny(nWrapDistanceRight)); sal_Int32 nWrapDistanceTop = 0; if (!maTypeModel.maWrapDistanceTop.isEmpty()) |