diff options
author | Arnaud Versini <arnaud.versini@gmail.com> | 2016-06-12 20:54:33 +0200 |
---|---|---|
committer | Arnaud Versini <arnaud.versini@libreoffice.org> | 2016-06-20 18:35:11 +0000 |
commit | 7e5b36af8c524671a30b91dd2323d812686aca2c (patch) | |
tree | d45c0197d21535e043d2b274d76bb76bf640f87f /ucb | |
parent | fe63bcdf700e4fe5c3c3ed8721f9748ecb7aaf34 (diff) |
UCB: Simplify ucb_impl::Regexp rtl/character.hxx usage.
Change-Id: I2298732602ad6f5acc040673f550040802ec580c
Reviewed-on: https://gerrit.libreoffice.org/26328
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Arnaud Versini <arnaud.versini@libreoffice.org>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/regexp/regexp.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/ucb/source/regexp/regexp.cxx b/ucb/source/regexp/regexp.cxx index fae2aee293be..28e59401856a 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; } |