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 c41efc6d0b
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
This commit is contained in:
Lionel Elie Mamane 2013-04-10 17:38:41 +02:00
parent d42b1afc4f
commit 86ef5f6f8c

View file

@ -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;
}