1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
22 #include <InterfaceContainer.hxx>
23 #include <cppuhelper/component.hxx>
24 #include <cppuhelper/implbase2.hxx>
25 #include <comphelper/uno3.hxx>
26 #include <com/sun/star/lang/XServiceInfo.hpp>
27 #include <com/sun/star/form/XForms.hpp>
34 // Implements the UNO Container for Forms and contains all assigned Forms.
35 // It can either represent the Context for Forms or be passed a Context.
37 typedef ::cppu::ImplHelper2
< css::form::XForms
38 ,css::lang::XServiceInfo
> OFormsCollection_BASE
;
39 class OFormsCollection
40 :public ::cppu::OComponentHelper
41 ,public OInterfaceContainer
42 ,public OFormsCollection_BASE
44 ::osl::Mutex m_aMutex
;
45 css::uno::Reference
<css::uno::XInterface
> m_xParent
; // Parent
48 explicit OFormsCollection(const css::uno::Reference
< css::uno::XComponentContext
>& _rxFactory
);
49 OFormsCollection( const OFormsCollection
& _cloneSource
);
50 virtual ~OFormsCollection() override
;
53 DECLARE_UNO3_AGG_DEFAULTS(OFormsCollection
, ::cppu::OComponentHelper
)
55 virtual css::uno::Any SAL_CALL
queryAggregation(const css::uno::Type
& _rType
) override
;
58 virtual css::uno::Sequence
< css::uno::Type
> SAL_CALL
getTypes( ) override
;
59 virtual css::uno::Sequence
< sal_Int8
> SAL_CALL
getImplementationId( ) override
;
62 virtual OUString SAL_CALL
getServiceName() override
;
65 virtual OUString SAL_CALL
getImplementationName( ) override
;
66 virtual sal_Bool SAL_CALL
supportsService( const OUString
& ServiceName
) override
;
67 virtual css::uno::Sequence
<OUString
> SAL_CALL
getSupportedServiceNames( ) override
;
70 virtual css::uno::Reference
< css::util::XCloneable
> SAL_CALL
createClone( ) override
;
73 virtual void SAL_CALL
disposing() override
;
75 // css::container::XChild
76 virtual css::uno::Reference
<css::uno::XInterface
> SAL_CALL
getParent() override
;
77 virtual void SAL_CALL
setParent(const css::uno::Reference
<css::uno::XInterface
>& Parent
) override
;
79 // prevent method hiding
80 using OInterfaceContainer::disposing
;
82 // inheritance ambiguity
83 virtual css::uno::Type SAL_CALL
getElementType() override
84 { return OInterfaceContainer::getElementType(); }
85 virtual sal_Bool SAL_CALL
hasElements() override
86 { return OInterfaceContainer::hasElements(); }
87 virtual css::uno::Any SAL_CALL
getByName(const OUString
& p1
) override
88 { return OInterfaceContainer::getByName(p1
); }
89 virtual css::uno::Sequence
<OUString
> SAL_CALL
getElementNames() override
90 { return OInterfaceContainer::getElementNames(); }
91 virtual sal_Bool SAL_CALL
hasByName(const OUString
& p1
) override
92 { return OInterfaceContainer::hasByName(p1
); }
93 virtual void SAL_CALL
replaceByName(const OUString
& p1
, const css::uno::Any
& p2
) override
94 { OInterfaceContainer::replaceByName(p1
, p2
); }
95 virtual void SAL_CALL
insertByName(const OUString
& p1
, const css::uno::Any
& p2
) override
96 { OInterfaceContainer::insertByName(p1
, p2
); }
97 virtual void SAL_CALL
removeByName(const OUString
& p1
) override
98 { OInterfaceContainer::removeByName(p1
); }
99 virtual sal_Int32 SAL_CALL
getCount() override
100 { return OInterfaceContainer::getCount(); }
101 virtual css::uno::Any SAL_CALL
getByIndex(sal_Int32 p1
) override
102 { return OInterfaceContainer::getByIndex(p1
); }
103 virtual void SAL_CALL
replaceByIndex(sal_Int32 p1
, const css::uno::Any
& p2
) override
104 { return OInterfaceContainer::replaceByIndex(p1
, p2
); }
105 virtual void SAL_CALL
insertByIndex(sal_Int32 p1
, const css::uno::Any
& p2
) override
106 { return OInterfaceContainer::insertByIndex(p1
, p2
); }
107 virtual void SAL_CALL
removeByIndex(sal_Int32 p1
) override
108 { return OInterfaceContainer::removeByIndex(p1
); }
109 virtual css::uno::Reference
<css::container::XEnumeration
> SAL_CALL
createEnumeration() override
110 { return OInterfaceContainer::createEnumeration(); }
111 virtual void SAL_CALL
registerScriptEvent(sal_Int32 p1
, const css::script::ScriptEventDescriptor
& p2
) override
112 { OInterfaceContainer::registerScriptEvent(p1
, p2
); }
113 virtual void SAL_CALL
registerScriptEvents(sal_Int32 p1
, const css::uno::Sequence
<css::script::ScriptEventDescriptor
>& p2
) override
114 { OInterfaceContainer::registerScriptEvents(p1
, p2
); }
115 virtual void SAL_CALL
revokeScriptEvent(sal_Int32 p1
, const OUString
& p2
, const OUString
& p3
, const OUString
& p4
) override
116 { OInterfaceContainer::revokeScriptEvent(p1
, p2
, p3
, p4
); }
117 virtual void SAL_CALL
revokeScriptEvents(sal_Int32 p1
) override
118 { OInterfaceContainer::revokeScriptEvents(p1
); }
119 virtual void SAL_CALL
insertEntry(sal_Int32 p1
) override
120 { OInterfaceContainer::insertEntry(p1
); }
121 virtual void SAL_CALL
removeEntry(sal_Int32 p1
) override
122 { OInterfaceContainer::removeEntry(p1
); }
123 virtual css::uno::Sequence
<css::script::ScriptEventDescriptor
> SAL_CALL
getScriptEvents(sal_Int32 p1
) override
124 { return OInterfaceContainer::getScriptEvents(p1
); }
125 virtual void SAL_CALL
attach(sal_Int32 p1
, const css::uno::Reference
<css::uno::XInterface
>& p2
, const css::uno::Any
& p3
) override
126 { OInterfaceContainer::attach(p1
, p2
, p3
); }
127 virtual void SAL_CALL
detach(sal_Int32 p1
, const css::uno::Reference
<css::uno::XInterface
>& p2
) override
128 { OInterfaceContainer::detach(p1
, p2
); }
129 virtual void SAL_CALL
addScriptListener(const css::uno::Reference
<css::script::XScriptListener
>& p1
) override
130 { OInterfaceContainer::addScriptListener(p1
); }
131 virtual void SAL_CALL
removeScriptListener(const css::uno::Reference
<css::script::XScriptListener
>& p1
) override
132 { OInterfaceContainer::removeScriptListener(p1
); }
133 virtual void SAL_CALL
dispose() override
134 { ::cppu::OComponentHelper::dispose(); }
135 virtual void SAL_CALL
addEventListener(const css::uno::Reference
<css::lang::XEventListener
>& p1
) override
136 { ::cppu::OComponentHelper::addEventListener(p1
); }
137 virtual void SAL_CALL
removeEventListener(const css::uno::Reference
<css::lang::XEventListener
>& p1
) override
138 { ::cppu::OComponentHelper::removeEventListener(p1
); }
139 virtual void SAL_CALL
addContainerListener(const css::uno::Reference
<css::container::XContainerListener
>& p1
) override
140 { OInterfaceContainer::addContainerListener(p1
); }
141 virtual void SAL_CALL
removeContainerListener(const css::uno::Reference
<css::container::XContainerListener
>& p1
) override
142 { OInterfaceContainer::removeContainerListener(p1
); }
149 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */