summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/basic/sbstar.hxx3
-rw-r--r--sc/source/core/tool/interpr4.cxx5
2 files changed, 7 insertions, 1 deletions
diff --git a/include/basic/sbstar.hxx b/include/basic/sbstar.hxx
index 86b0d8e7a0c6..884974597388 100644
--- a/include/basic/sbstar.hxx
+++ b/include/basic/sbstar.hxx
@@ -62,7 +62,6 @@ class BASIC_DLLPUBLIC StarBASIC : public SbxObject
bool bQuit;
SbxObjectRef pVBAGlobals;
- BASIC_DLLPRIVATE SbxObject* getVBAGlobals( );
BASIC_DLLPRIVATE void implClearDependingVarsOnDelete( StarBASIC* pDeletedBasic );
@@ -155,6 +154,8 @@ public:
void QuitAndExitApplication();
bool IsQuitApplication() { return bQuit; };
+ SbxObject* getVBAGlobals( );
+
static css::uno::Reference< css::frame::XModel >
GetModelFromBasic( SbxObject* pBasic );
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