From 9e8957de203bb9abb208516ad32aee9527feb67b Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Thu, 7 Jun 2012 10:51:45 +0200 Subject: n#757905 fix VML import of mso-wrap-style:none There were two problems here: 1) SimpleShape::implConvertAndInsert() did not set the anchor type 2) DomainMapper_Impl::PushShapeContext() tried to overwrite it Change-Id: I2c32016c4bb15c891cf287d8208e10817c6291e6 --- oox/source/token/properties.txt | 1 + oox/source/vml/vmlshape.cxx | 3 +++ oox/source/vml/vmlshapecontext.cxx | 1 + 3 files changed, 5 insertions(+) (limited to 'oox/source') diff --git a/oox/source/token/properties.txt b/oox/source/token/properties.txt index f2442e678819..596bf826bba3 100644 --- a/oox/source/token/properties.txt +++ b/oox/source/token/properties.txt @@ -10,6 +10,7 @@ AdjustmentValues Address Align AnchorPosition +AnchorType ApplyFormDesignMode AreaLinks ArrangeOrder diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index aa39fcc97491..44fc631b38d9 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -426,6 +426,9 @@ Reference< XShape > SimpleShape::implConvertAndInsert( const Reference< XShapes aPropertySet.setAnyProperty(PROP_VertOrientPosition, makeAny( aShapeRect.Y ) ); } + if (xShape.is() && maTypeModel.maWrapStyle == "none") + PropertySet(xShape).setAnyProperty(PROP_AnchorType, makeAny(text::TextContentAnchorType_AS_CHARACTER)); + return xShape; } diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index 68793c947aef..290a7371ce98 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -363,6 +363,7 @@ void ShapeTypeContext::setStyle( const OUString& rStyle ) else if( aName == "flip" ) mrTypeModel.maFlip = aValue; else if( aName.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "visibility" ) ) ) mrTypeModel.mbVisible = !aValue.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM("hidden") ); + else if( aName == "mso-wrap-style" ) mrTypeModel.maWrapStyle = aValue; } } } -- cgit