diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-11 17:07:16 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2013-12-11 18:12:13 +0100 |
commit | 784d3e2b49fb55bfc46723a99fd00d43f31e090a (patch) | |
tree | 5838b99b0868497eea11b1c0dfecf3fdd6b790ba /oox | |
parent | 87b2bc2cc31b4bc334af8d598684a340242d3633 (diff) |
drawingml export: fix EllipseShape for docx
Change-Id: Ifc5e6ae2f3161e33f93b1485269f6dc164f74e40
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/export/shapes.cxx | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index d63e8e78a955..3616c4ef4777 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -338,19 +338,24 @@ ShapeExport& ShapeExport::WriteEllipseShape( Reference< XShape > xShape ) FSHelperPtr pFS = GetFS(); - pFS->startElementNS( mnXmlNamespace, XML_sp, FSEND ); + pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND ); // TODO: arc, section, cut, connector // non visual shape properties - pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND ); - pFS->singleElementNS( mnXmlNamespace, XML_cNvPr, - XML_id, I32S( GetNewShapeID( xShape ) ), - XML_name, IDS( Ellipse ), - FSEND ); - pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND ); - WriteNonVisualProperties( xShape ); - pFS->endElementNS( mnXmlNamespace, XML_nvSpPr ); + if (GetDocumentType() != DOCUMENT_DOCX) + { + pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND ); + pFS->singleElementNS( mnXmlNamespace, XML_cNvPr, + XML_id, I32S( GetNewShapeID( xShape ) ), + XML_name, IDS( Ellipse ), + FSEND ); + pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND ); + WriteNonVisualProperties( xShape ); + pFS->endElementNS( mnXmlNamespace, XML_nvSpPr ); + } + else + pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr, FSEND); // visual shape properties pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND ); @@ -367,7 +372,7 @@ ShapeExport& ShapeExport::WriteEllipseShape( 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; } |