diff options
author | Arnaud VERSINI <arnaud.versini@pm.me> | 2024-05-01 17:23:11 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2024-05-02 10:02:37 +0200 |
commit | 7b8ef7cf923c5dfbc54871e88b780ddaeb9436c5 (patch) | |
tree | cae5f6e5e6c9e7d1d5c2bf32d3adb5f196af3dc5 /i18npool | |
parent | fc7f8714956cb37f9243df21e57a079d057e46c6 (diff) |
i18npoool : use rtl::isAsciiDigit instead of local isnumber
Change-Id: I1e9df1b048169767e649fc825f7a49dac16c040f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/166969
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'i18npool')
-rw-r--r-- | i18npool/source/transliteration/transliteration_Numeric.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/i18npool/source/transliteration/transliteration_Numeric.cxx b/i18npool/source/transliteration/transliteration_Numeric.cxx index e0717379ed4c..fb01072a2302 100644 --- a/i18npool/source/transliteration/transliteration_Numeric.cxx +++ b/i18npool/source/transliteration/transliteration_Numeric.cxx @@ -22,6 +22,7 @@ #include <transliteration_Numeric.hxx> #include <nativenumbersupplier.hxx> +#include <rtl/character.hxx> #include <rtl/ref.hxx> using namespace com::sun::star::i18n; @@ -54,7 +55,6 @@ Sequence< OUString > SAL_CALL } -#define isNumber(c) ((c) >= 0x30 && (c) <= 0x39) #define NUMBER_ZERO 0x30 OUString @@ -74,7 +74,7 @@ transliteration_Numeric::transliterateBullet( std::u16string_view inStr, sal_Int auto ppOffset = pOffset ? pOffset->getArray() : nullptr; for (sal_Int32 i = startPos; i < endPos; i++) { - if (isNumber(inStr[i])) + if (rtl::isAsciiDigit(inStr[i])) { if (number == -1) { startPos = i; @@ -127,7 +127,7 @@ sal_Unicode SAL_CALL transliteration_Numeric::transliterateChar2Char( sal_Unicode inChar ) { if (tableSize) { - if (isNumber(inChar)) { + if (rtl::isAsciiDigit(inChar)) { sal_Int16 number = inChar - NUMBER_ZERO; if (number <= tableSize || recycleSymbol) return table[--number % tableSize]; |