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 : #ifndef INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_GROUPS_HXX
20 : #define INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_GROUPS_HXX
21 :
22 : #include <com/sun/star/report/XGroups.hpp>
23 : #include <cppuhelper/compbase1.hxx>
24 : #include <comphelper/broadcasthelper.hxx>
25 : #include <com/sun/star/uno/XComponentContext.hpp>
26 : #include <list>
27 :
28 :
29 : namespace reportdesign
30 : {
31 : typedef ::cppu::WeakComponentImplHelper1< com::sun::star::report::XGroups> GroupsBase;
32 : /** \class OGroups Defines the implementation of a \interface com:::sun::star::report::XGroups
33 : * \ingroup reportdesign_api
34 : *
35 : */
36 : class OGroups : public comphelper::OBaseMutex,
37 : public GroupsBase
38 : {
39 : typedef ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup > > TGroups;
40 : ::cppu::OInterfaceContainerHelper m_aContainerListeners;
41 : ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
42 : ::com::sun::star::uno::WeakReference< ::com::sun::star::report::XReportDefinition > m_xParent;
43 : TGroups m_aGroups;
44 : private:
45 : OGroups& operator=(const OGroups&) SAL_DELETED_FUNCTION;
46 : OGroups(const OGroups&) SAL_DELETED_FUNCTION;
47 : void checkIndex(sal_Int32 _nIndex);
48 : protected:
49 : // TODO: VirtualFunctionFinder: This is virtual function!
50 :
51 : virtual ~OGroups();
52 :
53 : /** this function is called upon disposing the component
54 : */
55 : // TODO: VirtualFunctionFinder: This is virtual function!
56 :
57 : virtual void SAL_CALL disposing() SAL_OVERRIDE;
58 : public:
59 : OGroups( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xParent
60 : ,const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& context);
61 :
62 : // XGroups
63 : // Attributes
64 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition > SAL_CALL getReportDefinition() throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
65 : // Methods
66 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup > SAL_CALL createGroup( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
67 : // XIndexContainer
68 : virtual void SAL_CALL insertByIndex( ::sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
69 : virtual void SAL_CALL removeByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
70 : // XIndexReplace
71 : virtual void SAL_CALL replaceByIndex( ::sal_Int32 Index, const ::com::sun::star::uno::Any& Element ) throw (::com::sun::star::lang::IllegalArgumentException, ::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
72 : // XIndexAccess
73 : virtual ::sal_Int32 SAL_CALL getCount( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
74 : virtual ::com::sun::star::uno::Any SAL_CALL getByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
75 : // XElementAccess
76 : virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
77 : virtual sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
78 : // XChild
79 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
80 : virtual void SAL_CALL setParent( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& Parent ) throw (::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
81 : // XContainer
82 : virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
83 : virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
84 :
85 : // XComponent
86 : virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE;
87 0 : virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
88 : {
89 0 : cppu::WeakComponentImplHelperBase::addEventListener(aListener);
90 0 : }
91 0 : virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException, std::exception) SAL_OVERRIDE
92 : {
93 0 : cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
94 0 : }
95 : };
96 : }
97 : #endif // INCLUDED_REPORTDESIGN_SOURCE_CORE_INC_GROUPS_HXX
98 :
99 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|