diff options
author | Noel Power <noel.power@novell.com> | 2010-12-15 11:04:54 +0000 |
---|---|---|
committer | Noel Power <noel.power@novell.com> | 2010-12-15 11:04:54 +0000 |
commit | 2f17014a588ca53646ff838a4d2325b3bdeb9f21 (patch) | |
tree | 084a8d6262786afce508d7996c50845658c69f1c | |
parent | e27bf5c9c68153aac908161f6c4c4ebf6f6816b0 (diff) | |
parent | 4a46e845c33b70c4987a633a0729c3f1aee4192a (diff) |
Merge commit 'ooo/OOO330_m18' into libreoffice-3-3
-rw-r--r-- | connectivity/inc/connectivity/sqlnode.hxx | 1 | ||||
-rw-r--r-- | connectivity/source/parse/sqlnode.cxx | 10 | ||||
-rw-r--r-- | drawinglayer/source/primitive2d/metafileprimitive2d.cxx | 2 |
3 files changed, 11 insertions, 2 deletions
diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx index 5e307354259a..0432b3e31c6c 100644 --- a/connectivity/inc/connectivity/sqlnode.hxx +++ b/connectivity/inc/connectivity/sqlnode.hxx @@ -232,6 +232,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 e4286c971650..fa47b2d1827f 100644 --- a/connectivity/source/parse/sqlnode.cxx +++ b/connectivity/source/parse/sqlnode.cxx @@ -1427,7 +1427,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 = SAL_N_ELEMENTS( aRuleDescriptions ); OSL_ENSURE( nRuleMapCount == size_t( OSQLParseNode::rule_count ), "OSQLParser::OSQLParser: added a new rule? Adjust this map!" ); @@ -2513,6 +2514,7 @@ void OSQLParseNode::parseLeaf(::rtl::OUStringBuffer& rString, const SQLParseNode rString.append(m_aNodeValue); rString.appendAscii("#"); break; + case SQL_NODE_INTNUM: case SQL_NODE_APPROXNUM: { @@ -2525,6 +2527,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() != ':' ) diff --git a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx index e135a3509ba6..d205981205aa 100644 --- a/drawinglayer/source/primitive2d/metafileprimitive2d.cxx +++ b/drawinglayer/source/primitive2d/metafileprimitive2d.cxx @@ -2018,7 +2018,7 @@ namespace if(nTextLength + nTextIndex > nStringLength) { - nTextLength = nStringLength - nTextIndex; + nTextLength = nTextIndex > nStringLength ? 0 : nStringLength - nTextIndex; } if(nTextLength && rPropertyHolders.Current().getTextColorActive()) |