update dev300-m58
[ooovba.git] / configmgr / source / api2 / groupaccess.cxx
blobb5e32cca3a620f46d5b6edad23b037c3c4be0da7
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: groupaccess.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"
34 #include "groupaccess.hxx"
35 #include "accessimpl.hxx"
36 #include "apinotifierimpl.hxx"
37 #include "apinodeaccess.hxx"
39 namespace configmgr
42 // XHierarchicalName
43 //------------------------------------------------------------------------------------------------------------------
44 rtl::OUString SAL_CALL BasicGroupAccess::getHierarchicalName( ) throw(uno::RuntimeException)
46 return configapi::implGetHierarchicalName( getNode() );
49 //------------------------------------------------------------------------------------------------------------------
50 rtl::OUString SAL_CALL BasicGroupAccess::composeHierarchicalName( const rtl::OUString& sRelativeName )
51 throw(css::lang::IllegalArgumentException, css::lang::NoSupportException, uno::RuntimeException)
53 return configapi::implComposeHierarchicalName( getNode(), sRelativeName );
56 //------------------------------------------------------------------------------------------------------------------
58 // XElementAccess, base class of XNameAccess (and XHierarchicalNameAccess ? )
59 //-----------------------------------------------------------------------------------
61 //-----------------------------------------------------------------------------------
62 uno::Type SAL_CALL BasicGroupAccess::getElementType( ) throw(uno::RuntimeException)
64 return configapi::implGetElementType( getNode() );
67 //-----------------------------------------------------------------------------------
68 sal_Bool SAL_CALL BasicGroupAccess::hasElements( ) throw(uno::RuntimeException)
70 return configapi::implHasElements( getNode() );
73 // XExactName
74 //-----------------------------------------------------------------------------------
76 rtl::OUString SAL_CALL BasicGroupAccess::getExactName( const rtl::OUString& rApproximateName ) throw(uno::RuntimeException)
78 return configapi::implGetExactName( getNode(), rApproximateName);
81 // XProperty
82 //-----------------------------------------------------------------------------------
84 css::beans::Property SAL_CALL BasicGroupAccess::getAsProperty( ) throw(uno::RuntimeException)
86 return configapi::implGetAsProperty( getNode() );
89 // XNameAccess
90 //-----------------------------------------------------------------------------------
92 sal_Bool SAL_CALL BasicGroupAccess::hasByName( const rtl::OUString& sName ) throw(uno::RuntimeException)
94 return configapi::implHasByName( getNode(), sName);
97 //-----------------------------------------------------------------------------------
98 uno::Any SAL_CALL BasicGroupAccess::getByName( const rtl::OUString& sName )
99 throw(css::container::NoSuchElementException, css::lang::WrappedTargetException, uno::RuntimeException)
101 return configapi::implGetByName( getNode(), sName );
104 //-----------------------------------------------------------------------------------
105 uno::Sequence< rtl::OUString > SAL_CALL BasicGroupAccess::getElementNames( ) throw( uno::RuntimeException)
107 return configapi::implGetElementNames( getNode() );
110 // XHierarchicalNameAccess
111 //-----------------------------------------------------------------------------------
112 sal_Bool SAL_CALL BasicGroupAccess::hasByHierarchicalName( const rtl::OUString& sName ) throw(uno::RuntimeException)
114 return configapi::implHasByHierarchicalName( getNode(), sName);
117 //-----------------------------------------------------------------------------------
118 uno::Any SAL_CALL BasicGroupAccess::getByHierarchicalName( const rtl::OUString& sName )
119 throw(css::container::NoSuchElementException, uno::RuntimeException)
121 return configapi::implGetByHierarchicalName( getNode(), sName );
125 // XContainer
126 //-----------------------------------------------------------------------------------
128 void SAL_CALL BasicGroupAccess::addContainerListener( const uno::Reference< css::container::XContainerListener >& xListener )
129 throw(uno::RuntimeException)
131 configapi::implAddListener( getNode(), xListener );
134 //-----------------------------------------------------------------------------------
135 void SAL_CALL BasicGroupAccess::removeContainerListener( const uno::Reference< css::container::XContainerListener >& xListener )
136 throw(uno::RuntimeException)
138 configapi::implRemoveListener( getNode(), xListener );
143 //-----------------------------------------------------------------------------------
145 } // namespace configmgr