LCOV - code coverage report
Current view: top level - sd/source/ui/view - PresentationViewShellBase.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 29 0.0 %
Date: 2014-04-14 Functions: 0 12 0.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             : #include "PresentationViewShellBase.hxx"
      21             : #include "sdresid.hxx"
      22             : #include "DrawDocShell.hxx"
      23             : #include "strings.hrc"
      24             : #include "framework/FrameworkHelper.hxx"
      25             : #include "framework/PresentationModule.hxx"
      26             : 
      27             : #include <sfx2/viewfrm.hxx>
      28             : #include <com/sun/star/beans/XPropertySet.hpp>
      29             : #include <com/sun/star/frame/XLayoutManager.hpp>
      30             : 
      31             : using namespace ::com::sun::star;
      32             : using namespace ::com::sun::star::uno;
      33             : 
      34             : namespace sd {
      35             : 
      36             : class DrawDocShell;
      37             : 
      38           0 : TYPEINIT1(PresentationViewShellBase, ViewShellBase);
      39             : 
      40             : // We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
      41             : // new PresentationViewShellBase object has been constructed.
      42             : 
      43             : SfxViewFactory* PresentationViewShellBase::pFactory;
      44           0 : SfxViewShell* PresentationViewShellBase::CreateInstance (
      45             :     SfxViewFrame *_pFrame, SfxViewShell *pOldView)
      46             : {
      47             :     PresentationViewShellBase* pBase =
      48           0 :         new PresentationViewShellBase(_pFrame, pOldView);
      49           0 :     pBase->LateInit(framework::FrameworkHelper::msPresentationViewURL);
      50           0 :     return pBase;
      51             : }
      52           0 : void PresentationViewShellBase::RegisterFactory( sal_uInt16 nPrio )
      53             : {
      54             :     pFactory = new SfxViewFactory(
      55           0 :         &CreateInstance,nPrio,"FullScreenPresentation");
      56           0 :     InitFactory();
      57           0 : }
      58           0 : void PresentationViewShellBase::InitFactory()
      59             : {
      60           0 :     SFX_VIEW_REGISTRATION(DrawDocShell);
      61           0 : }
      62             : 
      63             : 
      64             : 
      65             : 
      66           0 : PresentationViewShellBase::PresentationViewShellBase (
      67             :     SfxViewFrame* _pFrame,
      68             :     SfxViewShell* pOldShell)
      69           0 :     : ViewShellBase (_pFrame, pOldShell)
      70             : {
      71             :     // Hide the automatic (non-context sensitive) tool bars.
      72             :     Reference<beans::XPropertySet> xFrameSet (
      73           0 :         _pFrame->GetFrame().GetFrameInterface(),
      74           0 :         UNO_QUERY);
      75           0 :     if (xFrameSet.is())
      76             :     {
      77           0 :         Reference<beans::XPropertySet> xLayouterSet(xFrameSet->getPropertyValue("LayoutManager"), UNO_QUERY);
      78           0 :         if (xLayouterSet.is())
      79             :         {
      80           0 :             xLayouterSet->setPropertyValue("AutomaticToolbars", makeAny(sal_False));
      81           0 :         }
      82           0 :     }
      83           0 : }
      84             : 
      85             : 
      86             : 
      87             : 
      88           0 : PresentationViewShellBase::~PresentationViewShellBase (void)
      89             : {
      90           0 : }
      91             : 
      92             : 
      93             : 
      94           0 : void PresentationViewShellBase::InitializeFramework (void)
      95             : {
      96             :     com::sun::star::uno::Reference<com::sun::star::frame::XController>
      97           0 :         xController (GetController());
      98           0 :     sd::framework::PresentationModule::Initialize(xController);
      99           0 : }
     100             : 
     101             : } // end of namespace sd
     102             : 
     103             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10