summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2013-12-16 17:19:30 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2013-12-16 17:28:36 +0100
commitf873ee187b67e9fb3a08ed2735b494e823fe7dd9 (patch)
tree8e306de1bd6475c0cd194e02142d4954dad37536
parentff422223e50682f7b81fb89b97f0b5429480f009 (diff)
oox: fix ShapeExport::WriteRectangleShape() for docx
This fixes testFdo60990 in CppunitTest_sw_ooxmlexport when DML export is enabled in non-experimental mode. Change-Id: If69bdb6ed8798ccd3e5e3bb55ec4d2a598fd6060
-rw-r--r--oox/source/export/shapes.cxx6
1 files changed, 4 insertions, 2 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 3e9a08242f48..6a793b741b49 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -661,7 +661,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( mnXmlNamespace, XML_sp, FSEND );
+ pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
sal_Int32 nRadius = 0;
@@ -677,6 +677,8 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
}
// non visual shape properties
+ if (GetDocumentType() == DOCUMENT_DOCX)
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
XML_id, I32S( GetNewShapeID( xShape ) ),
@@ -701,7 +703,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
// write text
WriteTextBox( xShape, mnXmlNamespace );
- pFS->endElementNS( mnXmlNamespace, XML_sp );
+ pFS->endElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp) );
return *this;
}