Date: prev next · Thread: first prev next last
2011 Archives by date, by thread · List index


Hello,

can someone from the Thai community check whether these two patches cause
any problems. They remove some part of the bug fix for
https://bugs.freedesktop.org/show_bug.cgi?id=33089 with patch
http://cgit.freedesktop.org/libreoffice/libs-gui/commit/?id=6b5a84d339676d6e34c17cbefbec427e4559f37awhich
broke several parts of the number format dialog. If there are no
objections I would like to push these patches in some days because it will
help to get the number format dialog to work again. At the moment we have
problems with colors in the number format code and strange switching between
different categories when you click on the "Show negative numbers red"
checkbox.

Regards,
Markus
From 10e028a9ea7e925f785558eca3fb4076fd689617 Mon Sep 17 00:00:00 2001
From: Katarina Machalkova <kmachalkova@suse.cz>
Date: Thu, 28 Jul 2011 14:50:24 +0200
Subject: [PATCH 2/3] Don't delete valid [$.*] components of number formats

... such as [RED], [NatNumX] etc.
---
 svl/source/numbers/zformat.cxx |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index cfc9169..b567c20 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -636,6 +636,7 @@ SvNumberformat::SvNumberformat(String& rString,
 
     sal_Bool bCancel = sal_False;
     sal_Bool bCondition = sal_False;
+    sal_Bool bHasValidBracketPrefix = sal_False;
     short eSymbolType;
     xub_StrLen nPos = 0;
     xub_StrLen nPosOld;
@@ -727,6 +728,8 @@ SvNumberformat::SvNumberformat(String& rString,
                                 bCancel = sal_True;     // break for
                                 nCheckPos = nPosOld;
                             }
+                            else
+                                bHasValidBracketPrefix = sal_True;
                         }
                     }
                     break;
@@ -763,6 +766,7 @@ SvNumberformat::SvNumberformat(String& rString,
                             sal_uInt8 nNum = sal::static_int_cast< sal_uInt8 >(0 - (eSymbolType - 
BRACKET_SYMBOLTYPE_NATNUM0));
                             sStr += String::CreateFromInt32( nNum );
                             NumFor[nIndex].SetNatNumNum( nNum, sal_False );
+                            bHasValidBracketPrefix = sal_True;
                         }
                     }
                     break;
@@ -788,6 +792,7 @@ SvNumberformat::SvNumberformat(String& rString,
                             sal_uInt8 nNum = sal::static_int_cast< sal_uInt8 >(1 - (eSymbolType - 
BRACKET_SYMBOLTYPE_DBNUM1));
                             sStr += static_cast< sal_Unicode >('0' + nNum);
                             NumFor[nIndex].SetNatNumNum( nNum, sal_True );
+                            bHasValidBracketPrefix = sal_True;
                         }
                     }
                     break;
@@ -812,6 +817,7 @@ SvNumberformat::SvNumberformat(String& rString,
                                 sStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM("$-") );
                                 sStr = sStr + maLocale.generateCode();
                                 NumFor[nIndex].SetNatNumLang(maLocale.meLanguage);
+                                bHasValidBracketPrefix = sal_True;
                             }
                         }
                     }
@@ -820,7 +826,7 @@ SvNumberformat::SvNumberformat(String& rString,
                 if ( !bCancel )
                 {
                     rString.Erase(nPosOld,nPos-nPosOld);
-                    if (maLocale.meLanguage != 0)
+                    if ( bHasValidBracketPrefix )
                     {
                         rString.Insert(sStr,nPosOld);
                         nPos = nPosOld + sStr.Len();
-- 
1.7.3.4

From b597125fa5271c5c707a4945355035c1463c2ac4 Mon Sep 17 00:00:00 2001
From: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date: Fri, 29 Jul 2011 00:42:35 +0200
Subject: [PATCH 3/3] revert part of 6b5a84d339676d6e34c17cbefbec427e4559f37a

the patch caused some problems in the number format dialog, we can't add
an additional condition without new fallback
---
 svl/source/numbers/zformat.cxx |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index b567c20..8a267d7 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -812,7 +812,7 @@ SvNumberformat::SvNumberformat(String& rString,
                                 bCancel = sal_True;         // break for
                                 nCheckPos = nPosOld;
                             }
-                            else if (maLocale.meLanguage != 0)
+                            else
                             {
                                 sStr.AssignAscii( RTL_CONSTASCII_STRINGPARAM("$-") );
                                 sStr = sStr + maLocale.generateCode();
-- 
1.7.3.4


Context


Privacy Policy | Impressum (Legal Info) | Copyright information: Unless otherwise specified, all text and images on this website are licensed under the Creative Commons Attribution-Share Alike 3.0 License. This does not include the source code of LibreOffice, which is licensed under the Mozilla Public License (MPLv2). "LibreOffice" and "The Document Foundation" are registered trademarks of their corresponding registered owners or are in actual use as trademarks in one or more countries. Their respective logos and icons are also subject to international copyright laws. Use thereof is explained in our trademark policy.