diff options
author | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-09-26 13:52:56 +0000 |
---|---|---|
committer | Jens-Heiner Rechtien <hr@openoffice.org> | 2007-09-26 13:52:56 +0000 |
commit | 563b9497eab733a12396f340e7d1ee9b54f55765 (patch) | |
tree | a4aab1c1e6ffc02c4b8c36e72c60ba0052453e2c /dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | |
parent | a008d05a12d284a661ef7c207ed4167a58e8530e (diff) |
INTEGRATION: CWS dba24a (1.78.34); FILE MERGED
2007/09/20 06:38:05 oj 1.78.34.2: #i69428# check table alias name
2007/08/28 08:34:53 oj 1.78.34.1: #i69428# erase table from field name
Diffstat (limited to 'dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx')
-rw-r--r-- | dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx index 3fce16baa..6d2ede479 100644 --- a/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx +++ b/dbaccess/source/ui/querydesign/SelectionBrowseBox.cxx @@ -4,9 +4,9 @@ * * $RCSfile: SelectionBrowseBox.cxx,v $ * - * $Revision: 1.78 $ + * $Revision: 1.79 $ * - * last change: $Author: kz $ $Date: 2007-05-10 10:38:56 $ + * last change: $Author: hr $ $Date: 2007-09-26 14:52:56 $ * * The Contents of this file are made available subject to * the terms of GNU Lesser General Public License Version 2.1. @@ -1027,11 +1027,12 @@ sal_Bool OSelectionBrowseBox::SaveModified() static_cast<OQueryController*>(getDesignView()->getController())->getUndoMgr()->EnterListAction(String(),String()); USHORT nPos = m_pFieldCell->GetEntryPos(aFieldName); - if ( nPos != COMBOBOX_ENTRY_NOTFOUND && aFieldName.GetTokenCount('.') > 1 ) + String aAliasName = pEntry->GetAlias(); + if ( nPos != COMBOBOX_ENTRY_NOTFOUND && !aAliasName.Len() && aFieldName.GetTokenCount('.') > 1 ) { // special case, we have a table field so we must cut the table name String sTableAlias = aFieldName.GetToken(0,'.'); pEntry->SetAlias(sTableAlias); - String sColumnName = aFieldName.GetToken(1,'.'); + String sColumnName = aFieldName.Copy(sTableAlias.Len()+1,aFieldName.Len() - sTableAlias.Len() -1); Reference<XConnection> xConnection = pController->getConnection(); if ( !xConnection.is() ) return sal_False; |