diff options
author | Michael Meeks <michael.meeks@suse.com> | 2013-05-17 20:07:29 +0100 |
---|---|---|
committer | Michael Meeks <michael.meeks@suse.com> | 2013-05-20 11:33:39 +0100 |
commit | 05f0eb57618d090fa45011120a907a3b1157accb (patch) | |
tree | 5b5193033f729c57264a32d35d712a41934c9e6c /sfx2/source/view | |
parent | 3fd311a944ff09084af325593beb380f85b5c128 (diff) |
disable sidebar menu option if it is disabled.
Diffstat (limited to 'sfx2/source/view')
-rw-r--r-- | sfx2/source/view/viewfrm.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sfx2/source/view/viewfrm.cxx b/sfx2/source/view/viewfrm.cxx index 801b08c2199d..b8a9fb6159c8 100644 --- a/sfx2/source/view/viewfrm.cxx +++ b/sfx2/source/view/viewfrm.cxx @@ -3220,7 +3220,7 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) } else if ( nSID == SID_TASKPANE ) { - if ( !KnowsChildWindow( nSID ) ) + if ( !KnowsChildWindow( nSID ) ) { OSL_FAIL( "SID_TASKPANE state requested, but no task pane child window exists for this ID!" ); rState.DisableItem( nSID ); @@ -3236,6 +3236,11 @@ void SfxViewFrame::ChildWindowState( SfxItemSet& rState ) } else if ( nSID == SID_SIDEBAR ) { + if ( !IsSidebarEnabled() ) + { + rState.DisableItem( nSID ); + rState.Put( SfxVisibilityItem( nSID, sal_False ) ); + } if ( !KnowsChildWindow( nSID ) ) { OSL_ENSURE( false, "SID_TASKPANE state requested, but no task pane child window exists for this ID!" ); |