merge the formfield patch from ooo-build
[ooovba.git] / configmgr / source / api2 / groupobjects.cxx
blobbe1b7bd380fbf513db707a7c28a106b9f9ed698e
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: groupobjects.cxx,v $
10 * $Revision: 1.5 $
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 // MARKER(update_precomp.py): autogen include statement, do not remove
32 #include "precompiled_configmgr.hxx"
33 #include <stdio.h>
34 #include "groupobjects.hxx"
35 #include "comphelper/sequence.hxx"
37 //........................................................................
38 namespace configmgr
41 //==========================================================================
42 //= OInnerGroupInfo
43 //==========================================================================
45 // XInterface refcounting
46 void SAL_CALL OInnerGroupInfo::acquire( ) throw ()
48 BasicInnerElement::acquire();
51 void SAL_CALL OInnerGroupInfo::release( ) throw ()
53 BasicInnerElement::release();
56 // XInterface joining
57 uno::Any SAL_CALL OInnerGroupInfo::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
59 uno::Any aRet = BasicInnerElement::queryInterface(rType);
61 if (!aRet.hasValue())
62 aRet = BasicGroupAccess::queryInterface(rType);
64 if (!aRet.hasValue())
65 aRet = BasicPropertySet::queryInterface(rType);
67 return aRet;
70 // XTypeProvider joining
71 uno::Sequence< uno::Type > SAL_CALL OInnerGroupInfo::getTypes( ) throw (uno::RuntimeException )
73 return comphelper::concatSequences(BasicInnerElement::getTypes(), BasicGroupAccess::getTypes(), BasicPropertySet::getTypes());
76 uno::Sequence< sal_Int8 > SAL_CALL OInnerGroupInfo::getImplementationId( ) throw (uno::RuntimeException )
78 return BasicInnerElement::getImplementationId();
82 configapi::NodeAccess& OInnerGroupInfo::getNodeAccess()
84 return m_aAccessElement;
87 configapi::NodeGroupInfoAccess& OInnerGroupInfo::getNode()
89 return m_aAccessElement;
92 configapi::NodeGroupAccess* OInnerGroupInfo::maybeGetUpdateAccess()
94 return 0;
97 configapi::InnerElement& OInnerGroupInfo::getElementClass()
99 return m_aAccessElement;
102 //==========================================================================
103 //= OInnerGroupUpdate
104 //==========================================================================
106 // XInterface refcounting
107 void SAL_CALL OInnerGroupUpdate::acquire( ) throw ()
109 BasicInnerElement::acquire();
112 void SAL_CALL OInnerGroupUpdate::release( ) throw ()
114 BasicInnerElement::release();
117 // XInterface joining
118 uno::Any SAL_CALL OInnerGroupUpdate::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
120 uno::Any aRet = BasicInnerElement::queryInterface(rType);
122 if (!aRet.hasValue())
123 aRet = BasicGroup::queryInterface(rType);
125 if (!aRet.hasValue())
126 aRet = BasicPropertySet::queryInterface(rType);
128 return aRet;
131 // XTypeProvider joining
132 uno::Sequence< uno::Type > SAL_CALL OInnerGroupUpdate::getTypes( ) throw (uno::RuntimeException )
134 return comphelper::concatSequences(BasicInnerElement::getTypes(), BasicGroup::getTypes(), BasicPropertySet::getTypes());
137 uno::Sequence< sal_Int8 > SAL_CALL OInnerGroupUpdate::getImplementationId( ) throw (uno::RuntimeException )
139 return BasicInnerElement::getImplementationId();
143 configapi::NodeAccess& OInnerGroupUpdate::getNodeAccess()
145 return m_aAccessElement;
148 configapi::NodeGroupInfoAccess& OInnerGroupUpdate::getNode()
150 return m_aAccessElement;
153 configapi::NodeGroupAccess* OInnerGroupUpdate::maybeGetUpdateAccess()
155 return &m_aAccessElement;
158 configapi::InnerElement& OInnerGroupUpdate::getElementClass()
160 return m_aAccessElement;
163 //==========================================================================
164 //= OSetElementGroupInfo
165 //==========================================================================
167 // XInterface refcounting
168 void SAL_CALL OSetElementGroupInfo::acquire( ) throw ()
170 BasicSetElement::acquire();
173 void SAL_CALL OSetElementGroupInfo::release( ) throw ()
175 BasicSetElement::release();
178 // XInterface joining
179 uno::Any SAL_CALL OSetElementGroupInfo::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
181 uno::Any aRet = BasicSetElement::queryInterface(rType);
183 if (!aRet.hasValue())
184 aRet = BasicGroupAccess::queryInterface(rType);
186 if (!aRet.hasValue())
187 aRet = BasicPropertySet::queryInterface(rType);
189 return aRet;
192 // XTypeProvider joining
193 uno::Sequence< uno::Type > SAL_CALL OSetElementGroupInfo::getTypes( ) throw (uno::RuntimeException )
195 return comphelper::concatSequences(BasicSetElement::getTypes(), BasicGroupAccess::getTypes(), BasicPropertySet::getTypes() );
198 uno::Sequence< sal_Int8 > SAL_CALL OSetElementGroupInfo::getImplementationId( ) throw (uno::RuntimeException )
200 return BasicSetElement::getImplementationId();
204 configapi::NodeAccess& OSetElementGroupInfo::getNodeAccess()
206 return m_aAccessElement;
209 configapi::NodeGroupInfoAccess& OSetElementGroupInfo::getNode()
211 return m_aAccessElement;
214 configapi::NodeGroupAccess* OSetElementGroupInfo::maybeGetUpdateAccess()
216 return 0;
219 configapi::SetElement& OSetElementGroupInfo::getElementClass()
221 return m_aAccessElement;
224 //==========================================================================
225 //= OSetElementGroupUpdate
226 //==========================================================================
228 // XInterface refcounting
229 void SAL_CALL OSetElementGroupUpdate::acquire( ) throw ()
231 BasicSetElement::acquire();
234 void SAL_CALL OSetElementGroupUpdate::release( ) throw ()
236 BasicSetElement::release();
239 // XInterface joining
240 uno::Any SAL_CALL OSetElementGroupUpdate::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
242 uno::Any aRet = BasicSetElement::queryInterface(rType);
244 if (!aRet.hasValue())
245 aRet = BasicGroup::queryInterface(rType);
247 if (!aRet.hasValue())
248 aRet = BasicPropertySet::queryInterface(rType);
250 return aRet;
253 // XTypeProvider joining
254 uno::Sequence< uno::Type > SAL_CALL OSetElementGroupUpdate::getTypes( ) throw (uno::RuntimeException )
256 return comphelper::concatSequences(BasicSetElement::getTypes(), BasicGroup::getTypes(), BasicPropertySet::getTypes());
259 uno::Sequence< sal_Int8 > SAL_CALL OSetElementGroupUpdate::getImplementationId( ) throw (uno::RuntimeException )
261 return BasicSetElement::getImplementationId();
265 configapi::NodeAccess& OSetElementGroupUpdate::getNodeAccess()
267 return m_aAccessElement;
270 configapi::NodeGroupInfoAccess& OSetElementGroupUpdate::getNode()
272 return m_aAccessElement;
275 configapi::NodeGroupAccess* OSetElementGroupUpdate::maybeGetUpdateAccess()
277 return &m_aAccessElement;
280 configapi::SetElement& OSetElementGroupUpdate::getElementClass()
282 return m_aAccessElement;
285 //==========================================================================
286 //= ORootElementGroupInfo
287 //==========================================================================
289 // XInterface refcounting
290 void SAL_CALL ORootElementGroupInfo::acquire( ) throw ()
292 BasicRootElement::acquire();
295 void SAL_CALL ORootElementGroupInfo::release( ) throw ()
297 BasicRootElement::release();
300 // XInterface joining
301 uno::Any SAL_CALL ORootElementGroupInfo::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
303 uno::Any aRet = BasicRootElement::queryInterface(rType);
305 if (!aRet.hasValue())
306 aRet = BasicGroupAccess::queryInterface(rType);
308 if (!aRet.hasValue())
309 aRet = BasicPropertySet::queryInterface(rType);
311 return aRet;
314 // XTypeProvider joining
315 uno::Sequence< uno::Type > SAL_CALL ORootElementGroupInfo::getTypes( ) throw (uno::RuntimeException )
317 return comphelper::concatSequences(BasicRootElement::getTypes(), BasicGroupAccess::getTypes(), BasicPropertySet::getTypes());
320 uno::Sequence< sal_Int8 > SAL_CALL ORootElementGroupInfo::getImplementationId( ) throw (uno::RuntimeException )
322 return BasicRootElement::getImplementationId();
326 configapi::NodeAccess& ORootElementGroupInfo::getNodeAccess()
328 return m_aAccessElement;
331 configapi::NodeGroupInfoAccess& ORootElementGroupInfo::getNode()
333 return m_aAccessElement;
336 configapi::NodeGroupAccess* ORootElementGroupInfo::maybeGetUpdateAccess()
338 return 0;
341 configapi::RootElement& ORootElementGroupInfo::getElementClass()
343 return m_aAccessElement;
346 //==========================================================================
347 //= ORootElementGroupUpdate
348 //==========================================================================
350 // XInterface refcounting
351 void SAL_CALL ORootElementGroupUpdate::acquire( ) throw ()
353 BasicUpdateElement::acquire();
356 void SAL_CALL ORootElementGroupUpdate::release( ) throw ()
358 BasicUpdateElement::release();
361 // XInterface joining
362 uno::Any SAL_CALL ORootElementGroupUpdate::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
364 uno::Any aRet = BasicUpdateElement::queryInterface(rType);
366 if (!aRet.hasValue())
367 aRet = BasicGroup::queryInterface(rType);
369 if (!aRet.hasValue())
370 aRet = BasicPropertySet::queryInterface(rType);
372 return aRet;
375 // XTypeProvider joining
376 uno::Sequence< uno::Type > SAL_CALL ORootElementGroupUpdate::getTypes( ) throw (uno::RuntimeException )
378 return comphelper::concatSequences(BasicUpdateElement::getTypes(),BasicGroup::getTypes(), BasicPropertySet::getTypes());
381 uno::Sequence< sal_Int8 > SAL_CALL ORootElementGroupUpdate::getImplementationId( ) throw (uno::RuntimeException )
383 return BasicUpdateElement::getImplementationId();
387 configapi::NodeAccess& ORootElementGroupUpdate::getNodeAccess()
389 return m_aAccessElement;
392 configapi::NodeGroupInfoAccess& ORootElementGroupUpdate::getNode()
394 return m_aAccessElement;
397 configapi::NodeGroupAccess* ORootElementGroupUpdate::maybeGetUpdateAccess()
399 return &m_aAccessElement;
402 configapi::UpdateRootElement& ORootElementGroupUpdate::getElementClass()
404 return m_aAccessElement;
407 //........................................................................
408 } // namespace configmgr
409 //........................................................................