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

Arnaud Versini arnaud.versini at gmail.com
Mon Jun 20 18:35:32 UTC 2016


 ucb/source/regexp/regexp.cxx |   10 ++--------
 1 file changed, 2 insertions(+), 8 deletions(-)

New commits:
commit 7e5b36af8c524671a30b91dd2323d812686aca2c
Author: Arnaud Versini <arnaud.versini at gmail.com>
Date:   Sun Jun 12 20:54:33 2016 +0200

    UCB: Simplify ucb_impl::Regexp rtl/character.hxx usage.
    
    Change-Id: I2298732602ad6f5acc040673f550040802ec580c
    Reviewed-on: https://gerrit.libreoffice.org/26328
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Arnaud Versini <arnaud.versini at libreoffice.org>

diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx
index fae2aee..28e5940 100644
--- a/ucb/source/regexp/regexp.cxx
+++ b/ucb/source/regexp/regexp.cxx
@@ -67,13 +67,7 @@ bool matchStringIgnoreCase(sal_Unicode const ** pBegin,
 
     while (q != qEnd)
     {
-        sal_Unicode c1 = *p++;
-        sal_Unicode c2 = *q++;
-        if (c1 >= 'a' && c1 <= 'z')
-            c1 -= 'a' - 'A';
-        if (c2 >= 'a' && c2 <= 'z')
-            c2 -= 'a' - 'A';
-        if (c1 != c2)
+        if (rtl::compareIgnoreAsciiCase(*p++, *q++) != 0)
             return false;
     }
 
@@ -183,7 +177,7 @@ bool isScheme(OUString const & rString, bool bColon)
             if (p == pEnd)
                 return !bColon;
             sal_Unicode c = *p++;
-            if (!(rtl::isAsciiAlpha(c) || rtl::isAsciiDigit(c)
+            if (!(rtl::isAsciiAlphanumeric(c)
                   || c == '+' || c == '-' || c == '.'))
                 return bColon && c == ':' && p == pEnd;
         }


More information about the Libreoffice-commits mailing list