diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2021-08-02 19:48:35 +0200 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2021-08-16 10:10:24 +0200 |
commit | a8db4ee3329ce5ecb76001e99e6c1f3839f672fc (patch) | |
tree | a4cfd9611d8f15264960535b78fbc1ab8a0d23ab /scripting | |
parent | ab0a4f93200c5d5cb489eb05695a9bcf326ddab4 (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>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120197
Signed-off-by: Xisco Fauli <xiscofauli@libreoffice.org>
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/120211
Diffstat (limited to 'scripting')
-rw-r--r-- | scripting/source/basprov/basscript.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/scripting/source/basprov/basscript.cxx b/scripting/source/basprov/basscript.cxx index 216e2fa99bd6..08da36cda5b0 100644 --- a/scripting/source/basprov/basscript.cxx +++ b/scripting/source/basprov/basscript.cxx @@ -222,6 +222,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 ); |