diff options
Diffstat (limited to 'sd/source/ui/view/viewshe3.cxx')
-rwxr-xr-x[-rw-r--r--] | sd/source/ui/view/viewshe3.cxx | 45 |
1 files changed, 33 insertions, 12 deletions
diff --git a/sd/source/ui/view/viewshe3.cxx b/sd/source/ui/view/viewshe3.cxx index 4ec163d813ca..8bfdefd240da 100644..100755 --- 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" @@ -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 @@ -253,8 +254,9 @@ SdPage* ViewShell::CreateOrDuplicatePage ( && rBase.GetMainViewShell()->GetShellType()!=ViewShell::ST_DRAW) { framework::FrameworkHelper::Instance(GetViewShellBase())->RequestTaskPanel( - framework::FrameworkHelper::msLayoutTaskPanelURL); + 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(); |