Kaydet (Commit) 76bf3939 authored tarafından Markus Mohrhard's avatar Markus Mohrhard

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: 's avatarMarkus Mohrhard <markus.mohrhard@googlemail.com>
üst 5a7d18e4
......@@ -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 );
......
......@@ -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
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment