diff options
author | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-12-17 13:36:59 +0100 |
---|---|---|
committer | Hans-Joachim Lankenau <hjs@openoffice.org> | 2010-12-17 13:36:59 +0100 |
commit | acab65899e11a8bf7d5427c21fb22df934ada338 (patch) | |
tree | 53b7ff7c35439b63d081e74b14d19effdd7002b8 /stoc/source | |
parent | 510d7aa56e4ff22f9593f011967bcf1e32a86e7f (diff) | |
parent | 388f90fc2070255dfc1be33a1343e3e9d6251ac5 (diff) |
CWS-TOOLING: integrate CWS mib19
Diffstat (limited to 'stoc/source')
-rw-r--r-- | stoc/source/registry_tdprovider/tdprovider.cxx | 33 |
1 files changed, 15 insertions, 18 deletions
diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx index 1d62657beba9..2cf26706993c 100644 --- a/stoc/source/registry_tdprovider/tdprovider.cxx +++ b/stoc/source/registry_tdprovider/tdprovider.cxx @@ -172,6 +172,8 @@ public: virtual Sequence< OUString > SAL_CALL getSupportedServiceNames() throw(::com::sun::star::uno::RuntimeException); // XHierarchicalNameAccess + Any getByHierarchicalNameImpl( const OUString & rName ); + virtual Any SAL_CALL getByHierarchicalName( const OUString & rName ) throw(::com::sun::star::container::NoSuchElementException, ::com::sun::star::uno::RuntimeException); virtual sal_Bool SAL_CALL hasByHierarchicalName( const OUString & rName ) throw(::com::sun::star::uno::RuntimeException); @@ -223,14 +225,7 @@ Any ProviderImpl::TypeDescriptionManagerWrapper::getByHierarchicalName( sal_Bool ProviderImpl::TypeDescriptionManagerWrapper::hasByHierarchicalName( OUString const & name ) throw (RuntimeException) { - try - { - return getByHierarchicalName( name ).hasValue(); - } - catch (container::NoSuchElementException &) - { - return false; - } + return m_xTDMgr->hasByHierarchicalName( name ) || m_xThisProvider->hasByHierarchicalName( name ); } //______________________________________________________________________________ @@ -344,8 +339,7 @@ Sequence< OUString > ProviderImpl::getSupportedServiceNames() // XHierarchicalNameAccess //__________________________________________________________________________________________________ -Any SAL_CALL ProviderImpl::getByHierarchicalName( const OUString & rName ) - throw(::com::sun::star::uno::RuntimeException, com::sun::star::container::NoSuchElementException) +Any ProviderImpl::getByHierarchicalNameImpl( const OUString & rName ) { Any aRet; @@ -432,7 +426,17 @@ Any SAL_CALL ProviderImpl::getByHierarchicalName( const OUString & rName ) // Don't stop iteration in this case. } + catch ( NoSuchElementException const & ) + { + } } + return aRet; +} + +Any SAL_CALL ProviderImpl::getByHierarchicalName( const OUString & rName ) + throw(::com::sun::star::uno::RuntimeException, com::sun::star::container::NoSuchElementException) +{ + Any aRet( getByHierarchicalNameImpl( rName ) ); if ( !aRet.hasValue() ) throw NoSuchElementException( @@ -445,14 +449,7 @@ Any SAL_CALL ProviderImpl::getByHierarchicalName( const OUString & rName ) sal_Bool ProviderImpl::hasByHierarchicalName( const OUString & rName ) throw(::com::sun::star::uno::RuntimeException) { - try - { - return getByHierarchicalName( rName ).hasValue(); - } - catch (NoSuchElementException &) - { - } - return sal_False; + return getByHierarchicalNameImpl( rName ).hasValue(); } // XTypeDescriptionEnumerationAccess |