LCOV - code coverage report
Current view: top level - forms/source/component - FormsCollection.hxx (source / functions) Hit Total Coverage
Test: commit 10e77ab3ff6f4314137acd6e2702a6e5c1ce1fae Lines: 31 61 50.8 %
Date: 2014-11-03 Functions: 18 33 54.5 %
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             : #ifndef INCLUDED_FORMS_SOURCE_COMPONENT_FORMSCOLLECTION_HXX
      21             : #define INCLUDED_FORMS_SOURCE_COMPONENT_FORMSCOLLECTION_HXX
      22             : 
      23             : #include "InterfaceContainer.hxx"
      24             : #include <cppuhelper/component.hxx>
      25             : #include <cppuhelper/implbase2.hxx>
      26             : #include <comphelper/uno3.hxx>
      27             : #include <com/sun/star/lang/XServiceInfo.hpp>
      28             : #include <com/sun/star/form/XForms.hpp>
      29             : 
      30             : 
      31             : namespace frm
      32             : {
      33             : 
      34             : // OFormsCollection
      35             : // Implements the UNO Container for Forms and contains all assigend Forms.
      36             : // It can either represent the Context for Forms or be passed a Context.
      37             : 
      38             : typedef ::cppu::OComponentHelper FormsCollectionComponentBase;
      39             : typedef ::cppu::ImplHelper2<    ::com::sun::star::form::XForms
      40             :                                 ,::com::sun::star::lang::XServiceInfo > OFormsCollection_BASE;
      41             : 
      42             : // else MSVC kills itself on some statements
      43             : class OFormsCollection
      44             :         :public FormsCollectionComponentBase
      45             :         ,public OInterfaceContainer
      46             :         ,public OFormsCollection_BASE
      47             : {
      48             :     ::osl::Mutex                m_aMutex;
      49             :     ::comphelper::InterfaceRef  m_xParent; // Parent
      50             : 
      51             : public:
      52             :     OFormsCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory);
      53             :     OFormsCollection( const OFormsCollection& _cloneSource );
      54             :     virtual ~OFormsCollection();
      55             : 
      56             : public:
      57       82632 :     DECLARE_UNO3_AGG_DEFAULTS(OFormsCollection, FormsCollectionComponentBase)
      58             : 
      59             :     virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      60             : 
      61             :     // XTypeProvider
      62             :     virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      63             :     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      64             : 
      65             :     // XPersistObject
      66             :     virtual OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      67             : 
      68             :     // XServiceInfo
      69             :     virtual OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      70             :     virtual sal_Bool SAL_CALL supportsService( const OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      71             :     virtual StringSequence SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      72             : 
      73             :     // XCloneable
      74             :     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone(  ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      75             : 
      76             :     // OComponentHelper
      77             :     virtual void SAL_CALL disposing() SAL_OVERRIDE;
      78             : 
      79             :     // ::com::sun::star::container::XChild
      80             :     virtual ::comphelper::InterfaceRef SAL_CALL getParent() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      81             :     virtual void SAL_CALL setParent(const ::comphelper::InterfaceRef& Parent) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
      82             : 
      83             :     // prevent method hiding
      84             :     using OInterfaceContainer::disposing;
      85             : 
      86             :     // inheritance ambiguity
      87           0 :     virtual com::sun::star::uno::Type SAL_CALL getElementType() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      88           0 :         { return OInterfaceContainer::getElementType(); }
      89         838 :     virtual sal_Bool SAL_CALL hasElements() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      90         838 :         { return OInterfaceContainer::hasElements(); }
      91           6 :     virtual com::sun::star::uno::Any SAL_CALL getByName(const rtl::OUString& p1)
      92             :         throw (css::container::NoSuchElementException,
      93             :                css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      94           6 :         { return OInterfaceContainer::getByName(p1); }
      95           0 :     virtual com::sun::star::uno::Sequence<rtl::OUString> SAL_CALL getElementNames() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      96           0 :         { return OInterfaceContainer::getElementNames(); }
      97          52 :     virtual sal_Bool SAL_CALL hasByName(const rtl::OUString& p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
      98          52 :         { return OInterfaceContainer::hasByName(p1); }
      99           0 :     virtual void SAL_CALL replaceByName(const rtl::OUString& p1, const com::sun::star::uno::Any& p2)
     100             :         throw (css::lang::IllegalArgumentException,
     101             :                css::container::NoSuchElementException,
     102             :                css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     103           0 :         { OInterfaceContainer::replaceByName(p1, p2); }
     104         314 :     virtual void SAL_CALL insertByName(const rtl::OUString& p1, const com::sun::star::uno::Any& p2)
     105             :         throw (css::lang::IllegalArgumentException,
     106             :                css::container::ElementExistException,
     107             :                css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     108         314 :         { OInterfaceContainer::insertByName(p1, p2); }
     109           0 :     virtual void SAL_CALL removeByName(const rtl::OUString& p1)
     110             :         throw (css::container::NoSuchElementException,
     111             :                css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     112           0 :         { OInterfaceContainer::removeByName(p1); }
     113        4202 :     virtual sal_Int32 SAL_CALL getCount() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     114        4202 :         { return OInterfaceContainer::getCount(); }
     115        1250 :     virtual com::sun::star::uno::Any SAL_CALL getByIndex(sal_Int32 p1)
     116             :         throw (css::lang::IndexOutOfBoundsException,
     117             :                css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     118        1250 :         { return OInterfaceContainer::getByIndex(p1); }
     119           0 :     virtual void SAL_CALL replaceByIndex(sal_Int32 p1, const com::sun::star::uno::Any& p2)
     120             :         throw (css::lang::IllegalArgumentException,
     121             :                css::lang::IndexOutOfBoundsException,
     122             :                css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     123           0 :         { return OInterfaceContainer::replaceByIndex(p1, p2); }
     124           8 :     virtual void SAL_CALL insertByIndex(sal_Int32 p1, const com::sun::star::uno::Any& p2)
     125             :         throw (css::lang::IllegalArgumentException,
     126             :                css::lang::IndexOutOfBoundsException,
     127             :                css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     128           8 :         { return OInterfaceContainer::insertByIndex(p1, p2); }
     129           0 :     virtual void SAL_CALL removeByIndex(sal_Int32 p1)
     130             :         throw (css::lang::IndexOutOfBoundsException,
     131             :                css::lang::WrappedTargetException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     132           0 :         { return OInterfaceContainer::removeByIndex(p1); }
     133           0 :     virtual com::sun::star::uno::Reference<com::sun::star::container::XEnumeration> SAL_CALL createEnumeration() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     134           0 :         { return OInterfaceContainer::createEnumeration(); }
     135           0 :     virtual void SAL_CALL registerScriptEvent(sal_Int32 p1, const com::sun::star::script::ScriptEventDescriptor& p2)
     136             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     137           0 :         { OInterfaceContainer::registerScriptEvent(p1, p2); }
     138           0 :     virtual void SAL_CALL registerScriptEvents(sal_Int32 p1, const com::sun::star::uno::Sequence<com::sun::star::script::ScriptEventDescriptor>& p2)
     139             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     140           0 :         { OInterfaceContainer::registerScriptEvents(p1, p2); }
     141           0 :     virtual void SAL_CALL revokeScriptEvent(sal_Int32 p1, const rtl::OUString& p2, const rtl::OUString& p3, const rtl::OUString& p4)
     142             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     143           0 :         { OInterfaceContainer::revokeScriptEvent(p1, p2, p3, p4); }
     144           0 :     virtual void SAL_CALL revokeScriptEvents(sal_Int32 p1)
     145             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     146           0 :         { OInterfaceContainer::revokeScriptEvents(p1); }
     147           0 :     virtual void SAL_CALL insertEntry(sal_Int32 p1)
     148             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     149           0 :         { OInterfaceContainer::insertEntry(p1); }
     150           0 :     virtual void SAL_CALL removeEntry(sal_Int32 p1)
     151             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     152           0 :         { OInterfaceContainer::removeEntry(p1); }
     153           2 :     virtual com::sun::star::uno::Sequence<com::sun::star::script::ScriptEventDescriptor> SAL_CALL getScriptEvents(sal_Int32 p1)
     154             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     155           2 :         { return OInterfaceContainer::getScriptEvents(p1); }
     156         148 :     virtual void SAL_CALL attach(sal_Int32 p1, const com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& p2, const com::sun::star::uno::Any& p3)
     157             :         throw (css::lang::IllegalArgumentException,
     158             :                css::lang::ServiceNotRegisteredException,
     159             :                css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     160         148 :         { OInterfaceContainer::attach(p1, p2, p3); }
     161         148 :     virtual void SAL_CALL detach(sal_Int32 p1, const com::sun::star::uno::Reference<com::sun::star::uno::XInterface>& p2)
     162             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     163         148 :         { OInterfaceContainer::detach(p1, p2); }
     164        1212 :     virtual void SAL_CALL addScriptListener(const com::sun::star::uno::Reference<com::sun::star::script::XScriptListener>& p1)
     165             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     166        1212 :         { OInterfaceContainer::addScriptListener(p1); }
     167        1212 :     virtual void SAL_CALL removeScriptListener(const com::sun::star::uno::Reference<com::sun::star::script::XScriptListener>& p1)
     168             :         throw (css::lang::IllegalArgumentException, css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     169        1212 :         { OInterfaceContainer::removeScriptListener(p1); }
     170         608 :     virtual void SAL_CALL dispose() throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     171         608 :         { FormsCollectionComponentBase::dispose(); }
     172           0 :     virtual void SAL_CALL addEventListener(const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>& p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     173           0 :         { FormsCollectionComponentBase::addEventListener(p1); }
     174           0 :     virtual void SAL_CALL removeEventListener(const com::sun::star::uno::Reference<com::sun::star::lang::XEventListener>& p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     175           0 :         { FormsCollectionComponentBase::removeEventListener(p1); }
     176         908 :     virtual void SAL_CALL addContainerListener(const com::sun::star::uno::Reference<com::sun::star::container::XContainerListener>& p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     177         908 :         { OInterfaceContainer::addContainerListener(p1); }
     178         908 :     virtual void SAL_CALL removeContainerListener(const com::sun::star::uno::Reference<com::sun::star::container::XContainerListener>& p1) throw (css::uno::RuntimeException, std::exception) SAL_OVERRIDE
     179         908 :         { OInterfaceContainer::removeContainerListener(p1); }
     180             : };
     181             : 
     182             : 
     183             : }   // namespace frm
     184             : 
     185             : 
     186             : #endif // INCLUDED_FORMS_SOURCE_COMPONENT_FORMSCOLLECTION_HXX
     187             : 
     188             : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */

Generated by: LCOV version 1.10