summaryrefslogtreecommitdiff
path: root/connectivity
diff options
context:
space:
mode:
authorOcke Janssen [oj] <Ocke.Janssen@oracle.com>2010-12-10 12:42:03 +0100
committerOcke Janssen [oj] <Ocke.Janssen@oracle.com>2010-12-10 12:42:03 +0100
commit61f2ed5beeacd72f630ff2a4e86d92695e1c7dee (patch)
treed992f774d7cb500b2ea8c9596372d08589eb2a30 /connectivity
parent1c516e842badb9eaf3e226cdb95786a16b2d6b00 (diff)
dba33m: #i115436# only cast handled
Diffstat (limited to 'connectivity')
-rw-r--r--connectivity/inc/connectivity/sqlnode.hxx1
-rw-r--r--connectivity/source/parse/sqlnode.cxx6
2 files changed, 4 insertions, 3 deletions
diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx
index fa283cb5cf04..04ec8dc153df 100644
--- a/connectivity/inc/connectivity/sqlnode.hxx
+++ b/connectivity/inc/connectivity/sqlnode.hxx
@@ -231,6 +231,7 @@ namespace connectivity
character_string_type,
other_like_predicate_part_2,
between_predicate_part_2,
+ cast_spec,
rule_count, // letzter_wert
UNKNOWN_RULE // ID indicating that a node is no rule with a matching Rule-enum value (see getKnownRuleID)
};
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 209dc0d6fc18..8f2b3d69812a 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1425,7 +1425,8 @@ OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star:
{ OSQLParseNode::parenthesized_boolean_value_expression, "parenthesized_boolean_value_expression" },
{ OSQLParseNode::character_string_type, "character_string_type" },
{ OSQLParseNode::other_like_predicate_part_2, "other_like_predicate_part_2" },
- { OSQLParseNode::between_predicate_part_2, "between_predicate_part_2" }
+ { OSQLParseNode::between_predicate_part_2, "between_predicate_part_2" },
+ { OSQLParseNode::cast_spec, "cast_spec" }
};
size_t nRuleMapCount = sizeof( aRuleDescriptions ) / sizeof( aRuleDescriptions[0] );
OSL_ENSURE( nRuleMapCount == size_t( OSQLParseNode::rule_count ), "OSQLParser::OSQLParser: added a new rule? Adjust this map!" );
@@ -2524,9 +2525,8 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode
rString.append(aTmp);
} break;
- // fall through
case SQL_NODE_PUNCTUATION:
- if ( m_aNodeValue.toChar() == '(' || m_aNodeValue.toChar() == ')') // no spaces in front of '(' or after ')'
+ if ( getParent() && SQL_ISRULE(getParent(),cast_spec) && m_aNodeValue.toChar() == '(' ) // no spaces in front of '('
{
rString.append(m_aNodeValue);
break;