summaryrefslogtreecommitdiff
path: root/xmloff
diff options
context:
space:
mode:
authorEike Rathke <erack@redhat.com>2014-04-04 11:57:43 +0200
committerAndras Timar <andras.timar@collabora.com>2014-04-08 14:47:10 +0200
commitf8218676b976f4648028fbce504a0d48b58af31a (patch)
tree6f0fb2851abbc9ff9248de81c15764b6ca48d8ee /xmloff
parent2b99cb70004f87fb61405181fa8fe75f6ec672dc (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 (cherry picked from commit dfcc851d65c8d81988843ef31a75b5d30051ddfd) Reviewed-on: https://gerrit.libreoffice.org/8836 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
Diffstat (limited to 'xmloff')
-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 ece3ea8db7f3..3debbf467b84 100644
--- a/xmloff/source/style/xmlnumfi.cxx
+++ b/xmloff/source/style/xmlnumfi.cxx
@@ -2067,7 +2067,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