diff options
author | Sourav <sourav.mahajan@synerzip.com> | 2014-04-04 18:06:44 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-04-08 03:20:50 -0500 |
commit | 69eebf8735973a05c931182d2ebfe35ce25f4b1a (patch) | |
tree | 4cdb8edaadcc57d7c742d508c761549dda455993 /oox | |
parent | ceb199692c42d86903bc4e7df11fa895c92e95c1 (diff) |
fdo76591:-Textbox property (order-> send behind text) is not preserved.
Z-Index was not handledin LO for vml.
I have made the changes to handle that using aGrabBag.
Change-Id: I2af3b2974c8eb699bc6a7b743dc438584d6517ac
Reviewed-on: https://gerrit.libreoffice.org/8833
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 14 | ||||
-rw-r--r-- | oox/source/vml/vmlshapecontext.cxx | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index e79c9b803c76..d4bdbcfb1ea9 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -41,6 +41,7 @@ #include <com/sun/star/text/XTextContent.hpp> #include <com/sun/star/text/XTextDocument.hpp> #include <com/sun/star/text/XTextFrame.hpp> + #include <com/sun/star/lang/XServiceInfo.hpp> #include <com/sun/star/text/TextContentAnchorType.hpp> #include <rtl/math.hxx> #include <rtl/ustrbuf.hxx> @@ -322,6 +323,19 @@ Reference< XShape > ShapeBase::convertAndInsert( const Reference< XShapes >& rxS PropertySet aShapeProp( xShape ); if( aShapeProp.hasProperty( PROP_Name ) ) aShapeProp.setProperty( PROP_Name, getShapeName() ); + uno::Reference< lang::XServiceInfo > xSInfo( xShape, uno::UNO_QUERY_THROW ); + if (xSInfo->supportsService("com.sun.star.text.TextFrame")) + { + uno::Sequence<beans::PropertyValue> aGrabBag; + uno::Reference<beans::XPropertySet> propertySet (xShape, uno::UNO_QUERY); + propertySet->getPropertyValue("FrameInteropGrabBag") >>= aGrabBag; + sal_Int32 length = aGrabBag.getLength(); + + aGrabBag.realloc( length+1 ); + aGrabBag[length].Name = "VML-Z-ORDER"; + aGrabBag[length].Value = uno::makeAny( maTypeModel.maZIndex.toInt32() ); + propertySet->setPropertyValue( "FrameInteropGrabBag", uno::makeAny(aGrabBag) ); + } Reference< XControlShape > xControlShape( xShape, uno::UNO_QUERY ); if ( xControlShape.is() && !getTypeModel().mbVisible ) { diff --git a/oox/source/vml/vmlshapecontext.cxx b/oox/source/vml/vmlshapecontext.cxx index fdeca3276169..146940e03041 100644 --- a/oox/source/vml/vmlshapecontext.cxx +++ b/oox/source/vml/vmlshapecontext.cxx @@ -399,6 +399,7 @@ void ShapeTypeContext::setStyle( const OUString& rStyle ) if( ConversionHelper::separatePair( aName, aValue, rStyle.getToken( 0, ';', nIndex ), ':' ) ) { if( aName == "position" ) mrTypeModel.maPosition = aValue; + else if( aName == "z-index" ) mrTypeModel.maZIndex = aValue; else if( aName == "left" ) mrTypeModel.maLeft = aValue; else if( aName == "top" ) mrTypeModel.maTop = aValue; else if( aName == "width" ) mrTypeModel.maWidth = aValue; |