diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-03 15:52:33 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2020-08-03 21:54:13 +0200 |
commit | 186c34af5d5758b940cf84471b3464af764d8bb7 (patch) | |
tree | 44ec06b78d6808456fd4ba3e542824e3046f8700 /sd/source/ui/controller | |
parent | ece77815300de02ba8fcd9ef6d135c72f3fd9e34 (diff) |
loplugin:flatten in sd
Change-Id: I57cf26d800d8d414014b88c250ee1cbd47551bc4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100007
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'sd/source/ui/controller')
-rw-r--r-- | sd/source/ui/controller/slidelayoutcontroller.cxx | 52 |
1 files changed, 26 insertions, 26 deletions
diff --git a/sd/source/ui/controller/slidelayoutcontroller.cxx b/sd/source/ui/controller/slidelayoutcontroller.cxx index 82a2e9bd21e3..41071def8409 100644 --- a/sd/source/ui/controller/slidelayoutcontroller.cxx +++ b/sd/source/ui/controller/slidelayoutcontroller.cxx @@ -217,34 +217,34 @@ LayoutToolbarMenu::LayoutToolbarMenu(SlideLayoutController* pControl, weld::Widg mxFrame2->show(); } - if( eMode == DrawViewMode_DRAW ) + if( eMode != DrawViewMode_DRAW ) + return; + + if( !mxFrame.is() ) + return; + + OUString sSlotStr; + + if( bInsertPage ) + sSlotStr = ".uno:DuplicatePage"; + else + sSlotStr = ".uno:Undo"; + + css::uno::Reference<css::graphic::XGraphic> xSlotImage = vcl::CommandInfoProvider::GetXGraphicForCommand(sSlotStr, mxFrame); + + OUString sSlotTitle; + if( bInsertPage ) { - if( mxFrame.is() ) - { - OUString sSlotStr; - - if( bInsertPage ) - sSlotStr = ".uno:DuplicatePage"; - else - sSlotStr = ".uno:Undo"; - - css::uno::Reference<css::graphic::XGraphic> xSlotImage = vcl::CommandInfoProvider::GetXGraphicForCommand(sSlotStr, mxFrame); - - OUString sSlotTitle; - if( bInsertPage ) - { - auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sSlotStr, mxControl->getModuleName()); - sSlotTitle = vcl::CommandInfoProvider::GetLabelForCommand(aProperties); - } - else - sSlotTitle = SdResId( STR_RESET_LAYOUT ); - - mxMoreButton->set_label(sSlotTitle); - mxMoreButton->set_image(xSlotImage); - mxMoreButton->connect_clicked(LINK(this, LayoutToolbarMenu, SelectToolbarMenuHdl)); - mxMoreButton->show(); - } + auto aProperties = vcl::CommandInfoProvider::GetCommandProperties(sSlotStr, mxControl->getModuleName()); + sSlotTitle = vcl::CommandInfoProvider::GetLabelForCommand(aProperties); } + else + sSlotTitle = SdResId( STR_RESET_LAYOUT ); + + mxMoreButton->set_label(sSlotTitle); + mxMoreButton->set_image(xSlotImage); + mxMoreButton->connect_clicked(LINK(this, LayoutToolbarMenu, SelectToolbarMenuHdl)); + mxMoreButton->show(); } IMPL_LINK(LayoutToolbarMenu, SelectValueSetHdl, ValueSet*, pLayoutSet, void) |