LCOV - code coverage report
Current view: top level - usr/local/src/libreoffice/sd/source/ui/view - PresentationViewShellBase.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 8 31 25.8 %
Date: 2013-07-09 Functions: 4 14 28.6 %
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          10 : void PresentationViewShellBase::RegisterFactory( sal_uInt16 nPrio )
      53             : {
      54             :     pFactory = new SfxViewFactory(
      55          10 :         &CreateInstance,nPrio,"FullScreenPresentation");
      56          10 :     InitFactory();
      57          10 : }
      58          10 : void PresentationViewShellBase::InitFactory()
      59             : {
      60          10 :     SFX_VIEW_REGISTRATION(DrawDocShell);
      61          10 : }
      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           0 :     if (_pFrame!=NULL)
      73             :     {
      74             :         Reference<beans::XPropertySet> xFrameSet (
      75           0 :             _pFrame->GetFrame().GetFrameInterface(),
      76           0 :             UNO_QUERY);
      77           0 :         if (xFrameSet.is())
      78             :         {
      79           0 :             Reference<beans::XPropertySet> xLayouterSet(xFrameSet->getPropertyValue("LayoutManager"), UNO_QUERY);
      80           0 :             if (xLayouterSet.is())
      81             :             {
      82           0 :                 xLayouterSet->setPropertyValue("AutomaticToolbars", makeAny(sal_False));
      83           0 :             }
      84           0 :         }
      85             :     }
      86           0 : }
      87             : 
      88             : 
      89             : 
      90             : 
      91           0 : PresentationViewShellBase::~PresentationViewShellBase (void)
      92             : {
      93           0 : }
      94             : 
      95             : 
      96             : 
      97           0 : void PresentationViewShellBase::InitializeFramework (void)
      98             : {
      99             :     com::sun::star::uno::Reference<com::sun::star::frame::XController>
     100           0 :         xController (GetController());
     101           0 :     sd::framework::PresentationModule::Initialize(xController);
     102           0 : }
     103             : 
     104          33 : } // end of namespace sd
     105             : 
     106             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10