summaryrefslogtreecommitdiff
path: root/scripting
diff options
context:
space:
mode:
authorAndreas Heinisch <andreas.heinisch@yahoo.de>2021-08-02 19:48:35 +0200
committerXisco Fauli <xiscofauli@libreoffice.org>2021-08-09 17:36:57 +0200
commitcb97358ab845f13f1c57b410e59126f20652d552 (patch)
treea3c0e00c070e7197bf59ae45a60e55ace7781bd2 /scripting
parent6b393b6cc65992ba6af4476024bb2f26518c388b (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> Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120197
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 a22cd82f343e..6a9a8d1d8b7b 100644
--- a/scripting/source/basprov/basscript.cxx
+++ b/scripting/source/basprov/basscript.cxx
@@ -244,6 +244,8 @@ namespace basprov
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 );