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 | de4d52bd5546170ccdf93e97faee5f8cfb2d904c (patch) | |
tree | 6954f0df31b977d2c8780dc6dfc578c9548e95fa /sd/source/ui/view/drviews7.cxx | |
parent | c5cf21811d1c40d9d78e220e846f04187c86deba (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 0ba354fbe8d8..e8d5146faa86 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 ) ) |