From 7e7a871bcd4f923b015a7e040969335696b434c6 Mon Sep 17 00:00:00 2001 From: Miklos Vajna Date: Tue, 6 Jul 2021 14:31:07 +0200 Subject: XLSX export: handle macros on button form controls This builds on top of commit 1e3263a677b61c718d0fd1be15c066b933f7de18 (XLSX export: handle button form controls, 2021-07-01). The binary XLS export already had code to turn Calc macro names into Excel ones, reuse that for XLSX purposes. Also fix the unwanted named range on export, oox::xls::FormulaParser::importMacroName() mentions how XLSX doesn't have matching named ranges for vba macros (while XLS has), mirror this on the export side as well. Change-Id: I877b6ba2c2e834a2327482da5cadcddf1b4672bb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/118485 Reviewed-by: Miklos Vajna Tested-by: Jenkins --- sc/source/filter/inc/xeescher.hxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'sc/source/filter/inc/xeescher.hxx') diff --git a/sc/source/filter/inc/xeescher.hxx b/sc/source/filter/inc/xeescher.hxx index f775571cac53..6ffc5d3bf1ab 100644 --- a/sc/source/filter/inc/xeescher.hxx +++ b/sc/source/filter/inc/xeescher.hxx @@ -194,6 +194,7 @@ protected: class XclMacroHelper : public XclExpControlHelper { XclTokenArrayRef mxMacroLink; /// Token array containing a link to an attached macro. + OUString maMacroName; public: explicit XclMacroHelper( const XclExpRoot& rRoot ); @@ -207,6 +208,7 @@ public: /** Sets the name of a macro @return true = The passed macro name has been found. */ bool SetMacroLink( const OUString& rMacro ); + OUString GetMacroName() const; }; class XclExpShapeObj : public XclObjAny, public XclMacroHelper -- cgit