LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sd/source/ui/func - fucushow.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 1 23 4.3 %
Date: 2013-07-09 Functions: 2 10 20.0 %
Legend: Lines: hit not hit

          Line data    Source code
       1             : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2             : /*
       3             :  * This file is part of the LibreOffice project.
       4             :  *
       5             :  * This Source Code Form is subject to the terms of the Mozilla Public
       6             :  * License, v. 2.0. If a copy of the MPL was not distributed with this
       7             :  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
       8             :  *
       9             :  * This file incorporates work covered by the following license notice:
      10             :  *
      11             :  *   Licensed to the Apache Software Foundation (ASF) under one or more
      12             :  *   contributor license agreements. See the NOTICE file distributed
      13             :  *   with this work for additional information regarding copyright
      14             :  *   ownership. The ASF licenses this file to you under the Apache
      15             :  *   License, Version 2.0 (the "License"); you may not use this file
      16             :  *   except in compliance with the License. You may obtain a copy of
      17             :  *   the License at http://www.apache.org/licenses/LICENSE-2.0 .
      18             :  */
      19             : 
      20             : 
      21             : #include "fucushow.hxx"
      22             : 
      23             : #include <svx/svxids.hrc>
      24             : 
      25             : #include "app.hrc"
      26             : #include "sdresid.hxx"
      27             : #include "ViewShell.hxx"
      28             : #include "drawdoc.hxx"
      29             : #include "sdpage.hxx"
      30             : #include <vcl/msgbox.hxx>
      31             : #include <sfx2/dispatch.hxx>
      32             : #include <sfx2/viewfrm.hxx>
      33             : 
      34             : #include "sdabstdlg.hxx"
      35             : 
      36             : namespace sd {
      37             : 
      38           0 : TYPEINIT1( FuCustomShowDlg, FuPoor );
      39             : 
      40             : 
      41             : 
      42           0 : FuCustomShowDlg::FuCustomShowDlg (
      43             :     ViewShell* pViewSh,
      44             :     ::sd::Window*    pWin,
      45             :     ::sd::View* pView,
      46             :     SdDrawDocument* pDoc,
      47             :     SfxRequest& rReq)
      48           0 :     : FuPoor( pViewSh, pWin, pView, pDoc, rReq )
      49             : {
      50           0 : }
      51             : 
      52           0 : FunctionReference FuCustomShowDlg::Create( ViewShell* pViewSh, ::sd::Window* pWin, ::sd::View* pView, SdDrawDocument* pDoc, SfxRequest& rReq )
      53             : {
      54           0 :     FunctionReference xFunc( new FuCustomShowDlg( pViewSh, pWin, pView, pDoc, rReq ) );
      55           0 :     xFunc->DoExecute(rReq);
      56           0 :     return xFunc;
      57             : }
      58             : 
      59           0 : void FuCustomShowDlg::DoExecute( SfxRequest& )
      60             : {
      61           0 :     SdAbstractDialogFactory* pFact = SdAbstractDialogFactory::Create();
      62           0 :     AbstractSdCustomShowDlg* pDlg = pFact ? pFact->CreateSdCustomShowDlg( NULL, *mpDoc ) : 0;
      63           0 :     if( pDlg )
      64             :     {
      65           0 :         sal_uInt16 nRet = pDlg->Execute();
      66           0 :         if( pDlg->IsModified() )
      67             :         {
      68           0 :             mpDoc->SetChanged( sal_True );
      69           0 :             sd::PresentationSettings& rSettings = mpDoc->getPresentationSettings();
      70           0 :             rSettings.mbCustomShow = pDlg->IsCustomShow();
      71             :         }
      72           0 :         delete pDlg;
      73             : 
      74           0 :         if( nRet == RET_YES )
      75             :         {
      76           0 :             mpViewShell->SetStartShowWithDialog();
      77             : 
      78             :             mpViewShell->GetViewFrame()->GetDispatcher()->Execute( SID_PRESENTATION,
      79           0 :                     SFX_CALLMODE_ASYNCHRON | SFX_CALLMODE_RECORD );
      80             :         }
      81             :     }
      82           0 : }
      83             : 
      84          33 : } // end of namespace
      85             : 
      86             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10