summaryrefslogtreecommitdiff
path: root/sd/source/ui/view/viewshe3.cxx
diff options
context:
space:
mode:
authorAndre Fischer <af@openoffice.org>2010-07-01 18:06:39 +0200
committerAndre Fischer <af@openoffice.org>2010-07-01 18:06:39 +0200
commitdf76bfb0695d19d201936df80192108e7ce51b8c (patch)
treed44078a9b9c07340ed1a75361916bbe3a9a4b7b9 /sd/source/ui/view/viewshe3.cxx
parent4a33a0f64fa420d39d079c3ab31a0c4579dc83b7 (diff)
parent4adb61dc6bb380ff31e145e6a77c92c0b26b42bd (diff)
renaissance1: merge with DEV300_m84
Diffstat (limited to 'sd/source/ui/view/viewshe3.cxx')
-rw-r--r--sd/source/ui/view/viewshe3.cxx43
1 files changed, 32 insertions, 11 deletions
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 11073ec9a081..7ce0b577ed9e 100644
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -69,7 +69,6 @@
#endif
#include "DrawViewShell.hxx"
#include "OutlineViewShell.hxx"
-#include "TaskPaneViewShell.hxx"
#include "drawview.hxx"
#include "sdattr.hxx"
@@ -80,6 +79,7 @@
#include "Window.hxx"
#include "DrawDocShell.hxx"
#include "FrameView.hxx"
+#include "framework/FrameworkHelper.hxx"
#include "optsitem.hxx"
#include "sdresid.hxx"
@@ -247,6 +247,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
const SfxItemSet* pArgs = rRequest.GetArgs();
if (! pArgs)
{
+/*
// Make the layout menu visible in the tool pane.
const ViewShellBase& rBase (GetViewShellBase());
if (rBase.GetMainViewShell()!=NULL
@@ -257,6 +258,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
framework::FrameworkHelper::msLayoutTaskPanelURL,
false);
}
+*/
// AutoLayouts muessen fertig sein
pDocument->StopWorkStartupDelay();
@@ -265,23 +267,31 @@ SdPage* ViewShell::CreateOrDuplicatePage (
if (pTemplatePage != NULL)
{
eStandardLayout = pTemplatePage->GetAutoLayout();
+ if( eStandardLayout == AUTOLAYOUT_TITLE )
+ eStandardLayout = AUTOLAYOUT_ENUM;
+
SdPage* pNotesTemplatePage = static_cast<SdPage*>(pDocument->GetPage(pTemplatePage->GetPageNum()+1));
if (pNotesTemplatePage != NULL)
eNotesLayout = pNotesTemplatePage->GetAutoLayout();
}
}
- else if (pArgs->Count () != 4)
+ else if (pArgs->Count() == 1)
{
- Cancel();
-
- if(HasCurrentFunction(SID_BEZIER_EDIT) )
- GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON);
-
- StarBASIC::FatalError (SbERR_WRONG_ARGS);
- rRequest.Ignore ();
- return NULL;
+ pDocument->StopWorkStartupDelay();
+ SFX_REQUEST_ARG (rRequest, pLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
+ if( pLayout )
+ {
+ if (ePageKind == PK_NOTES)
+ {
+ eNotesLayout = (AutoLayout) pLayout->GetValue ();
+ }
+ else
+ {
+ eStandardLayout = (AutoLayout) pLayout->GetValue ();
+ }
+ }
}
- else
+ else if (pArgs->Count() == 4)
{
// AutoLayouts muessen fertig sein
pDocument->StopWorkStartupDelay();
@@ -319,6 +329,17 @@ SdPage* ViewShell::CreateOrDuplicatePage (
return NULL;
}
}
+ else
+ {
+ Cancel();
+
+ if(HasCurrentFunction(SID_BEZIER_EDIT) )
+ GetViewFrame()->GetDispatcher()->Execute(SID_OBJECT_SELECT, SFX_CALLMODE_ASYNCHRON);
+
+ StarBASIC::FatalError (SbERR_WRONG_ARGS);
+ rRequest.Ignore ();
+ return NULL;
+ }
// 2. Create a new page or duplicate an existing one.
View* pDrView = GetView();