summaryrefslogtreecommitdiff
path: root/oox/source/shape
diff options
context:
space:
mode:
authorAndres Gomez <agomez@igalia.com>2013-09-03 11:13:22 +0300
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-09-11 07:35:59 +0000
commitab0998c77cc5b1f15c4d584185e7c401ef6fe62b (patch)
tree2602d208420e976b8feeb9282c42d79c13a9ee49 /oox/source/shape
parentfca4b8d48b07d522dadc86757423b93d1829621b (diff)
oox: Smart-Art DOMs stored in the InteropGrabBag
The XDocuments representing the DOM documents of a DrawingML diagram (Smart-Art) are now stored as the PropertyValues "OOXData", "OOXLayout", "OOXStyle", "OOXColor" and "OOXDrawing" into the "InteropGraBag" property of the parent SvxGroupShape created from such diagram. Modified the oox::drawingml::dgm::Diagram class to be able to hold the map storing the XDocuments and its names. Added the getDomMap() method to obtain the map directly and the getDomsAsPropertyValues method to get the map as a sequence of Property Values. Modified the methods for importing and loading the Smart-Art into the Diagram so they add automatically the DOM documents to it. Modified the oox::drawingml::Shape class to be able to hold the sequence of PropertyValues storing the XDocuments and its names coming from the oox::drawingml::dgm::Diagram class. Added the getDiagramDoms() and setDiagramDoms() methods. Enhanced the oox::shape::ShapeContextHandler::getShape() method to add the extended drawing document to the oox::drawingml::Shape class. Modified the oox::drawingml::Shape::createAndInsert() method to store the sequence of XDocuments in the "InteropGrabBag" property of the GroupShape service SvxGroupShape implementation representing a Smart-Art. Change-Id: I7d0b9dfbfc9d5299ddd25fab394e5e9a422d1dd1 Reviewed-on: https://gerrit.libreoffice.org/5849 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'oox/source/shape')
-rw-r--r--oox/source/shape/ShapeContextHandler.cxx9
1 files changed, 9 insertions, 0 deletions
diff --git a/oox/source/shape/ShapeContextHandler.cxx b/oox/source/shape/ShapeContextHandler.cxx
index 3f601b328309..461a1fe175aa 100644
--- a/oox/source/shape/ShapeContextHandler.cxx
+++ b/oox/source/shape/ShapeContextHandler.cxx
@@ -326,6 +326,15 @@ ShapeContextHandler::getShape() throw (uno::RuntimeException)
OUString aFragmentPath(pDiagramGraphicDataContext->getFragmentPathFromRelId(*aIt));
oox::drawingml::ShapePtr pShapePtr( new Shape( "com.sun.star.drawing.GroupShape" ) );
mxFilterBase->importFragment(new ShapeDrawingFragmentHandler(*mxFilterBase, aFragmentPath, pShapePtr));
+
+ uno::Sequence<beans::PropertyValue> aValue(mpShape->getDiagramDoms());
+ sal_Int32 length = aValue.getLength();
+ aValue.realloc(length+1);
+ beans::PropertyValue* pValue = aValue.getArray();
+ pValue[length].Name = OUString::createFromAscii("OOXDrawing");
+ pValue[length].Value = uno::makeAny( mxFilterBase->importFragment( aFragmentPath ) );
+ pShapePtr->setDiagramDoms( aValue );
+
pShapePtr->addShape( *mxFilterBase, mpThemePtr.get(), xShapes, aMatrix, pShapePtr->getFillProperties() );
xResult = pShapePtr->getXShape();
}