diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-06 12:58:50 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-06 14:20:20 +0200 |
commit | 8f719de217b1079bd985b3bc63bbfa97069483bc (patch) | |
tree | cb15a422b7df468d913cb0815d628f7c0bc4fd9b /svx/source/sidebar/ContextChangeEventMultiplexer.cxx | |
parent | bfc298d02ca6275588d5897d97ced9498a3e91aa (diff) |
loplugin:flatten in svx
Change-Id: I31f33a5f693d5fdb8282181c5bd7f31971efe784
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100236
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/sidebar/ContextChangeEventMultiplexer.cxx')
-rw-r--r-- | svx/source/sidebar/ContextChangeEventMultiplexer.cxx | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/svx/source/sidebar/ContextChangeEventMultiplexer.cxx b/svx/source/sidebar/ContextChangeEventMultiplexer.cxx index ce1d5785f4dc..ce552b0ac837 100644 --- a/svx/source/sidebar/ContextChangeEventMultiplexer.cxx +++ b/svx/source/sidebar/ContextChangeEventMultiplexer.cxx @@ -36,25 +36,25 @@ void ContextChangeEventMultiplexer::NotifyContextChange ( const css::uno::Reference<css::frame::XController>& rxController, const vcl::EnumContext::Context eContext) { - if (rxController.is() && rxController->getFrame().is()) - { - const css::ui::ContextChangeEventObject aEvent( - rxController, - GetModuleName(rxController->getFrame()), - vcl::EnumContext::GetContextName(eContext)); + if (!(rxController.is() && rxController->getFrame().is())) + return; + + const css::ui::ContextChangeEventObject aEvent( + rxController, + GetModuleName(rxController->getFrame()), + vcl::EnumContext::GetContextName(eContext)); - css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer ( - css::ui::ContextChangeEventMultiplexer::get( - ::comphelper::getProcessComponentContext())); - if (xMultiplexer.is()) - xMultiplexer->broadcastContextChangeEvent(aEvent, rxController); + css::uno::Reference<css::ui::XContextChangeEventMultiplexer> xMultiplexer ( + css::ui::ContextChangeEventMultiplexer::get( + ::comphelper::getProcessComponentContext())); + if (xMultiplexer.is()) + xMultiplexer->broadcastContextChangeEvent(aEvent, rxController); - // notify the LOK too after all the change have taken effect. - if (comphelper::LibreOfficeKit::isActive()) - { - if (SfxViewShell* pViewShell = SfxViewShell::Get(rxController)) - SfxLokHelper::notifyContextChange(pViewShell, GetModuleName(rxController->getFrame()), vcl::EnumContext::GetContextName(eContext)); - } + // notify the LOK too after all the change have taken effect. + if (comphelper::LibreOfficeKit::isActive()) + { + if (SfxViewShell* pViewShell = SfxViewShell::Get(rxController)) + SfxLokHelper::notifyContextChange(pViewShell, GetModuleName(rxController->getFrame()), vcl::EnumContext::GetContextName(eContext)); } } |