[Libreoffice-commits] core.git: svl/source

Eike Rathke erack at redhat.com
Thu Apr 18 15:50:31 PDT 2013


 svl/source/numbers/zforscan.cxx |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

New commits:
commit fa72fc3eddbfabb82193452a4ba993b11d1584da
Author: Eike Rathke <erack at redhat.com>
Date:   Fri Apr 19 00:47:57 2013 +0200

    OUString::startsWith() is not equivalent to String::Match()
    
    String::Match() wasn't quite right at that place either, but..
    
    Change-Id: I1aed325340f5f36973ef2da8fd48af3283c0b79b

diff --git a/svl/source/numbers/zforscan.cxx b/svl/source/numbers/zforscan.cxx
index 43a4bbc..a0d44db 100644
--- a/svl/source/numbers/zforscan.cxx
+++ b/svl/source/numbers/zforscan.cxx
@@ -481,9 +481,9 @@ Color* ImpSvNumberformatScan::GetColor(OUString& sStr)
     if (i >= NF_MAX_DEFAULT_COLORS)
     {
         const OUString& rColorWord = rKeyword[NF_KEY_COLOR];
-        sal_Int32 nPos = sString.startsWith(rColorWord);
-        if (nPos > 0)
+        if (sString.startsWith(rColorWord))
         {
+            sal_Int32 nPos = rColorWord.getLength();
             sStr = sStr.copy(nPos);
             sStr = comphelper::string::strip(sStr, ' ');
             if (bConvertMode)


More information about the Libreoffice-commits mailing list