diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-18 14:35:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-04-19 08:30:49 +0200 |
commit | 8b0a69498b025e13d9772689e9e4fa3d6b05e609 (patch) | |
tree | 5fce654b3e02cd08d85dc95655c97d7181517687 /basic/source/runtime/basrdll.cxx | |
parent | 5dccf84b14ed0e09262411295c5880f787342d59 (diff) |
loplugin:flatten in basic
Change-Id: Icb8e3cda312b50c9a9f12f96bec1c746f41c8979
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92483
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'basic/source/runtime/basrdll.cxx')
-rw-r--r-- | basic/source/runtime/basrdll.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/basic/source/runtime/basrdll.cxx b/basic/source/runtime/basrdll.cxx index b18284607b01..6da6ed9e2e2d 100644 --- a/basic/source/runtime/basrdll.cxx +++ b/basic/source/runtime/basrdll.cxx @@ -98,22 +98,22 @@ void BasicDLL::BasicBreak() { DBG_ASSERT( BasicDLLImpl::BASIC_DLL, "BasicDLL::EnableBreak: No instance yet!" ); #if HAVE_FEATURE_SCRIPTING - if (BasicDLLImpl::BASIC_DLL) + if (!BasicDLLImpl::BASIC_DLL) + return; + + // bJustStopping: if there's someone pressing STOP like crazy umpteen times, + // but the Basic doesn't stop early enough, the box might appear more often... + static bool bJustStopping = false; + if (StarBASIC::IsRunning() && !bJustStopping + && (BasicDLLImpl::BASIC_DLL->bBreakEnabled || BasicDLLImpl::BASIC_DLL->bDebugMode)) { - // bJustStopping: if there's someone pressing STOP like crazy umpteen times, - // but the Basic doesn't stop early enough, the box might appear more often... - static bool bJustStopping = false; - if (StarBASIC::IsRunning() && !bJustStopping - && (BasicDLLImpl::BASIC_DLL->bBreakEnabled || BasicDLLImpl::BASIC_DLL->bDebugMode)) - { - bJustStopping = true; - StarBASIC::Stop(); - std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, - VclMessageType::Info, VclButtonsType::Ok, - BasResId(IDS_SBERR_TERMINATED))); - xInfoBox->run(); - bJustStopping = false; - } + bJustStopping = true; + StarBASIC::Stop(); + std::unique_ptr<weld::MessageDialog> xInfoBox(Application::CreateMessageDialog(nullptr, + VclMessageType::Info, VclButtonsType::Ok, + BasResId(IDS_SBERR_TERMINATED))); + xInfoBox->run(); + bJustStopping = false; } #endif } |