summaryrefslogtreecommitdiff
path: root/sfx2/source
diff options
context:
space:
mode:
authorAndre Fischer <af@apache.org>2013-05-10 08:51:15 +0000
committerMichael Meeks <michael.meeks@suse.com>2013-05-20 11:33:31 +0100
commitb97fb5ca158f8839798900bae7239bb9339a062b (patch)
tree354f81cac419d2935dcedbe9d90e1596fadd77ca /sfx2/source
parentbd26a6abb58f16b77f587b8d5c3aee41ae728ada (diff)
Related: #i122082# Disable controls of text property sidebar...
panel for disabled document parts (cherry picked from commit ffcc8c326640dfbc6b765cd25875adf9e0ab66ad) Conflicts: sfx2/inc/sfx2/sidebar/ControllerItem.hxx svx/source/sidebar/text/TextPropertyPanel.cxx Change-Id: I9f38c71c6415f3d255b5607a67a110bca47358b0 Related: #i122082# Remove temporary change (cherry picked from commit f213ea43fac43326a643f30ff13abd9d77f6aed7) Change-Id: I157542fd5dbbda17b63900be9a41782ee581309c
Diffstat (limited to 'sfx2/source')
-rw-r--r--sfx2/source/sidebar/ControllerItem.cxx10
1 files changed, 6 insertions, 4 deletions
diff --git a/sfx2/source/sidebar/ControllerItem.cxx b/sfx2/source/sidebar/ControllerItem.cxx
index 521a2953cea1..5abc109cc425 100644
--- a/sfx2/source/sidebar/ControllerItem.cxx
+++ b/sfx2/source/sidebar/ControllerItem.cxx
@@ -133,15 +133,17 @@ void ControllerItem::StateChanged (
SfxItemState eState,
const SfxPoolItem* pState)
{
- mrItemUpdateReceiver.NotifyItemUpdate(nSID, eState, pState, IsEnabled());
+ mrItemUpdateReceiver.NotifyItemUpdate(nSID, eState, pState, IsEnabled(eState));
}
-bool ControllerItem::IsEnabled (void) const
+bool ControllerItem::IsEnabled (SfxItemState eState) const
{
- if ( ! SvtCommandOptions().HasEntries(SvtCommandOptions::CMDOPTION_DISABLED))
+ if (eState == SFX_ITEM_DISABLED)
+ return false;
+ else if ( ! SvtCommandOptions().HasEntries(SvtCommandOptions::CMDOPTION_DISABLED))
{
// There are no disabled commands.
return true;
@@ -168,7 +170,7 @@ void ControllerItem::RequestUpdate (void)
{
SfxPoolItem* pState = NULL;
const SfxItemState eState (GetBindings().QueryState(GetId(), pState));
- mrItemUpdateReceiver.NotifyItemUpdate(GetId(), eState, pState, IsEnabled());
+ mrItemUpdateReceiver.NotifyItemUpdate(GetId(), eState, pState, IsEnabled(eState));
}