Tag: cws_src680_dba24d
User: fs      
Date: 2007-12-05 13:42:20+0000
Modified:
   dba/dbaccess/source/ui/misc/WCopyTable.cxx

Log:
 impl_ensureColumnInfo throws now, to detect wrong table names at construction 
time

File Changes:

Directory: /dba/dbaccess/source/ui/misc/
========================================

File [changed]: WCopyTable.cxx
Url: 
http://dba.openoffice.org/source/browse/dba/dbaccess/source/ui/misc/WCopyTable.cxx?r1=1.53.28.8&r2=1.53.28.9
Delta lines:  +20 -30
---------------------
--- WCopyTable.cxx      2007-11-26 15:14:16+0000        1.53.28.8
+++ WCopyTable.cxx      2007-12-05 13:42:17+0000        1.53.28.9
@@ -4,9 +4,9 @@
  *
  *  $RCSfile: WCopyTable.cxx,v $
  *
- *  $Revision: 1.53.28.8 $
+ *  $Revision: 1.53.28.9 $
  *
- *  last change: $Author: oj $ $Date: 2007/11/26 15:14:16 $
+ *  last change: $Author: fs $ $Date: 2007/12/05 13:42:17 $
  *
  *  The Contents of this file are made available subject to
  *  the terms of GNU Lesser General Public License Version 2.1.
@@ -310,6 +310,7 @@
     ,m_aColumnInfo()
 {
     ::dbtools::qualifiedNameComponents( m_xMetaData, m_sTableName, 
m_sTableCatalog, m_sTableSchema, m_sTableBareName, ::dbtools::eComplete );
+    impl_ensureColumnInfo_throw();
 }
 
 //------------------------------------------------------------------------
@@ -348,13 +349,11 @@
 {
 }
 //------------------------------------------------------------------------
-void NamedTableCopySource::impl_ensureColumnInfo_nothrow()
+void NamedTableCopySource::impl_ensureColumnInfo_throw()
 {
     if ( !m_aColumnInfo.empty() )
         return;
 
-    try
-    {
         Reference< XResultSetMetaDataSupplier > xStatementMetaSupp( 
impl_ensureStatement_throw().getTyped(), UNO_QUERY_THROW );
         Reference< XResultSetMetaData > xStatementMeta( 
xStatementMetaSupp->getMetaData(), UNO_SET_THROW );
 
@@ -375,11 +374,6 @@
 
             m_aColumnInfo[ aDesc.GetName() ] = aDesc;
         }
-    }
-    catch( const Exception& )
-    {
-       DBG_UNHANDLED_EXCEPTION();
-    }
 }
 
 //------------------------------------------------------------------------
@@ -393,8 +387,6 @@
 //------------------------------------------------------------------------
 Sequence< ::rtl::OUString > NamedTableCopySource::getColumnNames() const
 {
-    const_cast< NamedTableCopySource* >( this 
)->impl_ensureColumnInfo_nothrow();
-
     Sequence< ::rtl::OUString > aNames( m_aColumnInfo.size() );
     ::std::transform(
         m_aColumnInfo.begin(),
@@ -433,8 +425,6 @@
 //------------------------------------------------------------------------
 OFieldDescription* NamedTableCopySource::createFieldDescription( const 
::rtl::OUString& _rColumnName ) const
 {
-    const_cast< NamedTableCopySource* >( this 
)->impl_ensureColumnInfo_nothrow();
-
     ::std::map< ::rtl::OUString, OFieldDescription >::const_iterator pos = 
m_aColumnInfo.find( _rColumnName );
     if ( pos == m_aColumnInfo.end() )
         return NULL;




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to