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 "ids.hxx"
22 : #include <cppuhelper/component.hxx>
23 : #include <cppuhelper/implbase2.hxx>
24 : #include <comphelper/uno3.hxx>
25 : #include <com/sun/star/lang/XServiceInfo.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::container::XChild
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 : OImplementationIdsRef m_aHoldIdHelper;
51 : ::comphelper::InterfaceRef m_xParent; // Parent
52 :
53 : public:
54 : OFormsCollection(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory);
55 : OFormsCollection( const OFormsCollection& _cloneSource );
56 : virtual ~OFormsCollection();
57 :
58 : public:
59 1425 : DECLARE_UNO3_AGG_DEFAULTS(OFormsCollection, FormsCollectionComponentBase);
60 :
61 : virtual ::com::sun::star::uno::Any SAL_CALL queryAggregation(const ::com::sun::star::uno::Type& _rType) throw(::com::sun::star::uno::RuntimeException);
62 :
63 : // XTypeProvider
64 : virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes( ) throw(::com::sun::star::uno::RuntimeException);
65 : virtual ::com::sun::star::uno::Sequence< sal_Int8 > SAL_CALL getImplementationId( ) throw(::com::sun::star::uno::RuntimeException);
66 :
67 : // XPersistObject
68 : virtual ::rtl::OUString SAL_CALL getServiceName() throw(::com::sun::star::uno::RuntimeException);
69 :
70 : // XServiceInfo
71 : virtual ::rtl::OUString SAL_CALL getImplementationName( ) throw(::com::sun::star::uno::RuntimeException);
72 : virtual sal_Bool SAL_CALL supportsService( const ::rtl::OUString& ServiceName ) throw(::com::sun::star::uno::RuntimeException);
73 : virtual StringSequence SAL_CALL getSupportedServiceNames( ) throw(::com::sun::star::uno::RuntimeException);
74 :
75 : // XCloneable
76 : virtual ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloneable > SAL_CALL createClone( ) throw (::com::sun::star::uno::RuntimeException);
77 :
78 : // OComponentHelper
79 : virtual void SAL_CALL disposing();
80 :
81 : // ::com::sun::star::container::XChild
82 : virtual ::comphelper::InterfaceRef SAL_CALL getParent() throw(::com::sun::star::uno::RuntimeException);
83 : virtual void SAL_CALL setParent(const ::comphelper::InterfaceRef& Parent) throw(::com::sun::star::lang::NoSupportException, ::com::sun::star::uno::RuntimeException);
84 :
85 : // prevent method hiding
86 : using OInterfaceContainer::disposing;
87 : };
88 :
89 : //.........................................................................
90 : } // namespace frm
91 : //.........................................................................
92 :
93 : /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|