merge the formfield patch from ooo-build
[ooovba.git] / configmgr / source / api2 / setobjects.cxx
blob54d1e514c6b84e75c34246c956c7eeb419b8440a
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: setobjects.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 "setobjects.hxx"
35 #include "comphelper/sequence.hxx"
37 //........................................................................
38 namespace configmgr
41 //==========================================================================
42 //= OInnerSetInfo
43 //==========================================================================
45 // XInterface refcounting
46 void SAL_CALL OInnerSetInfo::acquire( ) throw ()
48 BasicInnerElement::acquire();
51 void SAL_CALL OInnerSetInfo::release( ) throw ()
53 BasicInnerElement::release();
56 // XInterface joining
57 uno::Any SAL_CALL OInnerSetInfo::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
59 uno::Any aRet = BasicInnerElement::queryInterface(rType);
61 if (!aRet.hasValue())
62 aRet = BasicSetAccess::queryInterface(rType);
64 return aRet;
67 // XTypeProvider joining
68 uno::Sequence< uno::Type > SAL_CALL OInnerSetInfo::getTypes( ) throw (uno::RuntimeException )
70 return comphelper::concatSequences(BasicInnerElement::getTypes(),BasicSetAccess::getTypes() );
73 uno::Sequence< sal_Int8 > SAL_CALL OInnerSetInfo::getImplementationId( ) throw (uno::RuntimeException )
75 return BasicInnerElement::getImplementationId();
79 configapi::NodeAccess& OInnerSetInfo::getNodeAccess()
81 return m_aAccessElement;
84 configapi::NodeSetInfoAccess& OInnerSetInfo::getNode()
86 return m_aAccessElement;
89 configapi::InnerElement& OInnerSetInfo::getElementClass()
91 return m_aAccessElement;
94 //==========================================================================
95 //= OInnerTreeSetUpdate
96 //==========================================================================
98 // XInterface refcounting
99 void SAL_CALL OInnerTreeSetUpdate::acquire( ) throw ()
101 BasicInnerElement::acquire();
104 void SAL_CALL OInnerTreeSetUpdate::release( ) throw ()
106 BasicInnerElement::release();
109 // XInterface joining
110 uno::Any SAL_CALL OInnerTreeSetUpdate::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
112 uno::Any aRet = BasicInnerElement::queryInterface(rType);
114 if (!aRet.hasValue())
115 aRet = BasicSet::queryInterface(rType);
117 return aRet;
120 // XTypeProvider joining
121 uno::Sequence< uno::Type > SAL_CALL OInnerTreeSetUpdate::getTypes( ) throw (uno::RuntimeException )
123 return comphelper::concatSequences(BasicInnerElement::getTypes(),BasicSet::getTypes() );
126 uno::Sequence< sal_Int8 > SAL_CALL OInnerTreeSetUpdate::getImplementationId( ) throw (uno::RuntimeException )
128 return BasicInnerElement::getImplementationId();
132 configapi::NodeAccess& OInnerTreeSetUpdate::getNodeAccess()
134 return m_aAccessElement;
137 configapi::NodeSetInfoAccess& OInnerTreeSetUpdate::getNode()
139 return m_aAccessElement;
142 configapi::NodeTreeSetAccess* OInnerTreeSetUpdate::maybeGetUpdateAccess()
144 return &m_aAccessElement;
147 configapi::InnerElement& OInnerTreeSetUpdate::getElementClass()
149 return m_aAccessElement;
152 //==========================================================================
153 //= OInnerValueSetUpdate
154 //==========================================================================
156 // XInterface refcounting
157 void SAL_CALL OInnerValueSetUpdate::acquire( ) throw ()
159 BasicInnerElement::acquire();
162 void SAL_CALL OInnerValueSetUpdate::release( ) throw ()
164 BasicInnerElement::release();
167 // XInterface joining
168 uno::Any SAL_CALL OInnerValueSetUpdate::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
170 uno::Any aRet = BasicInnerElement::queryInterface(rType);
172 if (!aRet.hasValue())
173 aRet = BasicValueSet::queryInterface(rType);
175 return aRet;
178 // XTypeProvider joining
179 uno::Sequence< uno::Type > SAL_CALL OInnerValueSetUpdate::getTypes( ) throw (uno::RuntimeException )
181 return comphelper::concatSequences(BasicInnerElement::getTypes(),BasicValueSet::getTypes() );
184 uno::Sequence< sal_Int8 > SAL_CALL OInnerValueSetUpdate::getImplementationId( ) throw (uno::RuntimeException )
186 return BasicInnerElement::getImplementationId();
190 configapi::NodeAccess& OInnerValueSetUpdate::getNodeAccess()
192 return m_aAccessElement;
195 configapi::NodeSetInfoAccess& OInnerValueSetUpdate::getNode()
197 return m_aAccessElement;
200 configapi::NodeValueSetAccess* OInnerValueSetUpdate::maybeGetUpdateAccess()
202 return &m_aAccessElement;
205 configapi::InnerElement& OInnerValueSetUpdate::getElementClass()
207 return m_aAccessElement;
210 //==========================================================================
211 //= OSetElementSetInfo
212 //==========================================================================
214 // XInterface refcounting
215 void SAL_CALL OSetElementSetInfo::acquire( ) throw ()
217 BasicSetElement::acquire();
220 void SAL_CALL OSetElementSetInfo::release( ) throw ()
222 BasicSetElement::release();
225 // XInterface joining
226 uno::Any SAL_CALL OSetElementSetInfo::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
228 uno::Any aRet = BasicSetElement::queryInterface(rType);
230 if (!aRet.hasValue())
231 aRet = BasicSetAccess::queryInterface(rType);
233 return aRet;
236 // XTypeProvider joining
237 uno::Sequence< uno::Type > SAL_CALL OSetElementSetInfo::getTypes( ) throw (uno::RuntimeException )
239 return comphelper::concatSequences(BasicSetElement::getTypes(),BasicSetAccess::getTypes() );
242 uno::Sequence< sal_Int8 > SAL_CALL OSetElementSetInfo::getImplementationId( ) throw (uno::RuntimeException )
244 return BasicSetElement::getImplementationId();
248 configapi::NodeAccess& OSetElementSetInfo::getNodeAccess()
250 return m_aAccessElement;
253 configapi::NodeSetInfoAccess& OSetElementSetInfo::getNode()
255 return m_aAccessElement;
258 configapi::SetElement& OSetElementSetInfo::getElementClass()
260 return m_aAccessElement;
263 //==========================================================================
264 //= OSetElementTreeSetUpdate
265 //==========================================================================
267 // XInterface refcounting
268 void SAL_CALL OSetElementTreeSetUpdate::acquire( ) throw ()
270 BasicSetElement::acquire();
273 void SAL_CALL OSetElementTreeSetUpdate::release( ) throw ()
275 BasicSetElement::release();
278 // XInterface joining
279 uno::Any SAL_CALL OSetElementTreeSetUpdate::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
281 uno::Any aRet = BasicSetElement::queryInterface(rType);
283 if (!aRet.hasValue())
284 aRet = BasicSet::queryInterface(rType);
286 return aRet;
289 // XTypeProvider joining
290 uno::Sequence< uno::Type > SAL_CALL OSetElementTreeSetUpdate::getTypes( ) throw (uno::RuntimeException )
292 return comphelper::concatSequences(BasicSetElement::getTypes(),BasicSet::getTypes() );
295 uno::Sequence< sal_Int8 > SAL_CALL OSetElementTreeSetUpdate::getImplementationId( ) throw (uno::RuntimeException )
297 return BasicSetElement::getImplementationId();
301 configapi::NodeAccess& OSetElementTreeSetUpdate::getNodeAccess()
303 return m_aAccessElement;
306 configapi::NodeSetInfoAccess& OSetElementTreeSetUpdate::getNode()
308 return m_aAccessElement;
311 configapi::NodeTreeSetAccess* OSetElementTreeSetUpdate::maybeGetUpdateAccess()
313 return &m_aAccessElement;
316 configapi::SetElement& OSetElementTreeSetUpdate::getElementClass()
318 return m_aAccessElement;
321 //==========================================================================
322 //= OSetElementValueSetUpdate
323 //==========================================================================
325 // XInterface refcounting
326 void SAL_CALL OSetElementValueSetUpdate::acquire( ) throw ()
328 BasicSetElement::acquire();
331 void SAL_CALL OSetElementValueSetUpdate::release( ) throw ()
333 BasicSetElement::release();
336 // XInterface joining
337 uno::Any SAL_CALL OSetElementValueSetUpdate::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
339 uno::Any aRet = BasicSetElement::queryInterface(rType);
341 if (!aRet.hasValue())
342 aRet = BasicValueSet::queryInterface(rType);
344 return aRet;
347 // XTypeProvider joining
348 uno::Sequence< uno::Type > SAL_CALL OSetElementValueSetUpdate::getTypes( ) throw (uno::RuntimeException )
350 return comphelper::concatSequences(BasicSetElement::getTypes(),BasicValueSet::getTypes() );
353 uno::Sequence< sal_Int8 > SAL_CALL OSetElementValueSetUpdate::getImplementationId( ) throw (uno::RuntimeException )
355 return BasicSetElement::getImplementationId();
359 configapi::NodeAccess& OSetElementValueSetUpdate::getNodeAccess()
361 return m_aAccessElement;
364 configapi::NodeSetInfoAccess& OSetElementValueSetUpdate::getNode()
366 return m_aAccessElement;
369 configapi::NodeValueSetAccess* OSetElementValueSetUpdate::maybeGetUpdateAccess()
371 return &m_aAccessElement;
374 configapi::SetElement& OSetElementValueSetUpdate::getElementClass()
376 return m_aAccessElement;
379 //==========================================================================
380 //= ORootElementSetInfo
381 //==========================================================================
383 // XInterface refcounting
384 void SAL_CALL ORootElementSetInfo::acquire( ) throw ()
386 BasicRootElement::acquire();
389 void SAL_CALL ORootElementSetInfo::release( ) throw ()
391 BasicRootElement::release();
394 // XInterface joining
395 uno::Any SAL_CALL ORootElementSetInfo::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
397 uno::Any aRet = BasicRootElement::queryInterface(rType);
399 if (!aRet.hasValue())
400 aRet = BasicSetAccess::queryInterface(rType);
402 return aRet;
405 // XTypeProvider joining
406 uno::Sequence< uno::Type > SAL_CALL ORootElementSetInfo::getTypes( ) throw (uno::RuntimeException )
408 return comphelper::concatSequences(BasicRootElement::getTypes(),BasicSetAccess::getTypes() );
411 uno::Sequence< sal_Int8 > SAL_CALL ORootElementSetInfo::getImplementationId( ) throw (uno::RuntimeException )
413 return BasicRootElement::getImplementationId();
417 configapi::NodeAccess& ORootElementSetInfo::getNodeAccess()
419 return m_aAccessElement;
422 configapi::NodeSetInfoAccess& ORootElementSetInfo::getNode()
424 return m_aAccessElement;
427 configapi::RootElement& ORootElementSetInfo::getElementClass()
429 return m_aAccessElement;
432 //==========================================================================
433 //= ORootElementTreeSetUpdate
434 //==========================================================================
436 // XInterface refcounting
437 void SAL_CALL ORootElementTreeSetUpdate::acquire( ) throw ()
439 BasicUpdateElement::acquire();
442 void SAL_CALL ORootElementTreeSetUpdate::release( ) throw ()
444 BasicUpdateElement::release();
447 // XInterface joining
448 uno::Any SAL_CALL ORootElementTreeSetUpdate::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
450 uno::Any aRet = BasicUpdateElement::queryInterface(rType);
452 if (!aRet.hasValue())
453 aRet = BasicSet::queryInterface(rType);
455 return aRet;
458 // XTypeProvider joining
459 uno::Sequence< uno::Type > SAL_CALL ORootElementTreeSetUpdate::getTypes( ) throw (uno::RuntimeException )
461 return comphelper::concatSequences(BasicUpdateElement::getTypes(),BasicSet::getTypes() );
464 uno::Sequence< sal_Int8 > SAL_CALL ORootElementTreeSetUpdate::getImplementationId( ) throw (uno::RuntimeException )
466 return BasicUpdateElement::getImplementationId();
470 configapi::NodeAccess& ORootElementTreeSetUpdate::getNodeAccess()
472 return m_aAccessElement;
475 configapi::NodeSetInfoAccess& ORootElementTreeSetUpdate::getNode()
477 return m_aAccessElement;
480 configapi::NodeTreeSetAccess* ORootElementTreeSetUpdate::maybeGetUpdateAccess()
482 return &m_aAccessElement;
485 configapi::UpdateRootElement& ORootElementTreeSetUpdate::getElementClass()
487 return m_aAccessElement;
490 //==========================================================================
491 //= ORootElementValueSetUpdate
492 //==========================================================================
494 // XInterface refcounting
495 void SAL_CALL ORootElementValueSetUpdate::acquire( ) throw ()
497 BasicUpdateElement::acquire();
500 void SAL_CALL ORootElementValueSetUpdate::release( ) throw ()
502 BasicUpdateElement::release();
505 // XInterface joining
506 uno::Any SAL_CALL ORootElementValueSetUpdate::queryInterface( uno::Type const& rType ) throw (uno::RuntimeException )
508 uno::Any aRet = BasicUpdateElement::queryInterface(rType);
510 if (!aRet.hasValue())
511 aRet = BasicValueSet::queryInterface(rType);
513 return aRet;
516 // XTypeProvider joining
517 uno::Sequence< uno::Type > SAL_CALL ORootElementValueSetUpdate::getTypes( ) throw (uno::RuntimeException )
519 return comphelper::concatSequences(BasicUpdateElement::getTypes(),BasicValueSet::getTypes() );
522 uno::Sequence< sal_Int8 > SAL_CALL ORootElementValueSetUpdate::getImplementationId( ) throw (uno::RuntimeException )
524 return BasicUpdateElement::getImplementationId();
528 configapi::NodeAccess& ORootElementValueSetUpdate::getNodeAccess()
530 return m_aAccessElement;
533 configapi::NodeSetInfoAccess& ORootElementValueSetUpdate::getNode()
535 return m_aAccessElement;
538 configapi::NodeValueSetAccess* ORootElementValueSetUpdate::maybeGetUpdateAccess()
540 return &m_aAccessElement;
543 configapi::UpdateRootElement& ORootElementValueSetUpdate::getElementClass()
545 return m_aAccessElement;
547 //........................................................................
548 } // namespace configmgr
549 //........................................................................