Kaydet (Commit) c161ceb9 authored tarafından Miklos Vajna's avatar Miklos Vajna

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
üst 5d3b3b9f
......@@ -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;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment