Update ooo320-m1
[ooovba.git] / forms / source / component / FormsCollection.hxx
blob0170dea0146a26777f739e6022c5e2147353727d
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: FormsCollection.hxx,v $
10 * $Revision: 1.7 $
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 ************************************************************************/
31 #include "InterfaceContainer.hxx"
32 #include "ids.hxx"
33 #include <cppuhelper/component.hxx>
34 #include <cppuhelper/implbase2.hxx>
35 #include <comphelper/uno3.hxx>
36 #include <com/sun/star/lang/XServiceInfo.hpp>
38 //.........................................................................
39 namespace frm
41 //.........................................................................
43 //==================================================================
44 // OFormsCollection
45 // Implementiert den UNO-Container fuer Formulare
46 // enthaelt alle zugeordneten Forms
47 // dieses Container kann selbst den Context fuer Formulare darstellen
48 // oder aussen einen Context uebergeben bekommen
49 //==================================================================
50 typedef ::cppu::OComponentHelper FormsCollectionComponentBase;
51 typedef ::cppu::ImplHelper2< ::com::sun::star::container::XChild
52 ,::com::sun::star::lang::XServiceInfo > OFormsCollection_BASE;
54 // else MSVC kills itself on some statements
55 class OFormsCollection
56 :public FormsCollectionComponentBase
57 ,public OInterfaceContainer
58 ,public OFormsCollection_BASE
60 ::osl::Mutex m_aMutex;
61 OImplementationIdsRef m_aHoldIdHelper;
62 ::comphelper::InterfaceRef m_xParent; // Parent
64 public:
65 OFormsCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
66 OFormsCollection( const OFormsCollection& _cloneSource );
67 virtual ~OFormsCollection();
69 public:
70 DECLARE_UNO3_AGG_DEFAULTS(OFormsCollection, FormsCollectionComponentBase);
72 virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException);
74 // XTypeProvider
75 virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
76 virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
78 // XPersistObject
79 virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
81 // XServiceInfo
82 virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
83 virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
84 virtual StringSequence SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
86 // XCloneable
87 virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
89 // OComponentHelper
90 virtual void SAL_CALL disposing();
92 // ::com::sun::star::container::XChild
93 virtual ::comphelper::InterfaceRef SAL_CALL getParent() throw(::com::sun::star::uno::RuntimeException);
94 virtual void SAL_CALL setParent(const ::comphelper::InterfaceRef& Parent) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
96 // prevent method hiding
97 using OInterfaceContainer::disposing;
100 //.........................................................................
101 } // namespace frm
102 //.........................................................................