LCOV - code coverage report
Current view: top level - toolkit/source/controls - roadmapentry.cxx (source / functions) Hit Total Coverage
Test: libreoffice_filtered.info Lines: 0 29 0.0 %
Date: 2012-08-25 Functions: 0 12 0.0 %
Legend: Lines: hit not hit | Branches: + taken - not taken # not executed Branches: 0 42 0.0 %

           Branch data     Line data    Source code
       1                 :            : /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
       2                 :            : /*************************************************************************
       3                 :            :  *
       4                 :            :  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
       5                 :            :  *
       6                 :            :  * Copyright 2000, 2010 Oracle and/or its affiliates.
       7                 :            :  *
       8                 :            :  * OpenOffice.org - a multi-platform office productivity suite
       9                 :            :  *
      10                 :            :  * This file is part of OpenOffice.org.
      11                 :            :  *
      12                 :            :  * OpenOffice.org is free software: you can redistribute it and/or modify
      13                 :            :  * it under the terms of the GNU Lesser General Public License version 3
      14                 :            :  * only, as published by the Free Software Foundation.
      15                 :            :  *
      16                 :            :  * OpenOffice.org is distributed in the hope that it will be useful,
      17                 :            :  * but WITHOUT ANY WARRANTY; without even the implied warranty of
      18                 :            :  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
      19                 :            :  * GNU Lesser General Public License version 3 for more details
      20                 :            :  * (a copy is included in the LICENSE file that accompanied this code).
      21                 :            :  *
      22                 :            :  * You should have received a copy of the GNU Lesser General Public License
      23                 :            :  * version 3 along with OpenOffice.org.  If not, see
      24                 :            :  * <http://www.openoffice.org/license.html>
      25                 :            :  * for a copy of the LGPLv3 License.
      26                 :            :  *
      27                 :            :  ************************************************************************/
      28                 :            : 
      29                 :            : #include <toolkit/controls/roadmapentry.hxx>
      30                 :            : 
      31                 :            : #include <rtl/ustring.hxx>
      32                 :            : 
      33                 :            : #include <com/sun/star/beans/PropertyAttribute.hpp>
      34                 :            : 
      35                 :            : 
      36                 :          0 : ORoadmapEntry::ORoadmapEntry() : ORoadmapEntry_Base( )
      37 [ #  # ][ #  # ]:          0 :                                 ,OPropertyContainer( GetBroadcastHelper() )
                 [ #  # ]
      38                 :            : {
      39                 :            :     // registerProperty or registerMayBeVoidProperty or registerPropertyNoMember
      40                 :            : 
      41                 :            :     registerProperty( ::rtl::OUString("Label"), RM_PROPERTY_ID_LABEL,
      42                 :            :                       ::com::sun::star::beans::PropertyAttribute::BOUND |
      43                 :            :                       ::com::sun::star::beans::PropertyAttribute::CONSTRAINED,
      44 [ #  # ][ #  # ]:          0 :                       & m_sLabel, ::getCppuType( &m_sLabel ) );
      45                 :          0 :     m_nID = -1;
      46                 :            :     registerProperty( ::rtl::OUString("ID"), RM_PROPERTY_ID_ID,
      47                 :            :                       ::com::sun::star::beans::PropertyAttribute::BOUND |
      48                 :            :                       ::com::sun::star::beans::PropertyAttribute::CONSTRAINED,
      49 [ #  # ][ #  # ]:          0 :                       & m_nID, ::getCppuType( &m_nID ) );
      50                 :          0 :     m_bEnabled = sal_True;
      51                 :            :     registerProperty( ::rtl::OUString("Enabled"), RM_PROPERTY_ID_ENABLED,
      52                 :            :                     ::com::sun::star::beans::PropertyAttribute::BOUND |
      53                 :            :                     ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT,
      54 [ #  # ][ #  # ]:          0 :                     & m_bEnabled, ::getCppuType( &m_bEnabled ) );
      55                 :            : 
      56                 :            :     registerProperty( ::rtl::OUString("Interactive"), RM_PROPERTY_ID_INTERACTIVE,
      57                 :            :                     ::com::sun::star::beans::PropertyAttribute::BOUND |
      58                 :            :                     ::com::sun::star::beans::PropertyAttribute::MAYBEDEFAULT,
      59 [ #  # ][ #  # ]:          0 :                     & m_bInteractive, ::getCppuType( &m_bInteractive ) );
      60                 :            : 
      61                 :            : 
      62                 :            :     // ...
      63                 :            : 
      64                 :            :     // Note that the list of registered properties has to be fixed: Different
      65                 :            :     // instances of this class have to register the same set of properties with
      66                 :            :     // the same attributes.
      67                 :            :     //
      68                 :            :     // This is because all instances of the class share the same PropertySetInfo
      69                 :            :     // which has been built from the registered property of _one_ instance.
      70                 :          0 : }
      71                 :            : 
      72                 :            : //--------------------------------------------------------------------------
      73 [ #  # ][ #  # ]:          0 : IMPLEMENT_FORWARD_XINTERFACE2( ORoadmapEntry, ORoadmapEntry_Base, ::comphelper::OPropertyContainer );
      74 [ #  # ][ #  # ]:          0 : IMPLEMENT_FORWARD_XTYPEPROVIDER2( ORoadmapEntry, ORoadmapEntry_Base, ::comphelper::OPropertyContainer );
                 [ #  # ]
      75                 :            :     // order matters:
      76                 :            :     //  the first is the class name
      77                 :            :     //  the second is the class which implements the ref-counting
      78                 :            :     //  the third up to n-th (when using IMPLEMENT_FORWARD_*3 and so on) are other base classes
      79                 :            :     //  whose XInterface and XTypeProvider implementations should be merged
      80                 :            : 
      81                 :            : //--------------------------------------------------------------------------
      82                 :            : ::com::sun::star::uno::Reference< ::com::sun::star:: beans::XPropertySetInfo > SAL_CALL
      83                 :          0 :     ORoadmapEntry::getPropertySetInfo()
      84                 :            :     throw(::com::sun::star::uno::RuntimeException)
      85                 :            : {
      86                 :            :     return ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySetInfo >(
      87                 :          0 :         createPropertySetInfo( getInfoHelper() ) );
      88                 :            : }
      89                 :            : 
      90                 :          0 : ::rtl::OUString SAL_CALL ORoadmapEntry::getImplementationName(  ) throw (::com::sun::star::uno::RuntimeException)
      91                 :            : {
      92                 :          0 :     ::rtl::OUString aStr("com.sun.star.comp.toolkit.RoadmapItem");
      93                 :          0 :     return aStr;
      94                 :            : }
      95                 :            : 
      96                 :          0 : sal_Bool SAL_CALL ORoadmapEntry::supportsService( const ::rtl::OUString& ServiceName ) throw (::com::sun::star::uno::RuntimeException)
      97                 :            : {
      98                 :          0 :     return ServiceName == "com.sun.star.awt.RoadmapItem";
      99                 :            : }
     100                 :            : 
     101                 :          0 : ::com::sun::star::uno::Sequence< ::rtl::OUString > SAL_CALL ORoadmapEntry::getSupportedServiceNames(  ) throw (::com::sun::star::uno::RuntimeException)
     102                 :            : {
     103                 :          0 :     ::com::sun::star::uno::Sequence< ::rtl::OUString > aRet(1);
     104         [ #  # ]:          0 :     ::rtl::OUString* pArray = aRet.getArray();
     105                 :          0 :     pArray[0] = ::rtl::OUString("com.sun.star.awt.RoadmapItem");
     106                 :          0 :     return aRet;
     107                 :            : }
     108                 :            : //--------------------------------------------------------------------------
     109                 :          0 : ::cppu::IPropertyArrayHelper& ORoadmapEntry::getInfoHelper()
     110                 :            : {
     111                 :          0 :     return *getArrayHelper();
     112                 :            : }
     113                 :            : 
     114                 :            : //--------------------------------------------------------------------------
     115                 :          0 : ::cppu::IPropertyArrayHelper* ORoadmapEntry::createArrayHelper() const
     116                 :            : {
     117         [ #  # ]:          0 :     ::com::sun::star::uno::Sequence< ::com::sun::star::beans::Property > aProps;
     118                 :            :     // describes all properties which have been registered in the ctor
     119         [ #  # ]:          0 :     describeProperties( aProps );
     120                 :            : 
     121 [ #  # ][ #  # ]:          0 :     return new ::cppu::OPropertyArrayHelper( aProps );
     122                 :            : }
     123                 :            : 
     124                 :            : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10