diff options
author | Juergen Schmidt <jsc@openoffice.org> | 2001-07-04 12:10:48 +0000 |
---|---|---|
committer | Juergen Schmidt <jsc@openoffice.org> | 2001-07-04 12:10:48 +0000 |
commit | e4400b7208465f585be3b1527fe6b7ae685794b7 (patch) | |
tree | 48656694d5eef002ff0bad17f7045e948c66b466 /stoc | |
parent | 5d825f0432c65437579a479a67e15ac367423fb2 (diff) |
#89248# change function 'close' of XSimpleRegistry relating to a nested registry
Diffstat (limited to 'stoc')
-rw-r--r-- | stoc/source/defaultregistry/defaultregistry.cxx | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/stoc/source/defaultregistry/defaultregistry.cxx b/stoc/source/defaultregistry/defaultregistry.cxx index e11702f9eac3..b0256af18d14 100644 --- a/stoc/source/defaultregistry/defaultregistry.cxx +++ b/stoc/source/defaultregistry/defaultregistry.cxx @@ -2,9 +2,9 @@ * * $RCSfile: defaultregistry.cxx,v $ * - * $Revision: 1.5 $ + * $Revision: 1.6 $ * - * last change: $Author: jbu $ $Date: 2001-06-22 16:20:56 $ + * last change: $Author: jsc $ $Date: 2001-07-04 13:10:48 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1276,7 +1276,9 @@ OUString SAL_CALL NestedRegistryImpl::getURL() throw(RuntimeException) void SAL_CALL NestedRegistryImpl::open( const OUString& rURL, sal_Bool bReadOnly, sal_Bool bCreate ) throw(InvalidRegistryException, RuntimeException) { - throw InvalidRegistryException(); + throw InvalidRegistryException( + OUString::createFromAscii("the 'open' method is not specified for a nested registry"), + Reference< XInterface >() ); } //************************************************************************* @@ -1300,14 +1302,29 @@ sal_Bool SAL_CALL NestedRegistryImpl::isValid( ) throw(RuntimeException) void SAL_CALL NestedRegistryImpl::close( ) throw(InvalidRegistryException, RuntimeException) { - throw InvalidRegistryException(); + Guard< Mutex > aGuard( m_mutex ); + if ( m_localReg.is() && m_localReg->isValid() ) + { + m_localReg->close(); + } + if ( m_defaultReg.is() && m_defaultReg->isValid() ) + { + m_defaultReg->close(); + } +/* + throw InvalidRegistryException( + OUString::createFromAscii("the 'close' method is not specified for a nested registry"), + Reference< XInterface >() ); +*/ } //************************************************************************* void SAL_CALL NestedRegistryImpl::destroy( ) throw(InvalidRegistryException, RuntimeException) { - throw InvalidRegistryException(); + throw InvalidRegistryException( + OUString::createFromAscii("the 'destroy' method is not specified for a nested registry"), + Reference< XInterface >() ); } //************************************************************************* |