summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-07-26 00:17:41 +0200
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-07-27 08:01:03 +0200
commit76bf3939b0583212a56c317c85aea110f8ac6fee (patch)
treed2c0fa7c2080b84054289fa82b510e6ae91fd30b /sc
parent5a7d18e432571fb1e9b2cd54d6168353d25c6f19 (diff)
related tdf#109132, ugly hack to ensure the VBA mode is setup during import
Change-Id: Ia48e4b19eb690ba7ab24a37538f6de11a74ad4d3 Reviewed-on: https://gerrit.libreoffice.org/58148 Tested-by: Jenkins Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/core/tool/interpr4.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/sc/source/core/tool/interpr4.cxx b/sc/source/core/tool/interpr4.cxx
index 4d836828eeba..fe02c2fe765d 100644
--- a/sc/source/core/tool/interpr4.cxx
+++ b/sc/source/core/tool/interpr4.cxx
@@ -3215,6 +3215,11 @@ void ScInterpreter::ScMacro()
OSL_ENSURE(dynamic_cast<const StarBASIC *>(pObject) != nullptr, "No Basic found!");
OUString aMacroStr = pObject->GetName() + "." + pModule->GetName() + "." + pMethod->GetName();
OUString aBasicStr;
+ if (pRoot && bUseVBAObjects)
+ {
+ // just here to make sure the VBA objects when we run the macro during ODF import
+ pRoot->getVBAGlobals();
+ }
if (pObject->GetParent())
{
aBasicStr = pObject->GetParent()->GetName(); // document BASIC