[Libreoffice-commits] core.git: include/basic sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Fri Jul 27 06:01:30 UTC 2018
include/basic/sbstar.hxx | 3 ++-
sc/source/core/tool/interpr4.cxx | 5 +++++
2 files changed, 7 insertions(+), 1 deletion(-)
New commits:
commit 76bf3939b0583212a56c317c85aea110f8ac6fee
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
AuthorDate: Thu Jul 26 00:17:41 2018 +0200
Commit: Markus Mohrhard <markus.mohrhard at googlemail.com>
CommitDate: Fri Jul 27 08:01:03 2018 +0200
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 at googlemail.com>
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
More information about the Libreoffice-commits
mailing list