summaryrefslogtreecommitdiff
path: root/oox/source/export/shapes.cxx
diff options
context:
space:
mode:
authorMiklos Vajna <vmiklos@collabora.co.uk>2014-01-02 11:14:54 +0100
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-01-02 12:09:22 +0100
commita34341376f642402e34939aba59da0260e5c9b5d (patch)
tree096a9a06318d4c216e4e9ed1023780789bdc378b /oox/source/export/shapes.cxx
parentd17a83fa549f828f29e6939b16ba8b568a75f95e (diff)
oox: fix export of BezierShapes in DOCX
Change-Id: I6fce580fc68c9ab2a56e342d6c5473f46e9a7f56
Diffstat (limited to 'oox/source/export/shapes.cxx')
-rw-r--r--oox/source/export/shapes.cxx24
1 files changed, 15 insertions, 9 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 4c7af94e451b..a26da948660b 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -192,7 +192,7 @@ ShapeExport& ShapeExport::WriteBezierShape( Reference< XShape > xShape, sal_Bool
DBG(printf("write open bezier shape\n"));
FSHelperPtr pFS = GetFS();
- pFS->startElementNS( mnXmlNamespace, XML_sp, FSEND );
+ pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
PolyPolygon aPolyPolygon = EscherPropertyContainer::GetPolyPolygon( xShape );
Rectangle aRect( aPolyPolygon.GetBoundRect() );
@@ -203,14 +203,20 @@ ShapeExport& ShapeExport::WriteBezierShape( Reference< XShape > xShape, sal_Bool
#endif
// non visual shape properties
- pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
- pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
- XML_id, I32S( GetNewShapeID( xShape ) ),
- XML_name, IDS( Freeform ),
- FSEND );
+ if (GetDocumentType() != DOCUMENT_DOCX)
+ {
+ pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
+ pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
+ XML_id, I32S( GetNewShapeID( xShape ) ),
+ XML_name, IDS( Freeform ),
+ FSEND );
+ }
pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
- WriteNonVisualProperties( xShape );
- pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
+ if (GetDocumentType() != DOCUMENT_DOCX)
+ {
+ WriteNonVisualProperties( xShape );
+ pFS->endElementNS( mnXmlNamespace, XML_nvSpPr );
+ }
// visual shape properties
pFS->startElementNS( mnXmlNamespace, XML_spPr, FSEND );
@@ -228,7 +234,7 @@ ShapeExport& ShapeExport::WriteBezierShape( Reference< XShape > xShape, sal_Bool
// write text
WriteTextBox( xShape, mnXmlNamespace );
- pFS->endElementNS( mnXmlNamespace, XML_sp );
+ pFS->endElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp) );
return *this;
}