summaryrefslogtreecommitdiffstats
path: root/stoc/source/registry_tdprovider/tdprovider.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'stoc/source/registry_tdprovider/tdprovider.cxx')
-rw-r--r--stoc/source/registry_tdprovider/tdprovider.cxx33
1 files changed, 15 insertions, 18 deletions
diff --git a/stoc/source/registry_tdprovider/tdprovider.cxx b/stoc/source/registry_tdprovider/tdprovider.cxx
index 43802388a910..eb2629558fcc 100644
--- a/stoc/source/registry_tdprovider/tdprovider.cxx
+++ b/stoc/source/registry_tdprovider/tdprovider.cxx
@@ -173,6 +173,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);
@@ -224,14 +226,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 );
}
//______________________________________________________________________________
@@ -345,8 +340,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;
@@ -433,7 +427,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(
@@ -446,14 +450,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