diff options
author | Ocke Janssen <oj@openoffice.org> | 2002-12-10 08:19:22 +0000 |
---|---|---|
committer | Ocke Janssen <oj@openoffice.org> | 2002-12-10 08:19:22 +0000 |
commit | 6912006750fc543e4f0bc3e8e8ed5c3199c1b668 (patch) | |
tree | 5562ccf23b88e9260fd030980c2c091f2d6afbc3 /dbaccess/source/ui/misc/WCopyTable.cxx | |
parent | a84ac55f3208f677320554dc2765a3d1ba9a015a (diff) |
#106092# check column names
Diffstat (limited to 'dbaccess/source/ui/misc/WCopyTable.cxx')
-rw-r--r-- | dbaccess/source/ui/misc/WCopyTable.cxx | 24 |
1 files changed, 22 insertions, 2 deletions
diff --git a/dbaccess/source/ui/misc/WCopyTable.cxx b/dbaccess/source/ui/misc/WCopyTable.cxx index c0a24cd9a4cd..18e64d537f24 100644 --- a/dbaccess/source/ui/misc/WCopyTable.cxx +++ b/dbaccess/source/ui/misc/WCopyTable.cxx @@ -2,9 +2,9 @@ * * $RCSfile: WCopyTable.cxx,v $ * - * $Revision: 1.28 $ + * $Revision: 1.29 $ * - * last change: $Author: oj $ $Date: 2002-11-14 07:57:01 $ + * last change: $Author: oj $ $Date: 2002-12-10 09:17:06 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -1061,3 +1061,23 @@ const OTypeInfo* OCopyTableWizard::convertType(const OTypeInfo* _pType) return pType; } // ----------------------------------------------------------------------------- +::rtl::OUString OCopyTableWizard::createUniqueName(const ::rtl::OUString& _sName) +{ + ::rtl::OUString sName = _sName; + if ( m_xSourceColumns.is() ) + sName = ::dbtools::createUniqueName(m_xSourceColumns,sName,sal_False); + else + { + if ( m_vSourceColumns.find(sName) != m_vSourceColumns.end()) + { + sal_Int32 nPos = 0; + while(m_vSourceColumns.find(sName) != m_vSourceColumns.end()) + { + sName = _sName; + sName += ::rtl::OUString::valueOf(++nPos); + } + } + } + return sName; +} +// ----------------------------------------------------------------------------- |