summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorLionel Elie Mamane <lionel@mamane.lu>2013-04-10 17:38:41 +0200
committerLionel Elie Mamane <lionel@mamane.lu>2013-04-10 18:12:09 +0200
commit86ef5f6f8cee5ada8c9cbd6ba73a93ced1dad6b5 (patch)
treeb0867605aa09e7da34ac69d77b588a5abdc58ae7 /connectivity
parentd42b1afc4fd04f2c0c5cff0c56dd371fefe81018 (diff)
remove impossible case
nCount == 5 is impossible; the grammar has changed since this code was written. It used to refer to case '(' joined_table ')' range_variable op_column_commalist which has become just '(' joined_table ')' which thus has (by definition) no table range (alias). Case changed in mega-(merge-)commit: commit c41efc6d0b2740be4243fd696385f8dbcec0aefe Author: Jens-Heiner Rechtien <hr@openoffice.org> Date: Wed Nov 19 17:43:08 2008 +0000 CWS-TOOLING: integrate CWS dba301a_DEV300 which seems to have done the other necessary adaptations to this code and elsewhere. Change-Id: I96ddbefbf34d6c155435b78aa9e5037a760232ed
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/source/parse/sqlnode.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index c23e9aefb3cf..e4ba3e959997 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -2695,7 +2695,7 @@ OUString OSQLParseNode::getTableRange(const OSQLParseNode* _pTableRef)
OSL_ENSURE(_pTableRef && _pTableRef->count() > 1 && _pTableRef->getKnownRuleID() == OSQLParseNode::table_ref,"Invalid node give, only table ref is allowed!");
const sal_uInt32 nCount = _pTableRef->count();
OUString sTableRange;
- if ( nCount == 2 || (nCount == 3 && !_pTableRef->getChild(0)->isToken()) || nCount == 5 )
+ if ( nCount == 2 || (nCount == 3 && !_pTableRef->getChild(0)->isToken()) )
{
const OSQLParseNode* pNode = _pTableRef->getChild(nCount - (nCount == 2 ? 1 : 2));
OSL_ENSURE(pNode && (pNode->getKnownRuleID() == OSQLParseNode::table_primary_as_range_column
@@ -2703,7 +2703,7 @@ OUString OSQLParseNode::getTableRange(const OSQLParseNode* _pTableRef)
,"SQL grammar changed!");
if ( !pNode->isLeaf() )
sTableRange = pNode->getChild(1)->getTokenValue();
- } // if ( nCount == 2 || nCount == 3 || nCount == 5)
+ } // if ( nCount == 2 || nCount == 3 )
return sTableRange;
}