LCOV - code coverage report
Current view: top level - libreoffice/basctl/source/basicide - basidectrlr.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 40 0.0 %
Date: 2012-12-27 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             : #include "basidectrlr.hxx"
      21             : 
      22             : #include "basidesh.hxx"
      23             : 
      24             : #include <cppuhelper/queryinterface.hxx>
      25             : #include <comphelper/sequence.hxx>
      26             : #include <com/sun/star/beans/PropertyAttribute.hpp>
      27             : 
      28             : #include <vcl/syswin.hxx>
      29             : 
      30             : namespace basctl
      31             : {
      32             : 
      33             : using namespace com::sun::star;
      34             : using namespace com::sun::star::uno;
      35             : using namespace com::sun::star::beans;
      36             : 
      37             : namespace
      38             : {
      39             : 
      40             : int const nPropertyIconId = 1;
      41           0 : OUString const sPropertyIconId("IconId");
      42             : 
      43             : }
      44             : 
      45             : 
      46             : //----------------------------------------------------------------------------
      47             : 
      48           0 : Controller::Controller (Shell* pViewShell)
      49             :     :OPropertyContainer( m_aBHelper )
      50             :     ,SfxBaseController( pViewShell )
      51           0 :     ,m_nIconId( ICON_MACROLIBRARY )
      52             : {
      53             :     registerProperty(
      54             :         sPropertyIconId, nPropertyIconId,
      55             :         PropertyAttribute::READONLY,
      56           0 :         &m_nIconId, getCppuType(&m_nIconId)
      57           0 :     );
      58           0 : }
      59             : 
      60             : //----------------------------------------------------------------------------
      61             : 
      62           0 : Controller::~Controller()
      63           0 : { }
      64             : 
      65             : // XInterface
      66             : //----------------------------------------------------------------------------
      67             : 
      68           0 : Any SAL_CALL Controller::queryInterface( const Type & rType ) throw(RuntimeException)
      69             : {
      70           0 :     Any aReturn = SfxBaseController::queryInterface( rType );
      71           0 :     if ( !aReturn.hasValue() )
      72           0 :         aReturn = OPropertyContainer::queryInterface( rType );
      73             : 
      74           0 :     return aReturn;
      75             : }
      76             : 
      77             : //----------------------------------------------------------------------------
      78             : 
      79           0 : void SAL_CALL Controller::acquire() throw()
      80             : {
      81           0 :     SfxBaseController::acquire();
      82           0 : }
      83             : 
      84             : //----------------------------------------------------------------------------
      85             : 
      86           0 : void SAL_CALL Controller::release() throw()
      87             : {
      88           0 :     SfxBaseController::release();
      89           0 : }
      90             : 
      91             : 
      92             : // XTypeProvider ( ::SfxBaseController )
      93             : //----------------------------------------------------------------------------
      94             : 
      95           0 : Sequence< Type > SAL_CALL Controller::getTypes() throw(RuntimeException)
      96             : {
      97             :     Sequence< Type > aTypes = ::comphelper::concatSequences(
      98             :         SfxBaseController::getTypes(),
      99             :         OPropertyContainer::getTypes()
     100           0 :     );
     101             : 
     102           0 :     return aTypes;
     103             : }
     104             : 
     105             : //----------------------------------------------------------------------------
     106             : 
     107           0 : Sequence< sal_Int8 > SAL_CALL Controller::getImplementationId() throw(RuntimeException)
     108             : {
     109             :     static ::cppu::OImplementationId * pId = 0;
     110           0 :     if ( !pId )
     111             :     {
     112           0 :         ::osl::MutexGuard aGuard( ::osl::Mutex::getGlobalMutex() );
     113           0 :         if ( !pId )
     114             :         {
     115           0 :             static ::cppu::OImplementationId aId;
     116           0 :             pId = &aId;
     117           0 :         }
     118             :     }
     119           0 :     return pId->getImplementationId();
     120             : }
     121             : 
     122             : // XPropertySet
     123             : //----------------------------------------------------------------------------
     124             : 
     125           0 : Reference< beans::XPropertySetInfo > SAL_CALL Controller::getPropertySetInfo() throw(RuntimeException)
     126             : {
     127           0 :     Reference< beans::XPropertySetInfo > xInfo( createPropertySetInfo( getInfoHelper() ) );
     128           0 :     return xInfo;
     129             : }
     130             : 
     131             : // OPropertySetHelper
     132             : //----------------------------------------------------------------------------
     133             : 
     134           0 : ::cppu::IPropertyArrayHelper& Controller::getInfoHelper()
     135             : {
     136           0 :     return *getArrayHelper();
     137             : }
     138             : 
     139             : // OPropertyArrayUsageHelper
     140             : //----------------------------------------------------------------------------
     141             : 
     142           0 : ::cppu::IPropertyArrayHelper* Controller::createArrayHelper( ) const
     143             : {
     144           0 :     Sequence< Property > aProps;
     145           0 :     describeProperties( aProps );
     146           0 :     return new ::cppu::OPropertyArrayHelper( aProps );
     147             : }
     148             : 
     149             : //----------------------------------------------------------------------------
     150             : 
     151           0 : } // namespace basctl
     152             : 
     153             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10