summaryrefslogtreecommitdiffstats
path: root/sd/source/ui/view/viewshe3.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/view/viewshe3.cxx')
-rwxr-xr-x[-rw-r--r--]sd/source/ui/view/viewshe3.cxx41
1 files changed, 31 insertions, 10 deletions
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx
index 4ec163d813ca..29e727d6360d 100644..100755
--- a/sd/source/ui/view/viewshe3.cxx
+++ b/sd/source/ui/view/viewshe3.cxx
@@ -246,6 +246,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
@@ -255,6 +256,7 @@ SdPage* ViewShell::CreateOrDuplicatePage (
framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel(
framework::FrameworkHelper::msLayoutTaskPanelURL);
}
+*/
// AutoLayouts muessen fertig sein
pDocument->StopWorkStartupDelay();
@@ -263,23 +265,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();
@@ -317,6 +327,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();