summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-04-04 11:57:43 +0200
committerEike Rathke <erack@redhat.com>2014-04-04 12:06:01 +0200
commitdfcc851d65c8d81988843ef31a75b5d30051ddfd (patch)
treebabfe3bec4888115c92615af72c62e9e98138cf3
parentdf098f6207fdf79d566bf50cc2c2c87fcd295ff8 (diff)
accept proper number style condition != as not equal operator, fdo#76777
ODF 1.2 specifies '!=' as not equal operator in <number:number-style> <style:map> style:condition attribute. So far '<>' is written, accept the correct operator. Change-Id: I6087992ee35fff5c7aa52b7cec2b83b0a78dbac1
-rw-r--r--xmloff/source/style/xmlnumfi.cxx9
1 files changed, 8 insertions, 1 deletions
diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index a9cf3dc36bad..393f1dbee00a 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -2068,7 +2068,14 @@ void SvXMLNumFormatContext::AddCondition( const sal_Int32 nIndex )
if (!bDefaultCond)
{
- sal_Int32 nPos = sRealCond.indexOf( '.' );
+ // Convert != to <>
+ sal_Int32 nPos = sRealCond.indexOf( "!=" );
+ if ( nPos >= 0 )
+ {
+ sRealCond = sRealCond.replaceAt( nPos, 2, "<>" );
+ }
+
+ nPos = sRealCond.indexOf( '.' );
if ( nPos >= 0 )
{
// #i8026# #103991# localize decimal separator