diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-18 12:02:12 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-09-18 13:47:29 +0200 |
commit | fc48a4cf465a1ab74e279c2573c7ca68ad3f6fc7 (patch) | |
tree | 86df7ff84d35dc65f3a1614739c8f3fe74b2fb39 /sfx2/source/sidebar/ControllerItem.cxx | |
parent | 3c695c5ba0741cd3b1d748f27a4f119d4fa7366c (diff) |
msCommandName in ControllerItem is unused
ever since
commit 1c5cae479bebd2d325182adc2c9821fd948fd1bd
Date: Thu Apr 20 08:44:33 2017 +0200
loplugin:unusedmethods
Change-Id: I7c02e8bf0ef377303dedf4e6690fd937f52a3605
Diffstat (limited to 'sfx2/source/sidebar/ControllerItem.cxx')
-rw-r--r-- | sfx2/source/sidebar/ControllerItem.cxx | 14 |
1 files changed, 3 insertions, 11 deletions
diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx index 8e5a90953283..b7925ac2d13c 100644 --- a/sfx2/source/sidebar/ControllerItem.cxx +++ b/sfx2/source/sidebar/ControllerItem.cxx @@ -41,8 +41,7 @@ ControllerItem::ControllerItem ( ItemUpdateReceiverInterface& rItemUpdateReceiver) : SfxControllerItem(nSlotId, rBindings), mrItemUpdateReceiver(rItemUpdateReceiver), - mxFrameActionListener(), - msCommandName() + mxFrameActionListener() { } @@ -68,7 +67,7 @@ void ControllerItem::StateChanged ( mrItemUpdateReceiver.NotifyItemUpdate(nSID, eState, pState, IsEnabled(eState)); } -bool ControllerItem::IsEnabled (SfxItemState eState) const +bool ControllerItem::IsEnabled (SfxItemState eState) { if (eState == SfxItemState::DISABLED) return false; @@ -77,19 +76,12 @@ bool ControllerItem::IsEnabled (SfxItemState eState) const // There are no disabled commands. return true; } - else if (msCommandName.getLength() == 0) + else { // We were not given a command name at construction and can // not check the state now. Assume the best and return true. return true; } - else if (SvtCommandOptions().Lookup(SvtCommandOptions::CMDOPTION_DISABLED, msCommandName)) - { - // The command is part of a list of disabled commands. - return false; - } - else - return true; } void ControllerItem::RequestUpdate() |