[Libreoffice-commits] core.git: Branch 'libreoffice-4-2' - xmloff/source

Eike Rathke erack at redhat.com
Fri Apr 4 09:29:07 PDT 2014


 xmloff/source/style/xmlnumfi.cxx |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

New commits:
commit 42ab5947518d92db9f0e1ccf063b211a3fd308ff
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Apr 4 11:57:43 2014 +0200

    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/8834
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>
    Tested-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/xmloff/source/style/xmlnumfi.cxx b/xmloff/source/style/xmlnumfi.cxx
index 20500af..8773f3a 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


More information about the Libreoffice-commits mailing list