summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2021-08-02 19:48:35 +0200
committerAndreas Heinisch <andreas.heinisch@yahoo.de>2021-08-04 00:17:01 +0200
commit24d24debef4cda7de702c4b470a3707f1aae3ea3 (patch)
treef7ad1fd1b2abbe461f9d83dbd2d02a8bcbeaf5e8 /scripting
parent58f0eb6ddba26705535d07b07a17f5cf141cf3da (diff)
tdf#143582 - Clear return value of the method before calling it
Otherwise the function keeps a copy of its return value, which may be used in an upcoming call. Change-Id: I4977c39e1ce48cfd5ab067a4df4783f10505a9ae Reviewed-on: https://gerrit.libreoffice.org/c/core/+/119905 Tested-by: Jenkins Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
Diffstat (limited to 'scripting')
-rw-r--r--scripting/source/basprov/basscript.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx
index 9054ee4bfc27..0b411c83f180 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -244,6 +244,8 @@ constexpr OUStringLiteral BASSCRIPT_PROPERTY_CALLER = u"Caller";
if ( m_documentBasicManager && m_xDocumentScriptContext.is() )
aOldThisComponent = m_documentBasicManager->SetGlobalUNOConstant( "ThisComponent", makeAny( m_xDocumentScriptContext ) );
+ // tdf#143582 - clear return value of the method before calling it
+ m_xMethod->Clear();
if ( m_caller.hasElements() && m_caller[ 0 ].hasValue() )
{
SbxVariableRef xCallerVar = new SbxVariable( SbxVARIANT );