summaryrefslogtreecommitdiff
path: root/oox/source/export/shapes.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'oox/source/export/shapes.cxx')
-rw-r--r--oox/source/export/shapes.cxx20
1 files changed, 18 insertions, 2 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx
index 7302682b02b0..3cb71aeacf8c 100644
--- a/oox/source/export/shapes.cxx
+++ b/oox/source/export/shapes.cxx
@@ -1793,14 +1793,30 @@ ShapeExport& ShapeExport::WriteTableShape( const Reference< XShape >& xShape )
ShapeExport& ShapeExport::WriteTextShape( const Reference< XShape >& xShape )
{
FSHelperPtr pFS = GetFS();
-
+ Reference<XPropertySet> xShapeProps(xShape, UNO_QUERY);
pFS->startElementNS(mnXmlNamespace, (GetDocumentType() != DOCUMENT_DOCX ? XML_sp : XML_wsp));
// non visual shape properties
if (GetDocumentType() != DOCUMENT_DOCX)
{
pFS->startElementNS(mnXmlNamespace, XML_nvSpPr);
- WriteNonVisualDrawingProperties( xShape, IDS( TextShape ) );
+ pFS->startElementNS(mnXmlNamespace, XML_cNvPr,
+ XML_id, OString::number(GetNewShapeID(xShape)),
+ XML_name, IDS(TextShape));
+ OUString sURL;
+ if (GetProperty(xShapeProps, "URL"))
+ mAny >>= sURL;
+
+ if (!sURL.isEmpty())
+ {
+ OUString sRelId = mpFB->addRelation(mpFS->getOutputStream(),
+ oox::getRelationship(Relationship::HYPERLINK),
+ mpURLTransformer->getTransformedString(sURL),
+ mpURLTransformer->isExternalURL(sURL));
+
+ mpFS->singleElementNS(XML_a, XML_hlinkClick, FSNS(XML_r, XML_id), sRelId.toUtf8());
+ }
+ pFS->endElementNS(mnXmlNamespace, XML_cNvPr);
}
pFS->singleElementNS(mnXmlNamespace, XML_cNvSpPr, XML_txBox, "1");
if (GetDocumentType() != DOCUMENT_DOCX)