summaryrefslogtreecommitdiff
path: root/comphelper/source
diff options
context:
space:
mode:
authorSébastien Le Ray <sebastien-libreoffice@orniz.org>2011-02-17 10:43:08 +0100
committerCaolán McNamara <caolanm@redhat.com>2011-02-18 10:20:19 +0000
commitb0bb3a1bdad7aee9eab79c4ec3c155a4bbd8623f (patch)
treee257a3974ef9ff168dfc5570057ef00835597988 /comphelper/source
parenta6ba342adec9edad3e4bcf4d614d3525b4e66186 (diff)
Use decimalStringToNumber for natural comparison
Diffstat (limited to 'comphelper/source')
-rw-r--r--comphelper/source/misc/string.cxx4
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)