LCOV - code coverage report
Current view: top level - libreoffice/sd/source/ui/framework/module - ToolPanelModule.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 29 0.0 %
Date: 2012-12-27 Functions: 0 5 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 "ToolPanelModule.hxx"
      22             : 
      23             : #include "framework/FrameworkHelper.hxx"
      24             : #include <com/sun/star/drawing/framework/XTabBar.hpp>
      25             : #include <com/sun/star/drawing/framework/TabBarButton.hpp>
      26             : 
      27             : #include "strings.hrc"
      28             : #include "sdresid.hxx"
      29             : #include "svtools/toolpanelopt.hxx"
      30             : 
      31             : using namespace ::com::sun::star;
      32             : using namespace ::com::sun::star::uno;
      33             : using namespace ::com::sun::star::drawing::framework;
      34             : 
      35             : using ::rtl::OUString;
      36             : using ::sd::framework::FrameworkHelper;
      37             : 
      38             : 
      39             : namespace sd { namespace framework {
      40             : 
      41             : 
      42             : //===== ToolPanelModule ==================================================
      43             : 
      44           0 : ToolPanelModule::ToolPanelModule (
      45             :     const Reference<frame::XController>& rxController,
      46             :     const OUString& rsRightPaneURL)
      47             :     : ResourceManager(rxController,
      48             :         FrameworkHelper::CreateResourceId(FrameworkHelper::msTaskPaneURL, rsRightPaneURL)),
      49           0 :       mxControllerManager(rxController,UNO_QUERY)
      50             : {
      51           0 :     if (mxConfigurationController.is())
      52             :     {
      53           0 :         if (SvtToolPanelOptions().GetVisibleImpressView()==sal_True)
      54           0 :             AddActiveMainView(FrameworkHelper::msImpressViewURL);
      55           0 :         if (SvtToolPanelOptions().GetVisibleOutlineView()==sal_True)
      56           0 :             AddActiveMainView(FrameworkHelper::msOutlineViewURL);
      57           0 :         if (SvtToolPanelOptions().GetVisibleNotesView()==sal_True)
      58           0 :             AddActiveMainView(FrameworkHelper::msNotesViewURL);
      59           0 :         if (SvtToolPanelOptions().GetVisibleHandoutView()==sal_True)
      60           0 :             AddActiveMainView(FrameworkHelper::msHandoutViewURL);
      61           0 :         if (SvtToolPanelOptions().GetVisibleSlideSorterView()==sal_True)
      62           0 :             AddActiveMainView(FrameworkHelper::msSlideSorterURL);
      63             : 
      64           0 :         mxConfigurationController->addConfigurationChangeListener(
      65             :             this,
      66             :             FrameworkHelper::msResourceActivationEvent,
      67           0 :             Any());
      68             :     }
      69           0 : }
      70             : 
      71           0 : ToolPanelModule::~ToolPanelModule (void)
      72             : {
      73           0 : }
      74             : 
      75           0 : void ToolPanelModule::SaveResourceState (void)
      76             : {
      77           0 :     SvtToolPanelOptions().SetVisibleImpressView(IsResourceActive(FrameworkHelper::msImpressViewURL));
      78           0 :     SvtToolPanelOptions().SetVisibleOutlineView(IsResourceActive(FrameworkHelper::msOutlineViewURL));
      79           0 :     SvtToolPanelOptions().SetVisibleNotesView(IsResourceActive(FrameworkHelper::msNotesViewURL));
      80           0 :     SvtToolPanelOptions().SetVisibleHandoutView(IsResourceActive(FrameworkHelper::msHandoutViewURL));
      81           0 :     SvtToolPanelOptions().SetVisibleSlideSorterView(IsResourceActive(FrameworkHelper::msSlideSorterURL));
      82           0 : }
      83             : 
      84           0 : void SAL_CALL ToolPanelModule::notifyConfigurationChange (
      85             :     const ConfigurationChangeEvent& rEvent)
      86             :     throw (RuntimeException)
      87             : {
      88           0 :     if (!rEvent.Type.equals(FrameworkHelper::msResourceActivationEvent))
      89           0 :         ResourceManager::notifyConfigurationChange(rEvent);
      90           0 : }
      91             : 
      92             : } } // end of namespace sd::framework
      93             : 
      94             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10