From 1f09bf7bee753d34953fcefd6e2ee05797bf4b0a Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Tue, 27 Sep 2022 14:47:25 +0100 Subject: crashtesting: assert on converting ooo64499-3.sxc to ods MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit a problem since: commit 776ea34deefe7bdce2fb8a06e5c55ef27ec87ea7 Date: Wed Sep 21 11:09:46 2022 +0200 use more string_view in xmloff Change-Id: Ifec0f4c84373aa4501acfde2fd357fd749f836c1 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/140654 Tested-by: Jenkins Reviewed-by: Caolán McNamara --- xmloff/source/chart/SchXMLChartContext.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'xmloff/source') diff --git a/xmloff/source/chart/SchXMLChartContext.cxx b/xmloff/source/chart/SchXMLChartContext.cxx index 2fe91b2026a1..7a8ac46c40a9 100644 --- a/xmloff/source/chart/SchXMLChartContext.cxx +++ b/xmloff/source/chart/SchXMLChartContext.cxx @@ -182,12 +182,12 @@ uno::Sequence< sal_Int32 > lcl_getNumberSequenceFromString( std::u16string_view while( nPos != std::u16string_view::npos ) { nPos = rStr.find( aSpace, nLastPos ); - if( nPos > nLastPos ) - { - aVec.push_back( o3tl::toInt32(rStr.substr( nLastPos, (nPos - nLastPos) )) ); - } if( nPos != std::u16string_view::npos ) + { + if( nPos > nLastPos ) + aVec.push_back( o3tl::toInt32(rStr.substr( nLastPos, (nPos - nLastPos) )) ); nLastPos = nPos + 1; + } } // last entry if( nLastPos != 0 && -- cgit