diff options
author | Christian Lippka <cl@openoffice.org> | 2010-01-21 18:32:05 +0100 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2010-01-21 18:32:05 +0100 |
commit | 630da02589797d03be8cd461f94d1f7007cf94ae (patch) | |
tree | 96b16aa811862aa078041d71ec867dac9b9baa2b /sd/source/ui/view/drviews7.cxx | |
parent | 582ed6ce495a384c258f5865bd551f4511808dc1 (diff) |
added new toolbar controler for insert page
Diffstat (limited to 'sd/source/ui/view/drviews7.cxx')
-rw-r--r-- | sd/source/ui/view/drviews7.cxx | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviews7.cxx b/sd/source/ui/view/drviews7.cxx index d525a4ec6..cf0dff0cc 100644 --- a/sd/source/ui/view/drviews7.cxx +++ b/sd/source/ui/view/drviews7.cxx @@ -365,6 +365,26 @@ void DrawViewShell::GetMenuState( SfxItemSet &rSet ) } } + if (SFX_ITEM_AVAILABLE == rSet.GetItemState(SID_ASSIGN_LAYOUT)) + { + bool bDisable = true; + if( pPageView ) + { + SdPage* pPage = dynamic_cast< SdPage* >( pPageView->GetPage() ); + + if( pPage && !pPage->IsMasterPage() ) + { + rSet.Put( SfxUInt32Item(SID_ASSIGN_LAYOUT, pPage->GetAutoLayout()) ); + bDisable = false; + } + } + + if(bDisable) + { + rSet.DisableItem(SID_ASSIGN_LAYOUT); + } + } + // Starten der Praesentation moeglich? if( SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_PRESENTATION ) || SFX_ITEM_AVAILABLE == rSet.GetItemState( SID_REHEARSE_TIMINGS ) ) |