summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/drviews7.cxx
diff options
context:
space:
mode:
authorChristian Lippka <cl@openoffice.org>2010-01-21 18:32:05 +0100
committerChristian Lippka <cl@openoffice.org>2010-01-21 18:32:05 +0100
commit630da02589797d03be8cd461f94d1f7007cf94ae (patch)
tree96b16aa811862aa078041d71ec867dac9b9baa2b /sd/source/ui/view/drviews7.cxx
parent582ed6ce495a384c258f5865bd551f4511808dc1 (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.cxx20
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 ) )