update dev300-m58
[ooovba.git] / reportdesign / source / core / inc / Groups.hxx
blobc9be4e3ca3d6cf9d746bb9b6dd47b1c7f886bbf0
1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: Groups.hxx,v $
10 * $Revision: 1.4 $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
30 #ifndef REPORTDESIGN_API_GROUPS_HXX
31 #define REPORTDESIGN_API_GROUPS_HXX
33 #include <com/sun/star/report/XGroups.hpp>
34 #include <cppuhelper/compbase1.hxx>
35 #include <comphelper/broadcasthelper.hxx>
36 #include <com/sun/star/uno/XComponentContext.hpp>
37 #include <list>
40 namespace reportdesign
42 typedef ::cppu::WeakComponentImplHelper1< com::sun::star::report::XGroups> GroupsBase;
43 /** \class OGroups Defines the implementation of a \interface com:::sun::star::report::XGroups
44 * \ingroup reportdesign_api
47 class OGroups : public comphelper::OBaseMutex,
48 public GroupsBase
50 typedef ::std::list< ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup > > TGroups;
51 ::cppu::OInterfaceContainerHelper m_aContainerListeners;
52 ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext;
53 ::com::sun::star::uno::WeakReference< ::com::sun::star::report::XReportDefinition > m_xParent;
54 TGroups m_aGroups;
55 private:
56 OGroups& operator=(const OGroups&);
57 OGroups(const OGroups&);
58 void checkIndex(sal_Int32 _nIndex);
59 protected:
60 // TODO: VirtualFunctionFinder: This is virtual function!
61 //
62 virtual ~OGroups();
64 /** this function is called upon disposing the component
66 // TODO: VirtualFunctionFinder: This is virtual function!
67 //
68 virtual void SAL_CALL disposing();
69 public:
70 OGroups( const ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition >& _xParent
71 ,const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& context);
73 void copyGroups(const ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroups >& _xSource);
75 // XGroups
76 // Attributes
77 virtual ::com::sun::star::uno::Reference< ::com::sun::star::report::XReportDefinition > SAL_CALL getReportDefinition() throw (::com::sun::star::uno::RuntimeException);
78 // Methods
79 virtual ::com::sun::star::uno::Reference< ::com::sun::star::report::XGroup > SAL_CALL createGroup( ) throw (::com::sun::star::uno::RuntimeException);
80 // XIndexContainer
81 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);
82 virtual void SAL_CALL removeByIndex( ::sal_Int32 Index ) throw (::com::sun::star::lang::IndexOutOfBoundsException, ::com::sun::star::lang::WrappedTargetException, ::com::sun::star::uno::RuntimeException);
83 // XIndexReplace
84 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);
85 // XIndexAccess
86 virtual ::sal_Int32 SAL_CALL getCount( ) throw (::com::sun::star::uno::RuntimeException);
87 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);
88 // XElementAccess
89 virtual ::com::sun::star::uno::Type SAL_CALL getElementType( ) throw (::com::sun::star::uno::RuntimeException);
90 virtual ::sal_Bool SAL_CALL hasElements( ) throw (::com::sun::star::uno::RuntimeException);
91 // XChild
92 virtual ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL getParent( ) throw (::com::sun::star::uno::RuntimeException);
93 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);
94 // XContainer
95 virtual void SAL_CALL addContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
96 virtual void SAL_CALL removeContainerListener( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XContainerListener >& xListener ) throw (::com::sun::star::uno::RuntimeException);
98 // XComponent
99 virtual void SAL_CALL dispose() throw(::com::sun::star::uno::RuntimeException);
100 virtual void SAL_CALL addEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException)
102 cppu::WeakComponentImplHelperBase::addEventListener(aListener);
104 virtual void SAL_CALL removeEventListener(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XEventListener > & aListener) throw(::com::sun::star::uno::RuntimeException)
106 cppu::WeakComponentImplHelperBase::removeEventListener(aListener);
110 #endif // REPORTDESIGN_API_GROUPS_HXX