summaryrefslogtreecommitdiff
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
commitb962a1629955cf00b1cc959f86731e724d6c8e60 (patch)
tree745f0a8411c86442177359fd69dbdb1133146b5a
parentb8493f6d67c3669c417f54ee937ee55519b1f2dc (diff)
dba33m: #i115436# only cast handled
-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 53145b018e..4cdaba48e1 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 6e01f62c4a..1b71a66a10 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;