2010-10-12 15:51:52 +02:00
|
|
|
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
|
2012-06-21 14:30:25 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the LibreOffice project.
|
|
|
|
*
|
|
|
|
* This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
* License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
|
|
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
|
|
*
|
|
|
|
* This file incorporates work covered by the following license notice:
|
|
|
|
*
|
|
|
|
* Licensed to the Apache Software Foundation (ASF) under one or more
|
|
|
|
* contributor license agreements. See the NOTICE file distributed
|
|
|
|
* with this work for additional information regarding copyright
|
|
|
|
* ownership. The ASF licenses this file to you under the Apache
|
|
|
|
* License, Version 2.0 (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.apache.org/licenses/LICENSE-2.0 .
|
|
|
|
*/
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2004-01-20 10:04:14 +00:00
|
|
|
#include "fucushow.hxx"
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
#include <svx/svxids.hrc>
|
|
|
|
|
|
|
|
#include "app.hrc"
|
|
|
|
#include "sdresid.hxx"
|
2004-01-20 10:04:14 +00:00
|
|
|
#include "ViewShell.hxx"
|
2016-05-11 20:54:17 +01:00
|
|
|
#include "Window.hxx"
|
2000-09-18 16:07:07 +00:00
|
|
|
#include "drawdoc.hxx"
|
|
|
|
#include "sdpage.hxx"
|
|
|
|
#include <vcl/msgbox.hxx>
|
|
|
|
#include <sfx2/dispatch.hxx>
|
2000-09-21 15:12:50 +00:00
|
|
|
#include <sfx2/viewfrm.hxx>
|
2000-09-18 16:07:07 +00:00
|
|
|
|
2006-12-12 16:16:55 +00:00
|
|
|
#include "sdabstdlg.hxx"
|
2015-09-18 09:09:12 +01:00
|
|
|
#include <memory>
|
2004-05-10 14:46:46 +00:00
|
|
|
|
2004-01-20 10:04:14 +00:00
|
|
|
namespace sd {
|
|
|
|
|
2000-09-18 16:07:07 +00:00
|
|
|
|
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
|
|
|
|
2013-10-25 15:42:11 +02:00
|
|
|
rtl::Reference<FuPoor> FuCustomShowDlg::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
|
2005-12-14 15:57:31 +00:00
|
|
|
{
|
2013-10-25 15:42:11 +02:00
|
|
|
rtl::Reference<FuPoor> xFunc( new FuCustomShowDlg( pViewSh, pWin, pView, pDoc, rReq ) );
|
2005-12-14 15:57:31 +00:00
|
|
|
xFunc->DoExecute(rReq);
|
|
|
|
return xFunc;
|
|
|
|
}
|
|
|
|
|
2006-12-12 16:16:55 +00:00
|
|
|
void FuCustomShowDlg::DoExecute( SfxRequest& )
|
2005-12-14 15:57:31 +00:00
|
|
|
{
|
2006-12-12 16:16:55 +00:00
|
|
|
SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
|
2016-05-11 20:54:17 +01:00
|
|
|
std::unique_ptr<AbstractSdCustomShowDlg> pDlg(pFact ? pFact->CreateSdCustomShowDlg(mpViewShell->GetActiveWindow(), *mpDoc) : nullptr);
|
2005-12-14 15:57:31 +00:00
|
|
|
if( pDlg )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2011-01-17 11:41:00 +01:00
|
|
|
sal_uInt16 nRet = pDlg->Execute();
|
2008-04-02 08:47:05 +00:00
|
|
|
if( pDlg->IsModified() )
|
2000-09-18 16:07:07 +00:00
|
|
|
{
|
2015-08-20 12:58:15 +02:00
|
|
|
mpDoc->SetChanged();
|
2008-04-02 08:47:05 +00:00
|
|
|
sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings();
|
|
|
|
rSettings.mbCustomShow = pDlg->IsCustomShow();
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
2014-05-19 22:25:31 +09:00
|
|
|
pDlg.reset();
|
2008-04-02 08:47:05 +00:00
|
|
|
|
|
|
|
if( nRet == RET_YES )
|
|
|
|
{
|
|
|
|
mpViewShell->SetStartShowWithDialog();
|
|
|
|
|
|
|
|
mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_PRESENTATION,
|
2014-10-11 16:01:26 +02:00
|
|
|
SfxCallMode::ASYNCHRON | SfxCallMode::RECORD );
|
2008-04-02 08:47:05 +00:00
|
|
|
}
|
2000-09-18 16:07:07 +00:00
|
|
|
}
|
|
|
|
}
|
2004-01-20 10:04:14 +00:00
|
|
|
|
|
|
|
} // end of namespace
|
2010-10-12 15:51:52 +02:00
|
|
|
|
|
|
|
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|