diff options
author | Vinaya Mandke <vinaya.mandke@synerzip.com> | 2014-01-08 18:54:51 +0530 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-01-13 17:48:18 +0100 |
commit | c4ff46485f0461de6a2804ae859dbbc81b6af105 (patch) | |
tree | b314c4ec6ea2da7ddf85c5f091a7755e5c9d9a83 /oox/source/vml/vmlshape.cxx | |
parent | 4a68f12691d4fd77652d824ccb4147e8ce643182 (diff) |
fdo#65833 Fix to preserve VML Canvas Information
Grab-bagged the "editas" attribute of v:group and added UT for
the same
Please verify this fix on MS Office 2007 as it renders the mc:Fallback VML part
Conflicts:
sw/qa/extras/ooxmlexport/ooxmlexport.cxx
Reviewed on:
https://gerrit.libreoffice.org/7335
Change-Id: I4e4456997621089967514009005ee775b71d6d69
Diffstat (limited to 'oox/source/vml/vmlshape.cxx')
-rw-r--r-- | oox/source/vml/vmlshape.cxx | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/oox/source/vml/vmlshape.cxx b/oox/source/vml/vmlshape.cxx index 731931df66ea..31828dbba891 100644 --- a/oox/source/vml/vmlshape.cxx +++ b/oox/source/vml/vmlshape.cxx @@ -1068,6 +1068,28 @@ Reference< XShape > GroupShape::implConvertAndInsert( const Reference< XShapes > catch( Exception& ) { } + + if (!maTypeModel.maEditAs.isEmpty()) + { + uno::Reference<beans::XPropertySet> xPropertySet(xGroupShape, uno::UNO_QUERY); + uno::Sequence<beans::PropertyValue> aGrabBag; + xPropertySet->getPropertyValue("InteropGrabBag") >>= aGrabBag; + beans::PropertyValue aPair; + aPair.Name = "mso-edit-as"; + aPair.Value = uno::makeAny(maTypeModel.maEditAs); + if (aGrabBag.hasElements()) + { + sal_Int32 nLength = aGrabBag.getLength(); + aGrabBag.realloc(nLength + 1); + aGrabBag[nLength] = aPair; + } + else + { + aGrabBag.realloc(1); + aGrabBag[0] = aPair; + } + xPropertySet->setPropertyValue("InteropGrabBag", uno::makeAny(aGrabBag)); + } // Make sure group shapes are inline as well, unless there is an explicit different style. PropertySet aPropertySet(xGroupShape); lcl_SetAnchorType(aPropertySet, maTypeModel); |