diff options
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/field2.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 67c0357a8ebf..95dff5f634e2 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -1195,7 +1195,7 @@ static sal_uInt16 ImplCutNumberFromString( OUString& rStr ) while (i2 != rStr.getLength() && rStr[i2] >= '0' && rStr[i2] <= '9') { ++i2; } - sal_Int32 nValue = rStr.copy(i1, i2-i1).toInt32(); + sal_Int32 nValue = comphelper::string::toInt32(rStr.subView(i1, i2-i1)); rStr = rStr.copy(std::min(i2+1, rStr.getLength())); return nValue; } @@ -2410,7 +2410,7 @@ bool TimeFormatter::TextToTime(std::u16string_view rStr, tools::Time& rTime, } else { - nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).makeStringAndClear().toInt32()); + nSecond = static_cast<short>(comphelper::string::toInt32(aStr.subView( 0, nSepPos ))); aStr.remove( 0, nSepPos+1 ); nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() ); @@ -2419,7 +2419,7 @@ bool TimeFormatter::TextToTime(std::u16string_view rStr, tools::Time& rTime, if ( nSepPos >= 0 ) { nMinute = nSecond; - nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).makeStringAndClear().toInt32()); + nSecond = static_cast<short>(comphelper::string::toInt32(aStr.subView( 0, nSepPos ))); aStr.remove( 0, nSepPos+1 ); nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() ); @@ -2429,7 +2429,7 @@ bool TimeFormatter::TextToTime(std::u16string_view rStr, tools::Time& rTime, { nHour = nMinute; nMinute = nSecond; - nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).makeStringAndClear().toInt32()); + nSecond = static_cast<short>(comphelper::string::toInt32(aStr.subView( 0, nSepPos ))); aStr.remove( 0, nSepPos+1 ); } else |