diff options
author | Christian Lippka <cl@openoffice.org> | 2010-01-21 18:32:05 +0100 |
---|---|---|
committer | Christian Lippka <cl@openoffice.org> | 2010-01-21 18:32:05 +0100 |
commit | de4d52bd5546170ccdf93e97faee5f8cfb2d904c (patch) | |
tree | 6954f0df31b977d2c8780dc6dfc578c9548e95fa /sd/source/ui/view/viewshe3.cxx | |
parent | c5cf21811d1c40d9d78e220e846f04187c86deba (diff) |
added new toolbar controler for insert page
Diffstat (limited to 'sd/source/ui/view/viewshe3.cxx')
-rw-r--r-- | sd/source/ui/view/viewshe3.cxx | 39 |
1 files changed, 29 insertions, 10 deletions
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 86e441939b0e..4f441f03cde7 100644 --- a/sd/source/ui/view/viewshe3.cxx +++ b/sd/source/ui/view/viewshe3.cxx @@ -266,23 +266,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(); @@ -320,6 +328,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(); |