summaryrefslogtreecommitdiff
path: root/basic/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-01-26 21:55:02 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2023-01-26 22:15:12 +0000
commite6120153b7fc455ac7979f17236dcb877ad8929c (patch)
treeac5c1879f269ee8b9e4886c3782e27562ab1e697 /basic/source
parentd690ae975f33f48ed66d6aacc6d1aba8fad86eb8 (diff)
Simplify a bit
Change-Id: Ib3507d5083116fc621def9c8168c95267a914bed Reviewed-on: https://gerrit.libreoffice.org/c/core/+/146192 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'basic/source')
-rw-r--r--basic/source/classes/sbxmod.cxx16
1 files changed, 6 insertions, 10 deletions
diff --git a/basic/source/classes/sbxmod.cxx b/basic/source/classes/sbxmod.cxx
index 2766d9be6ab2..60bdc9171b48 100644
--- a/basic/source/classes/sbxmod.cxx
+++ b/basic/source/classes/sbxmod.cxx
@@ -1166,16 +1166,14 @@ void SbModule::Run( SbMethod* pMeth )
pSbData->pInst->CalcBreakCallLevel( pMeth->GetDebugFlags() );
}
- auto xRuntimeGuard(std::make_unique<RunGuard>(this, pMeth, pMeth->nStart, pSbData, bDelInst));
-
- if ( mbVBACompat )
{
- pSbData->pInst->EnableCompatibility( true );
- }
+ RunGuard xRuntimeGuard(this, pMeth, pMeth->nStart, pSbData, bDelInst);
- xRuntimeGuard->run();
+ if (mbVBACompat)
+ pSbData->pInst->EnableCompatibility(true);
- xRuntimeGuard.reset();
+ xRuntimeGuard.run();
+ }
if( bDelInst )
{
@@ -1254,9 +1252,7 @@ void SbModule::RunInit()
pSbData->bRunInit = true;
// The init code starts always here
- auto xRuntimeGuard(std::make_unique<RunInitGuard>(this, nullptr, 0, pSbData));
- xRuntimeGuard->run();
- xRuntimeGuard.reset();
+ RunInitGuard(this, nullptr, 0, pSbData).run();
pImage->bInit = true;
pImage->bFirstInit = false;