LCOV - code coverage report
Current view: top level - sd/source/ui/view - GraphicViewShellBase.cxx (source / functions) Hit Total Coverage
Test: commit e02a6cb2c3e2b23b203b422e4e0680877f232636 Lines: 0 29 0.0 %
Date: 2014-04-14 Functions: 0 13 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             : 
      21             : #include "GraphicViewShellBase.hxx"
      22             : 
      23             : #include "GraphicDocShell.hxx"
      24             : #include "sdresid.hxx"
      25             : #include "strings.hrc"
      26             : #include "app.hrc"
      27             : #include "framework/DrawModule.hxx"
      28             : #include "framework/FrameworkHelper.hxx"
      29             : #include <sfx2/request.hxx>
      30             : 
      31             : namespace sd {
      32             : 
      33           0 : TYPEINIT1(GraphicViewShellBase, ViewShellBase);
      34             : 
      35             : // We have to expand the SFX_IMPL_VIEWFACTORY macro to call LateInit() after a
      36             : // new GraphicViewShellBase object has been constructed.
      37             : 
      38             : SfxViewFactory* GraphicViewShellBase::pFactory;
      39           0 : SfxViewShell* GraphicViewShellBase::CreateInstance (
      40             :     SfxViewFrame *pFrame, SfxViewShell *pOldView)
      41             : {
      42           0 :     GraphicViewShellBase* pBase = new GraphicViewShellBase(pFrame, pOldView);
      43           0 :     pBase->LateInit(framework::FrameworkHelper::msDrawViewURL);
      44           0 :     return pBase;
      45             : }
      46           0 : void GraphicViewShellBase::RegisterFactory( sal_uInt16 nPrio )
      47             : {
      48           0 :     pFactory = new SfxViewFactory(&CreateInstance,nPrio,"Default");
      49           0 :     InitFactory();
      50           0 : }
      51           0 : void GraphicViewShellBase::InitFactory()
      52             : {
      53           0 :     SFX_VIEW_REGISTRATION(GraphicDocShell);
      54           0 : }
      55             : 
      56             : 
      57             : 
      58             : 
      59             : 
      60             : 
      61             : 
      62             : 
      63           0 : GraphicViewShellBase::GraphicViewShellBase (
      64             :     SfxViewFrame* _pFrame,
      65             :     SfxViewShell* pOldShell)
      66           0 :     : ViewShellBase (_pFrame, pOldShell)
      67             : {
      68           0 : }
      69             : 
      70             : 
      71             : 
      72             : 
      73           0 : GraphicViewShellBase::~GraphicViewShellBase (void)
      74             : {
      75           0 : }
      76             : 
      77             : 
      78             : 
      79             : 
      80           0 : void GraphicViewShellBase::Execute (SfxRequest& rRequest)
      81             : {
      82           0 :     sal_uInt16 nSlotId = rRequest.GetSlot();
      83             : 
      84           0 :     switch (nSlotId)
      85             :     {
      86             :         case SID_NOTES_WINDOW:
      87             :         case SID_SLIDE_SORTER_MULTI_PANE_GUI:
      88             :         case SID_DIAMODE:
      89             :         case SID_OUTLINEMODE:
      90             :         case SID_NOTESMODE:
      91             :         case SID_HANDOUTMODE:
      92             :             // Prevent some Impress-only slots from being executed.
      93           0 :             rRequest.Cancel();
      94           0 :             break;
      95             : 
      96             :         case SID_TASKPANE:
      97             :         case SID_SWITCH_SHELL:
      98             :         case SID_LEFT_PANE_DRAW:
      99             :         case SID_LEFT_PANE_IMPRESS:
     100             :         default:
     101             :             // The remaining requests are forwarded to our base class.
     102           0 :             ViewShellBase::Execute (rRequest);
     103           0 :             break;
     104             :     }
     105             : 
     106           0 : }
     107             : 
     108             : 
     109             : 
     110             : 
     111           0 : void GraphicViewShellBase::InitializeFramework (void)
     112             : {
     113             :     com::sun::star::uno::Reference<com::sun::star::frame::XController>
     114           0 :         xController (GetController());
     115           0 :     sd::framework::DrawModule::Initialize(xController);
     116           0 : }
     117             : 
     118             : 
     119             : } // end of namespace sd
     120             : 
     121             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10