diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-08-02 16:17:36 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2004-08-02 16:17:36 +0000 |
commit | fffd34f29a533e22fe43f1d7db44670fa1d8fe9e (patch) | |
tree | 5a9f190aa4417522abdc4adae24675451492cc8b | |
parent | c0f3229ad8968be52972cf1e7cc8dd7848ad86f7 (diff) |
INTEGRATION: CWS insight01 (1.16.92); FILE MERGED
2004/06/29 12:55:01 oj 1.16.92.1: #i30626# naming corrected
-rw-r--r-- | connectivity/source/sdbcx/VTable.cxx | 33 |
1 files changed, 18 insertions, 15 deletions
diff --git a/connectivity/source/sdbcx/VTable.cxx b/connectivity/source/sdbcx/VTable.cxx index 878339ce7329..cefb7c83f45d 100644 --- a/connectivity/source/sdbcx/VTable.cxx +++ b/connectivity/source/sdbcx/VTable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: VTable.cxx,v $ * - * $Revision: 1.16 $ + * $Revision: 1.17 $ * - * last change: $Author: oj $ $Date: 2002-11-12 09:17:39 $ + * last change: $Author: hr $ $Date: 2004-08-02 17:17:36 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -83,6 +83,9 @@ #ifndef _CONNECTIVITY_SDBCX_KEY_HXX_ #include "connectivity/sdbcx/VKey.hxx" #endif +#ifndef _CONNECTIVITY_DBTOOLS_HXX_ +#include "connectivity/dbtools.hxx" +#endif // ------------------------------------------------------------------------- @@ -290,8 +293,9 @@ Reference< XPropertySet > SAL_CALL OTable::createDataDescriptor( ) throw(Runtim ::osl::MutexGuard aGuard(m_aMutex); checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed); - - return this; + OTable* pTable = new OTable(m_pTables,isCaseSensitive(),m_Name,m_Type,m_Description,m_SchemaName,m_CatalogName); + pTable->setNew(sal_True); + return pTable; } // ------------------------------------------------------------------------- // XIndexesSupplier @@ -325,19 +329,18 @@ void SAL_CALL OTable::rename( const ::rtl::OUString& newName ) throw(SQLExceptio checkDisposed(OTableDescriptor_BASE::rBHelper.bDisposed); ::rtl::OUString sOldComposedName = getName(); - ::rtl::OUString sNewComposedName; - sal_Int32 nPos = sOldComposedName.lastIndexOf('.'); - if(nPos != -1) - { - sNewComposedName = sOldComposedName.copy(0,nPos); - sNewComposedName += ::rtl::OUString::createFromAscii(".") ; - sNewComposedName += newName; - } + Reference< XDatabaseMetaData> xMetaData = getMetaData(); + if ( xMetaData.is() ) + ::dbtools::qualifiedNameComponents(xMetaData,newName,m_CatalogName,m_SchemaName,m_Name,::dbtools::eInDataManipulation); else - sNewComposedName = newName; + m_Name = newName; - m_pTables->renameObject(sOldComposedName,sNewComposedName); - m_Name = newName; + m_pTables->renameObject(sOldComposedName,newName); +} +// ----------------------------------------------------------------------------- +Reference< XDatabaseMetaData> OTable::getMetaData() const +{ + return NULL; } // ------------------------------------------------------------------------- // XAlterTable |