summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorobo <obo@openoffice.org>2010-12-13 08:59:48 +0100
committerobo <obo@openoffice.org>2010-12-13 08:59:48 +0100
commit760601cdbae7c063f13902e66ed76c022018d848 (patch)
treee4daac64056a94bf8c17aa9481f12d751716e46d
parent563edff28af92a0051c4451d34f3e274cdd3ae0e (diff)
parentb962a1629955cf00b1cc959f86731e724d6c8e60 (diff)
CWS-TOOLING: integrate CWS dba33mooo/OOO330_m19ooo/OOO330_m18
-rw-r--r--connectivity/inc/connectivity/sqlnode.hxx1
-rw-r--r--connectivity/source/parse/sqlnode.cxx10
2 files changed, 10 insertions, 1 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 9b9f9fb66f..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!" );
@@ -2511,6 +2512,7 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode
rString.append(m_aNodeValue);
rString.appendAscii("#");
break;
+
case SQL_NODE_INTNUM:
case SQL_NODE_APPROXNUM:
{
@@ -2523,6 +2525,12 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode
rString.append(aTmp);
} break;
+ case SQL_NODE_PUNCTUATION:
+ if ( getParent() && SQL_ISRULE(getParent(),cast_spec) && m_aNodeValue.toChar() == '(' ) // no spaces in front of '('
+ {
+ rString.append(m_aNodeValue);
+ break;
+ }
// fall through
default:
if (rString.getLength() && m_aNodeValue.toChar() != '.' && m_aNodeValue.toChar() != ':' )