diff options
author | Sébastien Le Ray <sebastien-libreoffice@orniz.org> | 2011-02-17 10:43:08 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2011-02-18 10:20:19 +0000 |
commit | b0bb3a1bdad7aee9eab79c4ec3c155a4bbd8623f (patch) | |
tree | e257a3974ef9ff168dfc5570057ef00835597988 /comphelper/source | |
parent | a6ba342adec9edad3e4bcf4d614d3525b4e66186 (diff) |
Use decimalStringToNumber for natural comparison
Diffstat (limited to 'comphelper/source')
-rw-r--r-- | comphelper/source/misc/string.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/comphelper/source/misc/string.cxx b/comphelper/source/misc/string.cxx index 0671e9e7bec8..6f088f4bbdc6 100644 --- a/comphelper/source/misc/string.cxx +++ b/comphelper/source/misc/string.cxx @@ -275,8 +275,8 @@ sal_Int32 compareNatural( const ::rtl::OUString & rLHS, const ::rtl::OUString & //numbers outside of the normal 0-9 range, e.g. see GetLocalizedChar in //vcl - sal_Int32 nLHS = rLHS.copy(nLHSFirstDigitPos, nLHSChunkLen).toInt32(); - sal_Int32 nRHS = rRHS.copy(nRHSFirstDigitPos, nRHSChunkLen).toInt32(); + sal_uInt32 nLHS = comphelper::string::decimalStringToNumber(rLHS.copy(nLHSFirstDigitPos, nLHSChunkLen)); + sal_uInt32 nRHS = comphelper::string::decimalStringToNumber(rRHS.copy(nRHSFirstDigitPos, nRHSChunkLen)); nRet = nLHS-nRHS; if (nRet != 0) |