diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-11 13:17:09 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-05-11 21:55:11 +0200 |
commit | cde416fea13c6020805ac663e254a50b2c885abd (patch) | |
tree | 30867800e45bb5a3034be83cfebe04e06869389f /sfx2 | |
parent | c8e144638c10f81a25478dd8d8061d7d870b383c (diff) |
in SetGlobalUNOConstant, only retrieve old value if we need it
removes some unnecessary Find() work
Change-Id: I6af9c4d9a043d4361fcca1a034b2025fe7c10c28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/134200
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/source/appl/macroloader.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sfx2/source/appl/macroloader.cxx b/sfx2/source/appl/macroloader.cxx index fff7fc140450..0892bb78e4d9 100644 --- a/sfx2/source/appl/macroloader.cxx +++ b/sfx2/source/appl/macroloader.cxx @@ -275,7 +275,7 @@ ErrCode SfxMacroLoader::loadMacro( const OUString& rURL, css::uno::Any& rRetval, if ( bSetGlobalThisComponent ) { // document is executed via AppBASIC, adjust ThisComponent variable - aOldThisComponent = pAppMgr->SetGlobalUNOConstant( "ThisComponent", Any( pDoc->GetModel() ) ); + pAppMgr->SetGlobalUNOConstant( "ThisComponent", Any( pDoc->GetModel() ), &aOldThisComponent ); } // just to let the shell be alive |