diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-17 09:20:21 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-09-17 13:23:19 +0200 |
commit | 1e202ec8aa177d427c5173c5290e09aec1e5c720 (patch) | |
tree | 46e06b6f4ee90f294ee95a35c29bbe37c8d89941 /vcl/source/control | |
parent | 087995401447a4d452e3daf147c02fb66c7b05c1 (diff) |
avoid some copying
Change-Id: I2e8da57f0fe048c3cf7288bf688f9411e62a1ffc
Reviewed-on: https://gerrit.libreoffice.org/79035
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'vcl/source/control')
-rw-r--r-- | vcl/source/control/field2.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vcl/source/control/field2.cxx b/vcl/source/control/field2.cxx index 373be2a0cd34..6d00e2898f04 100644 --- a/vcl/source/control/field2.cxx +++ b/vcl/source/control/field2.cxx @@ -2029,7 +2029,7 @@ bool TimeFormatter::TextToTime(const OUString& rStr, tools::Time& rTime, TimeFie } else { - nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).toString().toInt32()); + nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).makeStringAndClear().toInt32()); aStr.remove( 0, nSepPos+1 ); nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() ); @@ -2038,7 +2038,7 @@ bool TimeFormatter::TextToTime(const OUString& rStr, tools::Time& rTime, TimeFie if ( nSepPos >= 0 ) { nMinute = nSecond; - nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).toString().toInt32()); + nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).makeStringAndClear().toInt32()); aStr.remove( 0, nSepPos+1 ); nSepPos = aStr.indexOf( rLocaleDataWrapper.getTimeSep() ); @@ -2048,7 +2048,7 @@ bool TimeFormatter::TextToTime(const OUString& rStr, tools::Time& rTime, TimeFie { nHour = nMinute; nMinute = nSecond; - nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).toString().toInt32()); + nSecond = static_cast<short>(aStr.copy( 0, nSepPos ).makeStringAndClear().toInt32()); aStr.remove( 0, nSepPos+1 ); } else |