diff options
author | Christian Lippka <cl@openoffice.org> | 2010-04-01 11:00:20 +0200 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2010-04-01 11:00:20 +0200 |
commit | 646895d3ee78647feb51582e3cdea75d01960cd5 (patch) | |
tree | d67590818dbd11b1f4727dc7ab8cef0f719338b0 /sd/source/ui/view | |
parent | 851fa3b48ac78b8b50e2ecc110d30ed2a3e8dfbd (diff) |
enalbe assign slide layout dropdown for notes and handout view
Diffstat (limited to 'sd/source/ui/view')
-rw-r--r-- | sd/source/ui/view/ViewShellImplementation.cxx | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx index 6f4460cb5b47..a5975b9f6ffa 100644 --- a/sd/source/ui/view/ViewShellImplementation.cxx +++ b/sd/source/ui/view/ViewShellImplementation.cxx @@ -324,12 +324,14 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind eP const SfxUInt32Item* pWhatPage = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATPAGE, FALSE, TYPE(SfxUInt32Item) ) ); const SfxUInt32Item* pWhatLayout = static_cast< const SfxUInt32Item* > ( rRequest.GetArg( ID_VAL_WHATLAYOUT, FALSE, TYPE(SfxUInt32Item) ) ); + SdDrawDocument* pDocument = mrViewShell.GetDoc(); + if( !pDocument ) + return; + SdPage* pPage = 0; if( pWhatPage ) { - SdDrawDocument* pDocument = mrViewShell.GetDoc(); - if( pDocument ) - pPage = pDocument->GetSdPage(static_cast<USHORT>(pWhatPage->GetValue()), ePageKind); + pPage = pDocument->GetSdPage(static_cast<USHORT>(pWhatPage->GetValue()), ePageKind); } if( pPage == 0 ) @@ -347,7 +349,14 @@ void ViewShell::Implementation::AssignLayout ( SfxRequest& rRequest, PageKind eP SdrLayerAdmin& rLayerAdmin (mrViewShell.GetViewShellBase().GetDocument()->GetLayerAdmin()); BYTE aBackground (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE)); BYTE aBackgroundObject (rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE)); - SetOfByte aVisibleLayers (pPage->TRG_GetMasterPageVisibleLayers()); + + SetOfByte aVisibleLayers; + + if( pPage->GetPageKind() == PK_HANDOUT ) + aVisibleLayers.SetAll(); + else + pPage->TRG_GetMasterPageVisibleLayers(); + SfxRequest aRequest (mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE); aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName())); aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, eLayout)); |