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


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/2694

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/94/2694/1

Resolves: #i119943 Underline can not work with ";" in format code

the semicolon will always be regarded as separator

Patch by: Zhang Lu
Review by: Wang Lei(cherry picked from commit 953b282dbb2552f89ec25455ec838f752abd6a2d)

Conflicts:
        svl/source/numbers/zformat.cxx

Resolves: #i119943 Underline can not work with ";" in format code

the semicolon will always be regarded as separator

Patch by: Zhang Lu
Review by: Wang Lei(cherry picked from commit 423e8bc4e684a0790765aa2898bc2843538bc114)

Signed-off-by: Fridrich Štrba <fridrich.strba@bluewin.ch>

Conflicts:
        svl/source/numbers/zformat.cxx

Change-Id: I1112739fb27939a66d22f198ec9c3a34f383bd9c
(cherry picked from commit c26bae0b168acaa5702be43a9748457f5d0eafa0)
---
M svl/source/numbers/zformat.cxx
1 file changed, 17 insertions(+), 1 deletion(-)



diff --git a/svl/source/numbers/zformat.cxx b/svl/source/numbers/zformat.cxx
index b9dfc17..1a6e05a 100644
--- a/svl/source/numbers/zformat.cxx
+++ b/svl/source/numbers/zformat.cxx
@@ -1292,6 +1292,22 @@
     return sal_Unicode(c);
 }
 
+bool IsSingleSymbol(OUStringBuffer& rStringBuffer, xub_StrLen nPos)
+{
+    bool ret = false;
+    while(nPos > 0)
+    {
+        if(rStringBuffer[nPos] == '*' || rStringBuffer[nPos] == '\\' || rStringBuffer[nPos] == '_')
+        {
+            ret = !ret;
+            nPos--;
+        }
+        else
+            return ret;
+    }
+    return ret;
+}
+
 } // namespace
 
 OUString SvNumberformat::LocaleType::generateCode() const
@@ -1540,7 +1556,7 @@
             }
             break;
         case SsGetString:
-            if (cToken == ';')
+            if (cToken == ';' && (nPos>=2) && !IsSingleSymbol(rString, nPos-2))
             {
                 eState = SsStop;
             }

-- 
To view, visit https://gerrit.libreoffice.org/2694
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1112739fb27939a66d22f198ec9c3a34f383bd9c
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: libreoffice-4-0
Gerrit-Owner: Fridrich Strba <fridrich@documentfoundation.org>


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.