diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-30 08:41:43 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-10-31 07:02:09 +0100 |
commit | ab35d2ded153b0129fed16f9a7e882c8600933e6 (patch) | |
tree | 13f1776117f743c34761b6a31ca93f80020e20d3 /xmloff/source/text/XMLTextColumnsContext.cxx | |
parent | 877d0c2c211067e8c1b5fdff0f6d9703c94767e9 (diff) |
tdf#125688 speed up load of change-tracking ODS
by 10%, by avoiding an OUString construction in a hot path
through
XMLTextColumnContext_Impl::XMLTextColumnContext_Impl
-> sax::Convert::convertNumber
Also changed XMLTextAnimationStepPropertyHdl::importXML
to take advantage of the modified convertNumber passing
convention.
Change-Id: I4e5503dbb094c88a09af8b6dc8c22b6c53f9eb75
Reviewed-on: https://gerrit.libreoffice.org/81726
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'xmloff/source/text/XMLTextColumnsContext.cxx')
-rw-r--r-- | xmloff/source/text/XMLTextColumnsContext.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/xmloff/source/text/XMLTextColumnsContext.cxx b/xmloff/source/text/XMLTextColumnsContext.cxx index 66798582b27f..b62b66fde137 100644 --- a/xmloff/source/text/XMLTextColumnsContext.cxx +++ b/xmloff/source/text/XMLTextColumnsContext.cxx @@ -137,10 +137,11 @@ XMLTextColumnContext_Impl::XMLTextColumnContext_Impl( sal_Int32 nPos = rValue.indexOf( '*' ); if( nPos != -1 && nPos+1 == rValue.getLength() ) { - OUString sTmp( rValue.copy( 0, nPos ) ); if (::sax::Converter::convertNumber( - nVal, sTmp, 0, USHRT_MAX)) - aColumn.Width = nVal; + nVal, + std::u16string_view(rValue).substr(0, nPos), + 0, USHRT_MAX)) + aColumn.Width = nVal; } } break; |