1 /**************************************************************
2  *
3  * Licensed to the Apache Software Foundation (ASF) under one
4  * or more contributor license agreements.  See the NOTICE file
5  * distributed with this work for additional information
6  * regarding copyright ownership.  The ASF licenses this file
7  * to you under the Apache License, Version 2.0 (the
8  * "License"); you may not use this file except in compliance
9  * with the License.  You may obtain a copy of the License at
10  *
11  *   http://www.apache.org/licenses/LICENSE-2.0
12  *
13  * Unless required by applicable law or agreed to in writing,
14  * software distributed under the License is distributed on an
15  * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16  * KIND, either express or implied.  See the License for the
17  * specific language governing permissions and limitations
18  * under the License.
19  *
20  *************************************************************/
21 
22 
23 
24 #include "InterfaceContainer.hxx"
25 #include "ids.hxx"
26 #include <cppuhelper/component.hxx>
27 #include <cppuhelper/implbase2.hxx>
28 #include <comphelper/uno3.hxx>
29 #include <com/sun/star/lang/XServiceInfo.hpp>
30 
31 //.........................................................................
32 namespace frm
33 {
34 //.........................................................................
35 
36 //==================================================================
37 // OFormsCollection
38 // Implementiert den UNO-Container fuer Formulare
39 // enthaelt alle zugeordneten Forms
40 // dieses Container kann selbst den Context fuer Formulare darstellen
41 // oder aussen einen Context uebergeben bekommen
42 //==================================================================
43 typedef ::cppu::OComponentHelper FormsCollectionComponentBase;
44 typedef ::cppu::ImplHelper2<	::com::sun::star::container::XChild
45 								,::com::sun::star::lang::XServiceInfo > OFormsCollection_BASE;
46 
47 	// else MSVC kills itself on some statements
48 class OFormsCollection
49 		:public FormsCollectionComponentBase
50 		,public OInterfaceContainer
51 		,public OFormsCollection_BASE
52 {
53 	::osl::Mutex				m_aMutex;
54 	OImplementationIdsRef		m_aHoldIdHelper;
55 	::comphelper::InterfaceRef 	m_xParent;			// Parent
56 
57 public:
58 	OFormsCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
59     OFormsCollection( const OFormsCollection& _cloneSource );
60 	virtual ~OFormsCollection();
61 
62 public:
63 	DECLARE_UNO3_AGG_DEFAULTS(OFormsCollection, FormsCollectionComponentBase);
64 
65 	virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException);
66 
67     // XTypeProvider
68 	virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes(  ) throw(::com::sun::star::uno::RuntimeException);
69     virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId(  ) throw(::com::sun::star::uno::RuntimeException);
70 
71     // XPersistObject
72 	virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
73 
74     // XServiceInfo
75     virtual ::rtl::OUString SAL_CALL getImplementationName(  ) throw(::com::sun::star::uno::RuntimeException);
76     virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
77     virtual StringSequence SAL_CALL getSupportedServiceNames(  ) throw(::com::sun::star::uno::RuntimeException);
78 
79     // XCloneable
80     virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone(  ) throw (::com::sun::star::uno::RuntimeException);
81 
82     // OComponentHelper
83 	virtual void SAL_CALL disposing();
84 
85     // ::com::sun::star::container::XChild
86 	virtual ::comphelper::InterfaceRef SAL_CALL getParent() throw(::com::sun::star::uno::RuntimeException);
87 	virtual void SAL_CALL setParent(const ::comphelper::InterfaceRef& Parent) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
88 
89     // prevent method hiding
90     using OInterfaceContainer::disposing;
91 };
92 
93 //.........................................................................
94 }	// namespace frm
95 //.........................................................................
96 
97