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

Generated by: LCOV version 1.10