2004-07-13 13:53:24 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
|
|
|
* $RCSfile: ViewShellImplementation.cxx,v $
|
|
|
|
*
|
2005-01-21 15:37:09 +00:00
|
|
|
* $Revision: 1.9 $
|
2004-07-13 13:53:24 +00:00
|
|
|
*
|
2005-01-21 15:37:09 +00:00
|
|
|
* last change: $Author: kz $ $Date: 2005-01-21 16:37:09 $
|
2004-07-13 13:53:24 +00:00
|
|
|
*
|
|
|
|
* The Contents of this file are made available subject to the terms of
|
|
|
|
* either of the following licenses
|
|
|
|
*
|
|
|
|
* - GNU Lesser General Public License Version 2.1
|
|
|
|
* - Sun Industry Standards Source License Version 1.1
|
|
|
|
*
|
|
|
|
* Sun Microsystems Inc., October, 2000
|
|
|
|
*
|
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2000 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
|
|
|
*
|
|
|
|
* This library is free software; you can redistribute it and/or
|
|
|
|
* modify it under the terms of the GNU Lesser General Public
|
|
|
|
* License version 2.1, as published by the Free Software Foundation.
|
|
|
|
*
|
|
|
|
* This library is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
|
|
* Lesser General Public License for more details.
|
|
|
|
*
|
|
|
|
* You should have received a copy of the GNU Lesser General Public
|
|
|
|
* License along with this library; if not, write to the Free Software
|
|
|
|
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
|
|
|
|
* MA 02111-1307 USA
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* Sun Industry Standards Source License Version 1.1
|
|
|
|
* =================================================
|
|
|
|
* The contents of this file are subject to the Sun Industry Standards
|
|
|
|
* Source License Version 1.1 (the "License"); You may not use this file
|
|
|
|
* except in compliance with the License. You may obtain a copy of the
|
|
|
|
* License at http://www.openoffice.org/license.html.
|
|
|
|
*
|
|
|
|
* Software provided under this License is provided on an "AS IS" basis,
|
|
|
|
* WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING,
|
|
|
|
* WITHOUT LIMITATION, WARRANTIES THAT THE SOFTWARE IS FREE OF DEFECTS,
|
|
|
|
* MERCHANTABLE, FIT FOR A PARTICULAR PURPOSE, OR NON-INFRINGING.
|
|
|
|
* See the License for the specific provisions governing your rights and
|
|
|
|
* obligations concerning the Software.
|
|
|
|
*
|
|
|
|
* The Initial Developer of the Original Code is: Sun Microsystems, Inc.
|
|
|
|
*
|
|
|
|
* Copyright: 2000 by Sun Microsystems, Inc.
|
|
|
|
*
|
|
|
|
* All Rights Reserved.
|
|
|
|
*
|
|
|
|
* Contributor(s): _______________________________________
|
|
|
|
*
|
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
#include "ViewShellImplementation.hxx"
|
|
|
|
|
|
|
|
#include "sdpage.hxx"
|
|
|
|
#include "drawdoc.hxx"
|
|
|
|
#include "sdresid.hxx"
|
|
|
|
#include "glob.hrc"
|
|
|
|
#include "app.hrc"
|
|
|
|
#include "new_foil.hrc"
|
|
|
|
#include "strings.hrc"
|
|
|
|
#include "strings.hrc"
|
|
|
|
#include "helpids.h"
|
|
|
|
#include "sdattr.hxx"
|
|
|
|
#include "sdabstdlg.hxx"
|
|
|
|
#include "unmodpg.hxx"
|
|
|
|
#include "Window.hxx"
|
|
|
|
#include "optsitem.hxx"
|
|
|
|
#include "DrawDocShell.hxx"
|
|
|
|
#include "PreviewChildWindow.hxx"
|
|
|
|
#include "PreviewWindow.hxx"
|
2004-11-16 15:38:11 +00:00
|
|
|
#include "FactoryIds.hxx"
|
2004-11-27 13:39:09 +00:00
|
|
|
#include "slideshow.hxx"
|
2005-01-21 15:37:09 +00:00
|
|
|
#include "TaskPaneViewShell.hxx"
|
2004-07-13 13:53:24 +00:00
|
|
|
|
|
|
|
#include <sfx2/bindings.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#include <sfx2/request.hxx>
|
|
|
|
#include <svtools/aeitem.hxx>
|
|
|
|
#include <vcl/msgbox.hxx>
|
|
|
|
#include <basic/sbstar.hxx>
|
|
|
|
|
2004-10-28 12:33:51 +00:00
|
|
|
|
2004-07-13 13:53:24 +00:00
|
|
|
namespace {
|
|
|
|
class ImpUndoDeleteWarning : public ModalDialog
|
|
|
|
{
|
|
|
|
private:
|
|
|
|
FixedImage maImage;
|
|
|
|
FixedText maWarningFT;
|
|
|
|
CheckBox maDisableCB;
|
|
|
|
OKButton maYesBtn;
|
|
|
|
CancelButton maNoBtn;
|
|
|
|
|
|
|
|
public:
|
|
|
|
ImpUndoDeleteWarning(Window* pParent);
|
|
|
|
BOOL IsWarningDisabled() const { return maDisableCB.IsChecked(); }
|
|
|
|
};
|
|
|
|
|
|
|
|
ImpUndoDeleteWarning::ImpUndoDeleteWarning(Window* pParent)
|
|
|
|
: ModalDialog(pParent, SdResId(RID_UNDO_DELETE_WARNING)),
|
|
|
|
maImage(this, SdResId(IMG_UNDO_DELETE_WARNING)),
|
|
|
|
maWarningFT(this, SdResId(FT_UNDO_DELETE_WARNING)),
|
|
|
|
maDisableCB(this, SdResId(CB_UNDO_DELETE_DISABLE)),
|
|
|
|
maYesBtn(this, SdResId(BTN_UNDO_DELETE_YES)),
|
|
|
|
maNoBtn(this, SdResId(BTN_UNDO_DELETE_NO))
|
|
|
|
{
|
|
|
|
FreeResource();
|
|
|
|
|
|
|
|
SetHelpId( HID_SD_UNDODELETEWARNING_DLG );
|
|
|
|
maDisableCB.SetHelpId( HID_SD_UNDODELETEWARNING_CBX );
|
|
|
|
|
|
|
|
maYesBtn.SetText(Button::GetStandardText(BUTTON_YES));
|
|
|
|
maNoBtn.SetText(Button::GetStandardText(BUTTON_NO));
|
|
|
|
maImage.SetImage(WarningBox::GetStandardImage());
|
|
|
|
|
|
|
|
// #93721# Set focus to YES-Button
|
|
|
|
maYesBtn.GrabFocus();
|
|
|
|
}
|
|
|
|
|
|
|
|
} // end of anonymous namespace
|
|
|
|
|
2004-08-04 08:00:53 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
2004-07-13 13:53:24 +00:00
|
|
|
namespace sd {
|
|
|
|
|
|
|
|
ViewShell::Implementation::Implementation (ViewShell& rViewShell)
|
2004-08-04 08:00:53 +00:00
|
|
|
: mbIsShowingUIControls(false),
|
|
|
|
mbIsMainViewShell(false),
|
2004-10-28 12:33:51 +00:00
|
|
|
mrViewShell (rViewShell),
|
|
|
|
mbIsInitialized(false)
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
ViewShell::Implementation::~Implementation (void)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void ViewShell::Implementation::ProcessModifyPageSlot (
|
|
|
|
SfxRequest& rRequest,
|
|
|
|
SdPage* pCurrentPage,
|
|
|
|
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);
|
2004-10-28 12:33:51 +00:00
|
|
|
SetOfByte aVisibleLayers;
|
2004-07-13 13:53:24 +00:00
|
|
|
BOOL bHandoutMode = FALSE;
|
|
|
|
SdPage* pHandoutMPage = NULL;
|
|
|
|
String aNewName;
|
|
|
|
|
|
|
|
// #95981#
|
|
|
|
String aOldName;
|
|
|
|
|
|
|
|
AutoLayout aNewAutoLayout;
|
|
|
|
|
|
|
|
// #95981#
|
|
|
|
AutoLayout aOldAutoLayout;
|
|
|
|
|
|
|
|
BOOL bBVisible;
|
|
|
|
BOOL bBObjsVisible;
|
|
|
|
const SfxItemSet* pArgs = rRequest.GetArgs();
|
|
|
|
|
2004-10-28 12:33:51 +00:00
|
|
|
if (pCurrentPage->TRG_HasMasterPage())
|
|
|
|
aVisibleLayers = pCurrentPage->TRG_GetMasterPageVisibleLayers();
|
|
|
|
else
|
|
|
|
aVisibleLayers.SetAll();
|
|
|
|
|
2004-07-13 13:53:24 +00:00
|
|
|
do
|
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
if (!pArgs || pArgs->Count() == 1 || pArgs->Count() == 2 )
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
if (pArgs && pArgs->Count() == 2)
|
|
|
|
{
|
|
|
|
// We have been called with a request that contains two
|
|
|
|
// arguments. One was used as preselected layout in a
|
|
|
|
// dialog. We could select that layout in the
|
|
|
|
// layout panel instead.
|
|
|
|
/*
|
|
|
|
SFX_REQUEST_ARG (rRequest, pNewAutoLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
|
|
|
|
eNewAutoLayout = (AutoLayout) pNewAutoLayout->GetValue
|
|
|
|
();
|
|
|
|
*/
|
|
|
|
}
|
|
|
|
|
|
|
|
// Make the layout menu visible in the tool pane.
|
|
|
|
SfxBoolItem aMakeToolPaneVisible (ID_VAL_ISVISIBLE, TRUE);
|
|
|
|
SfxUInt32Item aPanelId (ID_VAL_PANEL_INDEX,
|
|
|
|
::sd::toolpanel::TaskPaneViewShell::PID_LAYOUT);
|
|
|
|
mrViewShell.GetDispatcher()->Execute (
|
|
|
|
SID_TASK_PANE,
|
|
|
|
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD,
|
|
|
|
&aMakeToolPaneVisible,
|
|
|
|
&aPanelId,
|
|
|
|
NULL);
|
|
|
|
|
|
|
|
// We have activated a non-modal control in the task pane.
|
|
|
|
// Because it does not return anything we can not do anything
|
|
|
|
// more right now and have to exit here.
|
|
|
|
break;
|
2004-07-13 13:53:24 +00:00
|
|
|
}
|
2005-01-21 15:37:09 +00:00
|
|
|
else if (pArgs->Count() == 4)
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
SFX_REQUEST_ARG (rRequest, pNewName, SfxStringItem, ID_VAL_PAGENAME, FALSE);
|
|
|
|
SFX_REQUEST_ARG (rRequest, pNewAutoLayout, SfxUInt32Item, ID_VAL_WHATLAYOUT, FALSE);
|
|
|
|
SFX_REQUEST_ARG (rRequest, pBVisible, SfxBoolItem, ID_VAL_ISPAGEBACK, FALSE);
|
|
|
|
SFX_REQUEST_ARG (rRequest, pBObjsVisible, SfxBoolItem, ID_VAL_ISPAGEOBJ, FALSE);
|
|
|
|
AutoLayout aLayout ((AutoLayout)pNewAutoLayout->GetValue ());
|
|
|
|
if (aLayout >= AUTOLAYOUT_TITLE
|
|
|
|
&& aLayout <= AUTOLAYOUT_HANDOUT6)
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
aNewName = pNewName->GetValue ();
|
|
|
|
aNewAutoLayout = (AutoLayout) pNewAutoLayout->GetValue ();
|
|
|
|
bBVisible = pBVisible->GetValue ();
|
|
|
|
bBObjsVisible = pBObjsVisible->GetValue ();
|
2004-07-13 13:53:24 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
StarBASIC::FatalError (SbERR_BAD_PROP_VALUE);
|
|
|
|
rRequest.Ignore ();
|
|
|
|
break;
|
2004-07-13 13:53:24 +00:00
|
|
|
}
|
2005-01-21 15:37:09 +00:00
|
|
|
if (ePageKind == PK_HANDOUT)
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
bHandoutMode = TRUE;
|
|
|
|
pHandoutMPage = pDocument->GetMasterSdPage(0, PK_HANDOUT);
|
2004-07-13 13:53:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
StarBASIC::FatalError (SbERR_WRONG_ARGS);
|
2004-07-13 13:53:24 +00:00
|
|
|
rRequest.Ignore ();
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
SdPage* pUndoPage =
|
|
|
|
bHandoutMode ? pHandoutMPage : pCurrentPage;
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
// #67720#
|
|
|
|
SfxUndoManager* pUndoManager = mrViewShell.GetDocSh()->GetUndoManager();
|
|
|
|
DBG_ASSERT(pUndoManager, "No UNDO MANAGER ?!?");
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
// #90356#
|
|
|
|
sal_uInt16 nActionCount(pUndoManager->GetUndoActionCount());
|
|
|
|
sal_Bool bContinue(sal_True);
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
if(nActionCount)
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
// #90356# get SdOptions
|
|
|
|
SdOptions* pOptions = SD_MOD()->GetSdOptions(pDocument->GetDocumentType());
|
|
|
|
sal_Bool bShowDialog(pOptions->IsShowUndoDeleteWarning());
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
// #95981# If only name is changed do not show
|
|
|
|
// ImpUndoDeleteWarning dialog
|
|
|
|
if(bShowDialog)
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
sal_Bool bNameChanged(aNewName != aOldName);
|
|
|
|
sal_Bool bLayoutChanged(aNewAutoLayout != aOldAutoLayout);
|
|
|
|
|
|
|
|
if(bNameChanged && !bLayoutChanged)
|
|
|
|
bShowDialog = sal_False;
|
2004-07-13 13:53:24 +00:00
|
|
|
}
|
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
if(bShowDialog)
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
// ask user if he wants to loose UNDO stack
|
|
|
|
ImpUndoDeleteWarning aUndoDeleteDlg(mrViewShell.GetActiveWindow());
|
|
|
|
|
|
|
|
if(BUTTONID_OK == aUndoDeleteDlg.Execute())
|
|
|
|
{
|
|
|
|
pUndoManager->Clear();
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
bContinue = sal_False;
|
|
|
|
}
|
|
|
|
|
|
|
|
// #90356# write option flag back if change was done
|
|
|
|
if(aUndoDeleteDlg.IsWarningDisabled())
|
|
|
|
{
|
|
|
|
pOptions->SetShowUndoDeleteWarning(FALSE);
|
|
|
|
}
|
2004-07-13 13:53:24 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
if(bContinue)
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
ModifyPageUndoAction* pAction = new ModifyPageUndoAction(
|
|
|
|
pUndoManager, pDocument, pUndoPage, aNewName, aNewAutoLayout, bBVisible, bBObjsVisible);
|
|
|
|
pUndoManager->AddUndoAction(pAction);
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
// Clear the selection because the selectec object may be removed as
|
|
|
|
// a result of the ssignment of the layout.
|
|
|
|
mrViewShell.GetDrawView()->UnmarkAll();
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
SfxChildWindow* pPreviewChildWindow =
|
|
|
|
mrViewShell.GetViewFrame()->GetChildWindow(
|
|
|
|
PreviewChildWindow::GetChildWindowId() );
|
|
|
|
PreviewWindow* pPreviewWin = NULL;
|
|
|
|
|
|
|
|
// notify preview slide show are changes are to be done
|
|
|
|
/*
|
|
|
|
if( pPreviewChildWindow!=NULL
|
|
|
|
&& (pPreviewWin = static_cast<PreviewWindow*>(
|
|
|
|
pPreviewChildWindow->GetWindow()))!= NULL)
|
|
|
|
{
|
|
|
|
FuSlideShow* pShow = pPreviewWin->GetSlideShow();
|
|
|
|
|
|
|
|
if( pShow )
|
|
|
|
pShow->InitPageModify();
|
|
|
|
}
|
|
|
|
*/
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
if (!bHandoutMode)
|
|
|
|
{
|
|
|
|
if (pCurrentPage->GetName() != aNewName)
|
2004-07-13 13:53:24 +00:00
|
|
|
{
|
2005-01-21 15:37:09 +00:00
|
|
|
pCurrentPage->SetName(aNewName);
|
|
|
|
|
|
|
|
if (ePageKind == PK_STANDARD)
|
|
|
|
{
|
|
|
|
SdPage* pNotesPage = pDocument->GetSdPage(nPage, PK_NOTES);
|
|
|
|
pNotesPage->SetName(aNewName);
|
|
|
|
}
|
2004-07-13 13:53:24 +00:00
|
|
|
}
|
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
pCurrentPage->SetAutoLayout(aNewAutoLayout, TRUE);
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
aBckgrnd = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRND)), FALSE);
|
|
|
|
aBckgrndObj = rLayerAdmin.GetLayerID(String(SdResId(STR_LAYER_BCKGRNDOBJ)), FALSE);
|
|
|
|
aVisibleLayers.Set(aBckgrnd, bBVisible);
|
|
|
|
aVisibleLayers.Set(aBckgrndObj, bBObjsVisible);
|
|
|
|
pCurrentPage->TRG_SetMasterPageVisibleLayers(aVisibleLayers);
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
pHandoutMPage->SetAutoLayout(aNewAutoLayout, TRUE);
|
|
|
|
}
|
|
|
|
// The list of presentation objects at the page
|
|
|
|
// has been cleared by SetAutolayout(). We still
|
|
|
|
// have to clear the list of removed presentation
|
|
|
|
// objects held by the model which references the
|
|
|
|
// former list.
|
|
|
|
pDocument->ClearDeletedPresObjList();
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
mrViewShell.GetViewFrame()->GetDispatcher()->Execute(SID_SWITCHPAGE,
|
|
|
|
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD);
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
BOOL bSetModified = TRUE;
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
if (pArgs && pArgs->Count() == 1)
|
|
|
|
{
|
|
|
|
bSetModified = (BOOL) ((SfxBoolItem&) pArgs->Get(SID_MODIFYPAGE)).GetValue();
|
|
|
|
}
|
2004-07-13 13:53:24 +00:00
|
|
|
|
2005-01-21 15:37:09 +00:00
|
|
|
pDocument->SetChanged(bSetModified);
|
|
|
|
}
|
2004-07-13 13:53:24 +00:00
|
|
|
}
|
|
|
|
while (false);
|
|
|
|
|
|
|
|
mrViewShell.Cancel();
|
|
|
|
rRequest.Done ();
|
|
|
|
}
|
|
|
|
|
2004-10-28 12:33:51 +00:00
|
|
|
|
2004-11-16 15:38:11 +00:00
|
|
|
|
|
|
|
|
|
|
|
sal_uInt16 ViewShell::Implementation::GetViewId (void)
|
|
|
|
{
|
|
|
|
switch (mrViewShell.GetShellType())
|
|
|
|
{
|
|
|
|
case ViewShell::ST_IMPRESS:
|
|
|
|
case ViewShell::ST_NOTES:
|
|
|
|
case ViewShell::ST_HANDOUT:
|
|
|
|
return IMPRESS_FACTORY_ID;
|
|
|
|
|
|
|
|
case ViewShell::ST_DRAW:
|
|
|
|
return DRAW_FACTORY_ID;
|
|
|
|
|
|
|
|
case ViewShell::ST_OUTLINE:
|
|
|
|
return OUTLINE_FACTORY_ID;
|
|
|
|
|
|
|
|
case ViewShell::ST_SLIDE:
|
|
|
|
case ViewShell::ST_SLIDE_SORTER:
|
|
|
|
return SLIDE_SORTER_FACTORY_ID;
|
|
|
|
|
|
|
|
case ViewShell::ST_PREVIEW:
|
|
|
|
return PREVIEW_FACTORY_ID;
|
|
|
|
|
|
|
|
case ViewShell::ST_PRESENTATION:
|
|
|
|
return PRESENTATION_FACTORY_ID;
|
|
|
|
|
|
|
|
// Since we have to return a view id for every possible shell type
|
|
|
|
// and there is not (yet) a proper ViewShellBase sub class for the
|
|
|
|
// remaining types we chose the Impress factory as a fall back.
|
|
|
|
case ViewShell::ST_TASK_PANE:
|
|
|
|
case ViewShell::ST_NONE:
|
|
|
|
default:
|
|
|
|
return IMPRESS_FACTORY_ID;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
2004-07-13 13:53:24 +00:00
|
|
|
} // end of namespace sd
|