2000-09-18 16:07:07 +00:00
|
|
|
/*************************************************************************
|
|
|
|
*
|
2005-09-09 03:40:44 +00:00
|
|
|
* OpenOffice.org - a multi-platform office productivity suite
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 03:40:44 +00:00
|
|
|
* $RCSfile: fucushow.cxx,v $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2006-09-16 17:49:13 +00:00
|
|
|
* $Revision: 1.8 $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2006-09-16 17:49:13 +00:00
|
|
|
* last change: $Author: obo $ $Date: 2006-09-16 18:49:13 $
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 03:40:44 +00:00
|
|
|
* The Contents of this file are made available subject to
|
|
|
|
* the terms of GNU Lesser General Public License Version 2.1.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
|
|
|
*
|
2005-09-09 03:40:44 +00:00
|
|
|
* GNU Lesser General Public License Version 2.1
|
|
|
|
* =============================================
|
|
|
|
* Copyright 2005 by Sun Microsystems, Inc.
|
|
|
|
* 901 San Antonio Road, Palo Alto, CA 94303, USA
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 03:40:44 +00:00
|
|
|
* 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.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 03:40:44 +00:00
|
|
|
* 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.
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
2005-09-09 03:40:44 +00:00
|
|
|
* 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
|
2000-09-18 16:07:07 +00:00
|
|
|
*
|
|
|
|
************************************************************************/
|
|
|
|
|
2006-09-16 17:49:13 +00:00
|
|
|
// MARKER(update_precomp.py): autogen include statement, do not remove
|
|
|
|
#include "precompiled_sd.hxx"
|
|
|
|
|
2004-01-20 10:04:14 +00:00
|
|
|
#include "fucushow.hxx"
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <svx/svxids.hrc>
|
|
|
|
|
|
|
|
|
2004-05-10 14:46:46 +00:00
|
|
|
//CHINA001 #include "custsdlg.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
|
|
|
|
#include "app.hrc"
|
|
|
|
#include "sdresid.hxx"
|
|
|
|
|
2004-01-20 10:04:14 +00:00
|
|
|
#ifndef SD_VIEW_SHELL_HXX
|
|
|
|
#include "ViewShell.hxx"
|
|
|
|
#endif
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "drawdoc.hxx"
|
|
|
|
#include "sdpage.hxx"
|
|
|
|
|
|
|
|
#ifndef _SV_MSGBOX_HXX //autogen
|
|
|
|
#include <vcl/msgbox.hxx>
|
|
|
|
#endif
|
|
|
|
#ifndef _SFXDISPATCH_HXX //autogen
|
|
|
|
#include <sfx2/dispatch.hxx>
|
|
|
|
#endif
|
2000-09-21 15:12:50 +00:00
|
|
|
#ifndef _SFXVIEWFRM_HXX
|
|
|
|
#include <sfx2/viewfrm.hxx>
|
|
|
|
#endif
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-05-10 14:46:46 +00:00
|
|
|
#include "sdabstdlg.hxx" //CHINA001
|
|
|
|
#include "custsdlg.hrc" //CHINA001
|
|
|
|
|
2004-01-20 10:04:14 +00:00
|
|
|
namespace sd {
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
TYPEINIT1( FuCustomShowDlg, FuPoor );
|
|
|
|
|
|
|
|
|
|
|
|
/*************************************************************************
|
|
|
|
|*
|
|
|
|
|* Konstruktor
|
|
|
|
|*
|
|
|
|
\************************************************************************/
|
|
|
|
|
2004-01-20 10:04:14 +00:00
|
|
|
FuCustomShowDlg::FuCustomShowDlg (
|
|
|
|
ViewShell* pViewSh,
|
|
|
|
::sd::Window* pWin,
|
|
|
|
::sd::View* pView,
|
|
|
|
SdDrawDocument* pDoc,
|
|
|
|
SfxRequest& rReq)
|
|
|
|
: FuPoor( pViewSh, pWin, pView, pDoc, rReq )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-12-14 15:57:31 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2005-12-14 15:57:31 +00:00
|
|
|
FunctionReference FuCustomShowDlg::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
|
|
|
|
{
|
|
|
|
FunctionReference xFunc( new FuCustomShowDlg( pViewSh, pWin, pView, pDoc, rReq ) );
|
|
|
|
xFunc->DoExecute(rReq);
|
|
|
|
return xFunc;
|
|
|
|
}
|
|
|
|
|
|
|
|
void FuCustomShowDlg::DoExecute( SfxRequest& rReq )
|
|
|
|
{
|
2004-05-10 14:46:46 +00:00
|
|
|
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();//CHINA001
|
2005-12-14 15:57:31 +00:00
|
|
|
AbstractSdCustomShowDlg* pDlg = pFact ? pFact->CreateSdCustomShowDlg(ResId( DLG_CUSTOMSHOW ), NULL, *pDoc ) : 0;
|
2004-05-10 14:46:46 +00:00
|
|
|
DBG_ASSERT(pDlg, "Dialogdiet fail!");//CHINA001
|
2005-12-14 15:57:31 +00:00
|
|
|
if( pDlg )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-12-14 15:57:31 +00:00
|
|
|
USHORT nRet = pDlg->Execute(); //CHINA001 nRet = aDlg.Execute();
|
|
|
|
if( nRet != RET_CANCEL )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2005-12-14 15:57:31 +00:00
|
|
|
// wenn sich etwas geaendert hat, setzen wir das Modified-Flag,
|
|
|
|
if( pDlg->IsModified() )//CHINA001 if( aDlg.IsModified() )
|
|
|
|
{
|
|
|
|
pDoc->SetChanged( TRUE );
|
|
|
|
sd::PresentationSettings& rSettings = pDoc->getPresentationSettings();
|
|
|
|
rSettings.mbCustomShow = pDlg->IsCustomShow();
|
|
|
|
}
|
|
|
|
|
|
|
|
if( nRet == RET_YES )
|
|
|
|
{
|
|
|
|
pViewShell->SetStartShowWithDialog();
|
|
|
|
|
|
|
|
pViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_PRESENTATION,
|
|
|
|
SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
|
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2005-12-14 15:57:31 +00:00
|
|
|
delete pDlg; //CHINA001
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2004-01-20 10:04:14 +00:00
|
|
|
|
|
|
|
} // end of namespace
|