diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-26 17:47:18 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2022-04-27 12:19:55 +0200 |
commit | d506ff97c25b5f433aa25d8b373f1a732af493d1 (patch) | |
tree | 600e211e3426a3b43407b01d6f93e5379d608b26 /oox | |
parent | 148f45253f75bc724804f3231a0b04b2d453e0c7 (diff) |
add string_view wrappers for rtl::math::stringToDouble
Change-Id: I114bec72cb933238675e539a8388a607226827cd
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/133455
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'oox')
-rw-r--r-- | oox/source/ppt/timenodelistcontext.cxx | 2 | ||||
-rw-r--r-- | oox/source/vml/vmlformatting.cxx | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/oox/source/ppt/timenodelistcontext.cxx b/oox/source/ppt/timenodelistcontext.cxx index 5a6535e314c5..ae35e8e4d7eb 100644 --- a/oox/source/ppt/timenodelistcontext.cxx +++ b/oox/source/ppt/timenodelistcontext.cxx @@ -304,7 +304,7 @@ namespace oox::ppt { } else if (msCommand.startsWith("playFrom")) { - const OUString aMediaTime( msCommand.copy( 9, msCommand.getLength() - 10 ) ); + std::u16string_view aMediaTime( msCommand.subView( 9, msCommand.getLength() - 10 ) ); rtl_math_ConversionStatus eStatus; double fMediaTime = ::rtl::math::stringToDouble( aMediaTime, u'.', u',', &eStatus ); if( eStatus == rtl_math_ConversionStatus_Ok ) diff --git a/oox/source/vml/vmlformatting.cxx b/oox/source/vml/vmlformatting.cxx index f3b29150b1b6..655069842eda 100644 --- a/oox/source/vml/vmlformatting.cxx +++ b/oox/source/vml/vmlformatting.cxx @@ -65,11 +65,11 @@ using ::com::sun::star::drawing::PolygonFlags_CONTROL; namespace { -bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, const OUString& rValue ) +bool lclExtractDouble( double& orfValue, sal_Int32& ornEndPos, std::u16string_view aValue ) { // extract the double value and find start position of unit characters rtl_math_ConversionStatus eConvStatus = rtl_math_ConversionStatus_Ok; - orfValue = ::rtl::math::stringToDouble( rValue, '.', '\0', &eConvStatus, &ornEndPos ); + orfValue = ::rtl::math::stringToDouble( aValue, '.', '\0', &eConvStatus, &ornEndPos ); return eConvStatus == rtl_math_ConversionStatus_Ok; } |