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

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
üst ff422223
...@@ -661,7 +661,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape ) ...@@ -661,7 +661,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
FSHelperPtr pFS = GetFS(); FSHelperPtr pFS = GetFS();
pFS->startElementNS( mnXmlNamespace, XML_sp, FSEND ); pFS->startElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp), FSEND );
sal_Int32 nRadius = 0; sal_Int32 nRadius = 0;
...@@ -677,6 +677,8 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape ) ...@@ -677,6 +677,8 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
} }
// non visual shape properties // non visual shape properties
if (GetDocumentType() == DOCUMENT_DOCX)
pFS->singleElementNS( mnXmlNamespace, XML_cNvSpPr, FSEND );
pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND ); pFS->startElementNS( mnXmlNamespace, XML_nvSpPr, FSEND );
pFS->singleElementNS( mnXmlNamespace, XML_cNvPr, pFS->singleElementNS( mnXmlNamespace, XML_cNvPr,
XML_id, I32S( GetNewShapeID( xShape ) ), XML_id, I32S( GetNewShapeID( xShape ) ),
...@@ -701,7 +703,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape ) ...@@ -701,7 +703,7 @@ ShapeExport& ShapeExport::WriteRectangleShape( Reference< XShape > xShape )
// write text // write text
WriteTextBox( xShape, mnXmlNamespace ); WriteTextBox( xShape, mnXmlNamespace );
pFS->endElementNS( mnXmlNamespace, XML_sp ); pFS->endElementNS( mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp) );
return *this; 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