diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-06 14:01:21 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-06-06 14:24:26 +0200 |
commit | 8c677716c4707ccd86b152ae504841affb393cc0 (patch) | |
tree | 201862387e9d7f6357157ccc2bfb9b3a8c9cdb3d /oox/source | |
parent | ff1c74f53a66695f20906fe3a0aebd15b6b0cd51 (diff) |
DOCX drawingML export: if shape has textbox, export its contents as shape text
Change-Id: I54a51189e1c595841b8b02f3b4436da4a29f1dac
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/export/shapes.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index 82d2b5e7e793..7c3627e24fe4 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -812,6 +812,21 @@ ShapeExport& ShapeExport::WriteShape( Reference< XShape > xShape ) ShapeExport& ShapeExport::WriteTextBox( Reference< XInterface > xIface, sal_Int32 nXmlNamespace ) { + // In case this shape has an associated textbox, then export that, and we're done. + if (GetDocumentType() == DOCUMENT_DOCX && GetTextExport()) + { + uno::Reference<beans::XPropertySet> xPropertySet(xIface, uno::UNO_QUERY); + if (xPropertySet.is()) + { + uno::Reference<beans::XPropertySetInfo> xPropertySetInfo = xPropertySet->getPropertySetInfo(); + if (xPropertySetInfo->hasPropertyByName("TextBox") && xPropertySet->getPropertyValue("TextBox").get<bool>()) + { + GetTextExport()->WriteTextBox(uno::Reference<drawing::XShape>(xIface, uno::UNO_QUERY_THROW)); + return *this; + } + } + } + if( NonEmptyText( xIface ) ) { FSHelperPtr pFS = GetFS(); |