summaryrefslogtreecommitdiff
path: root/oox
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-12-23 17:02:09 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-23 17:06:41 +0100
commitc161ceb9056ca5f686e615965ae0bb3efd8acea7 (patch)
tree7a7eeba96610eeac6a07dc288ca9b545f76d6c41 /oox
parent5d3b3b9fc15bac8bba286e64a6a0e28f2dbb8529 (diff)
oox: fix drawingml export of nested groupshapes
It turns out drawingml requires using different XML elements in case the groupshape is a toplevel one or a nested one. Change-Id: I9b76f9d0ae48cd80aaf0d6d41f1eb071cdc8cc07
Diffstat (limited to 'oox')
-rw-r--r--oox/source/export/shapes.cxx7
1 files changed, 5 insertions, 2 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index b2b39a4a84f8..4c7af94e451b 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -246,7 +246,10 @@ ShapeExport& ShapeExport::WriteOpenBezierShape( Reference< XShape > xShape )
ShapeExport& ShapeExport::WriteGroupShape(uno::Reference<drawing::XShape> xShape)
{
FSHelperPtr pFS = GetFS();
- pFS->startElementNS(mnXmlNamespace, XML_wgp, FSEND);
+ bool bToplevel = !m_xParent.is();
+ if (!bToplevel)
+ mnXmlNamespace = XML_wpg;
+ pFS->startElementNS(mnXmlNamespace, (bToplevel ? XML_wgp : XML_grpSp), FSEND);
// non visual properties
pFS->singleElementNS(mnXmlNamespace, XML_cNvGrpSpPr, FSEND);
@@ -269,7 +272,7 @@ ShapeExport& ShapeExport::WriteGroupShape(uno::Reference<drawing::XShape> xShape
}
m_xParent = xParent;
- pFS->endElementNS(mnXmlNamespace, XML_wgp);
+ pFS->endElementNS(mnXmlNamespace, (bToplevel ? XML_wgp : XML_grpSp));
return *this;
}