summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/ViewShellImplementation.cxx
diff options
context:
space:
mode:
authorOliver Bolte <obo@openoffice.org>2005-01-25 14:35:30 +0000
committerOliver Bolte <obo@openoffice.org>2005-01-25 14:35:30 +0000
commit7a318767adc0cdd9ccc8b1dc87330db93c58684e (patch)
treef6697f4bf04c8892cbfec0dd516be96e5305db8c /sd/source/ui/view/ViewShellImplementation.cxx
parent431317bd1bf015cfc3051e3a3792b141ca08e4fe (diff)
INTEGRATION: CWS impress29 (1.8.44); FILE MERGED
2005/01/14 16:36:32 af 1.8.44.2: #i40632# Added AssignLayout() method. 2005/01/12 15:52:30 af 1.8.44.1: #i40164# Fixed usage of page number of current page.
Diffstat (limited to 'sd/source/ui/view/ViewShellImplementation.cxx')
-rw-r--r--sd/source/ui/view/ViewShellImplementation.cxx38
1 files changed, 32 insertions, 6 deletions
diff --git a/sd/source/ui/view/ViewShellImplementation.cxx b/sd/source/ui/view/ViewShellImplementation.cxx
index 2ee7bb7a761d..e566f56881fa 100644
--- a/sd/source/ui/view/ViewShellImplementation.cxx
+++ b/sd/source/ui/view/ViewShellImplementation.cxx
@@ -2,9 +2,9 @@
*
* $RCSfile: ViewShellImplementation.cxx,v $
*
- * $Revision: 1.9 $
+ * $Revision: 1.10 $
*
- * last change: $Author: kz $ $Date: 2005-01-21 16:37:09 $
+ * last change: $Author: obo $ $Date: 2005-01-25 15:35:30 $
*
* The Contents of this file are made available subject to the terms of
* either of the following licenses
@@ -58,7 +58,6 @@
*
*
************************************************************************/
-
#include "ViewShellImplementation.hxx"
#include "sdpage.hxx"
@@ -81,6 +80,7 @@
#include "FactoryIds.hxx"
#include "slideshow.hxx"
#include "TaskPaneViewShell.hxx"
+#include "ViewShellBase.hxx"
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
@@ -157,8 +157,6 @@ void ViewShell::Implementation::ProcessModifyPageSlot (
PageKind ePageKind)
{
SdDrawDocument* pDocument = mrViewShell.GetDoc();
- USHORT nPage = pCurrentPage->GetPageNum();
- // pCurrentPage = pDocument->GetSdPage(nPage, ePageKind);
SdrLayerAdmin& rLayerAdmin = pDocument->GetLayerAdmin();
BYTE aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
BYTE aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
@@ -337,8 +335,10 @@ pShow->InitPageModify();
if (ePageKind == PK_STANDARD)
{
+ USHORT nPage = (pCurrentPage->GetPageNum()-1) / 2;
SdPage* pNotesPage = pDocument->GetSdPage(nPage, PK_NOTES);
- pNotesPage->SetName(aNewName);
+ if (pNotesPage != NULL)
+ pNotesPage->SetName(aNewName);
}
}
@@ -383,6 +383,32 @@ pShow->InitPageModify();
+void ViewShell::Implementation::AssignLayout (
+ SdPage* pPage,
+ AutoLayout aLayout)
+{
+ // Transform the given request into the four argument form that is
+ // understood by ProcessModifyPageSlot().
+ 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());
+ SfxRequest aRequest (mrViewShell.GetViewShellBase().GetViewFrame(), SID_MODIFYPAGE);
+ aRequest.AppendItem(SfxStringItem (ID_VAL_PAGENAME, pPage->GetName()));
+ aRequest.AppendItem(SfxUInt32Item (ID_VAL_WHATLAYOUT, aLayout));
+ aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEBACK, aVisibleLayers.IsSet(aBackground)));
+ aRequest.AppendItem(SfxBoolItem(ID_VAL_ISPAGEOBJ, aVisibleLayers.IsSet(aBackgroundObject)));
+
+ // Forward the call with the new arguments.
+ ProcessModifyPageSlot (
+ aRequest,
+ pPage,
+ pPage->GetPageKind());
+}
+
+
+
+
sal_uInt16 ViewShell::Implementation::GetViewId (void)
{
switch (mrViewShell.GetShellType())