diff options
author | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-27 19:15:12 +0200 |
---|---|---|
committer | Markus Mohrhard <markus.mohrhard@googlemail.com> | 2015-05-27 20:41:44 +0200 |
commit | 5d33f6634c5fb84cb2a801d7819c8affb031cc02 (patch) | |
tree | eb924308ceed95a859f92bd6e007258e8441a7aa /oox/source | |
parent | 27dde67419e8418a79bab3eab4082c5e341dfd04 (diff) |
transform calc URLs to OOXML format, related tdf#91334
Change-Id: I497a6600e155200e913ed386a539f284a5c86320
Diffstat (limited to 'oox/source')
-rw-r--r-- | oox/source/export/shapes.cxx | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/oox/source/export/shapes.cxx b/oox/source/export/shapes.cxx index debb5b70fed3..186f280b8e7a 100644 --- a/oox/source/export/shapes.cxx +++ b/oox/source/export/shapes.cxx @@ -107,6 +107,20 @@ using ::sax_fastparser::FSHelperPtr; namespace oox { namespace drawingml { +URLTransformer::~URLTransformer() +{ +} + +OUString URLTransformer::getTransformedString(const OUString& rString) const +{ + return rString; +} + +bool URLTransformer::isExternalURL(const OUString& /*rURL*/) const +{ + return true; +} + #define GETA(propName) \ GetProperty( rXPropSet, OUString(#propName)) @@ -130,6 +144,12 @@ ShapeExport::ShapeExport( sal_Int32 nXmlNamespace, FSHelperPtr pFS, ShapeHashMap , maMapModeDest( MAP_INCH, Point(), maFraction, maFraction ) , mpShapeMap( pShapeMap ? pShapeMap : &maShapeMap ) { + mpURLTransformer.reset(new URLTransformer); +} + +void ShapeExport::SetURLTranslator(std::shared_ptr<URLTransformer> pTransformer) +{ + mpURLTransformer = pTransformer; } awt::Size ShapeExport::MapSize( const awt::Size& rSize ) const @@ -445,7 +465,8 @@ ShapeExport& ShapeExport::WriteCustomShape( Reference< XShape > xShape ) { OUString sRelId = mpFB->addRelation( mpFS->getOutputStream(), "http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink", - sURL, true ); + mpURLTransformer->getTransformedString(sURL), + mpURLTransformer->isExternalURL(sURL)); mpFS->singleElementNS( XML_a, XML_hlinkClick, FSNS( XML_r,XML_id ), USS( sRelId ), |