diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2013-03-25 16:24:48 +0100 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2013-03-25 17:33:29 +0100 |
commit | 40dcf2d713e67ef4d8c68a6df98954f1f0b783db (patch) | |
tree | 664e26d5a76f837cff2d31d0f026482e1ee7afb4 /sal/inc | |
parent | bd60d41176da540b01d7583cfe00637431967f39 (diff) |
Add test case for toInt overflow detection
Change-Id: I1c5b66888baac8aa1bc99c06579e0ef3638a4877
Diffstat (limited to 'sal/inc')
-rw-r--r-- | sal/inc/rtl/string.hxx | 9 | ||||
-rw-r--r-- | sal/inc/rtl/ustring.hxx | 9 |
2 files changed, 12 insertions, 6 deletions
diff --git a/sal/inc/rtl/string.hxx b/sal/inc/rtl/string.hxx index 01ee46477f34..f6cec59dc04e 100644 --- a/sal/inc/rtl/string.hxx +++ b/sal/inc/rtl/string.hxx @@ -1349,7 +1349,8 @@ public: @param radix the radix (between 2 and 36) @return the int32 represented from this string. - 0 if this string represents no number. + 0 if this string represents no number or one of too large + magnitude. */ sal_Int32 toInt32( sal_Int16 radix = 10 ) const SAL_THROW(()) { @@ -1363,7 +1364,8 @@ public: @param radix the radix (between 2 and 36) @return the int64 represented from this string. - 0 if this string represents no number. + 0 if this string represents no number or one of too large + magnitude. */ sal_Int64 toInt64( sal_Int16 radix = 10 ) const SAL_THROW(()) { @@ -1377,7 +1379,8 @@ public: @param radix the radix (between 2 and 36) @return the uint64 represented from this string. - 0 if this string represents no number. + 0 if this string represents no number or one of too large + magnitude. @since LibreOffice 4.1 */ diff --git a/sal/inc/rtl/ustring.hxx b/sal/inc/rtl/ustring.hxx index 2afd95cc62f0..768f5521303d 100644 --- a/sal/inc/rtl/ustring.hxx +++ b/sal/inc/rtl/ustring.hxx @@ -1828,7 +1828,8 @@ public: @param radix the radix (between 2 and 36) @return the int32 represented from this string. - 0 if this string represents no number. + 0 if this string represents no number or one of too large + magnitude. */ sal_Int32 toInt32( sal_Int16 radix = 10 ) const SAL_THROW(()) { @@ -1842,7 +1843,8 @@ public: @param radix the radix (between 2 and 36) @return the int64 represented from this string. - 0 if this string represents no number. + 0 if this string represents no number or one of too large + magnitude. */ sal_Int64 toInt64( sal_Int16 radix = 10 ) const SAL_THROW(()) { @@ -1856,7 +1858,8 @@ public: @param radix the radix (between 2 and 36) @return the uint64 represented from this string. - 0 if this string represents no number. + 0 if this string represents no number or one of too large + magnitude. @since LibreOffice 4.1 */ |