From dc091e7fd952b0530db8583247c2f910d627700a Mon Sep 17 00:00:00 2001 From: tundet Date: Fri, 12 Apr 2019 10:21:42 +0200 Subject: tdf#123645 XLSX export: fix hyperlink inserted to chart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Hyperlink inserted to chart lost after export. chart_hyperlink.xlsx: Test file from Excel 2016. Change-Id: Ideca10e544193ba43d7c2ef6e9dd8e393383edc1 Reviewed-on: https://gerrit.libreoffice.org/70648 Tested-by: Jenkins Reviewed-by: László Németh --- include/oox/export/chartexport.hxx | 3 +++ include/oox/export/drawingml.hxx | 10 ++++++++++ include/oox/export/shapes.hxx | 10 ---------- 3 files changed, 13 insertions(+), 10 deletions(-) (limited to 'include') diff --git a/include/oox/export/chartexport.hxx b/include/oox/export/chartexport.hxx index c5f9e6ebd188..b39b3f52b455 100644 --- a/include/oox/export/chartexport.hxx +++ b/include/oox/export/chartexport.hxx @@ -101,6 +101,7 @@ private: css::uno::Reference< css::frame::XModel > mxChartModel; css::uno::Reference< css::chart::XDiagram > mxDiagram; css::uno::Reference< css::chart2::XDiagram > mxNewDiagram; + std::shared_ptr mpURLTransformer; // members filled by InitRangeSegmentationProperties (retrieved from DataProvider) bool mbHasCategoryLabels; //if the categories are only automatically generated this will be false @@ -214,6 +215,8 @@ public: ::oox::core::XmlFilterBase* pFB, DocumentType eDocumentType ); virtual ~ChartExport() {} + void SetURLTranslator(const std::shared_ptr& pTransformer); + const css::uno::Reference< css::frame::XModel >& getModel(){ return mxChartModel; } void WriteChartObj( const css::uno::Reference< css::drawing::XShape >& xShape, sal_Int32 nID, sal_Int32 nChartCount ); diff --git a/include/oox/export/drawingml.hxx b/include/oox/export/drawingml.hxx index b3cdbb3600ba..8ed1aaf0d702 100644 --- a/include/oox/export/drawingml.hxx +++ b/include/oox/export/drawingml.hxx @@ -96,6 +96,16 @@ namespace core { namespace drawingml { +class OOX_DLLPUBLIC URLTransformer +{ +public: + virtual ~URLTransformer(); + + virtual OUString getTransformedString(const OUString& rURL) const; + + virtual bool isExternalURL(const OUString& rURL) const; +}; + // Our rotation is counter-clockwise and is in 100ths of a degree. // drawingML rotation is clockwise and is in 60000ths of a degree. template T ExportRotateClockwisify(T input) diff --git a/include/oox/export/shapes.hxx b/include/oox/export/shapes.hxx index aa0ca2cd1a62..b7755ccee9d2 100644 --- a/include/oox/export/shapes.hxx +++ b/include/oox/export/shapes.hxx @@ -78,16 +78,6 @@ OOX_DLLPUBLIC css::uno::Reference GetOLEObjectStream( namespace oox { namespace drawingml { -class OOX_DLLPUBLIC URLTransformer -{ -public: - virtual ~URLTransformer(); - - virtual OUString getTransformedString(const OUString& rURL) const; - - virtual bool isExternalURL(const OUString& rURL) const; -}; - class OOX_DLLPUBLIC ShapeExport : public DrawingML { private: -- cgit