diff options
Diffstat (limited to 'dbaccess/source/ui/control/tabletree.cxx')
-rw-r--r-- | dbaccess/source/ui/control/tabletree.cxx | 56 |
1 files changed, 32 insertions, 24 deletions
diff --git a/dbaccess/source/ui/control/tabletree.cxx b/dbaccess/source/ui/control/tabletree.cxx index 5dc8fe2ecba6..72db2ee129df 100644 --- a/dbaccess/source/ui/control/tabletree.cxx +++ b/dbaccess/source/ui/control/tabletree.cxx @@ -638,37 +638,45 @@ String OTableTreeListBox::getQualifiedTableName( SvLBoxEntry* _pEntry ) const { OSL_PRECOND( !isFolderEntry( _pEntry ), "OTableTreeListBox::getQualifiedTableName: folder entries not allowed here!" ); - Reference< XDatabaseMetaData > xMeta; - if ( !impl_getAndAssertMetaData( xMeta ) ) - return String(); + try + { + Reference< XDatabaseMetaData > xMeta; + if ( !impl_getAndAssertMetaData( xMeta ) ) + return String(); - ::rtl::OUString sCatalog; - ::rtl::OUString sSchema; - ::rtl::OUString sTable; + ::rtl::OUString sCatalog; + ::rtl::OUString sSchema; + ::rtl::OUString sTable; - SvLBoxEntry* pSchema = GetParent( _pEntry ); - if ( pSchema ) - { - SvLBoxEntry* pCatalog = GetParent( pSchema ); - if ( pCatalog - || ( xMeta->supportsCatalogsInDataManipulation() - && !xMeta->supportsSchemasInDataManipulation() - ) // here we support catalog but no schema - ) + SvLBoxEntry* pSchema = GetParent( _pEntry ); + if ( pSchema ) { - if ( pCatalog == NULL ) + SvLBoxEntry* pCatalog = GetParent( pSchema ); + if ( pCatalog + || ( xMeta->supportsCatalogsInDataManipulation() + && !xMeta->supportsSchemasInDataManipulation() + ) // here we support catalog but no schema + ) { - pCatalog = pSchema; - pSchema = NULL; + if ( pCatalog == NULL ) + { + pCatalog = pSchema; + pSchema = NULL; + } + sCatalog = GetEntryText( pCatalog ); } - sCatalog = GetEntryText( pCatalog ); + if ( pSchema ) + sSchema = GetEntryText(pSchema); } - if ( pSchema ) - sSchema = GetEntryText(pSchema); - } - sTable = GetEntryText( _pEntry ); + sTable = GetEntryText( _pEntry ); - return ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation ); + return ::dbtools::composeTableName( xMeta, sCatalog, sSchema, sTable, sal_False, ::dbtools::eInDataManipulation ); + } + catch( const Exception& ) + { + DBG_UNHANDLED_EXCEPTION(); + } + return String(); } //------------------------------------------------------------------------ |