filter/source/msfilter/escherex.cxx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-)
New commits: commit 930fd6e97d80545c4641530eaa6ef8da16033297 Author: Matteo Casalin <matteo.casa...@yahoo.com> AuthorDate: Wed Mar 13 23:46:51 2019 +0100 Commit: Matteo Casalin <matteo.casa...@yahoo.com> CommitDate: Thu Mar 14 22:51:49 2019 +0100 Use indexed getToken() Change-Id: I0ed7bbd66f220ac28ad25ed301a50054c4c47008 Reviewed-on: https://gerrit.libreoffice.org/69247 Tested-by: Jenkins Reviewed-by: Matteo Casalin <matteo.casa...@yahoo.com> diff --git a/filter/source/msfilter/escherex.cxx b/filter/source/msfilter/escherex.cxx index e4d230e3a3ea..8abcf7c64416 100644 --- a/filter/source/msfilter/escherex.cxx +++ b/filter/source/msfilter/escherex.cxx @@ -932,8 +932,8 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart, } if ( !bIsMapped && comphelper::string::getTokenCount(aArrowStartName, ' ') == 2 ) { - bool b = true; - OUString aArrowName( aArrowStartName.getToken( 0, ' ' ) ); + sal_Int32 nIdx{ 0 }; + OUString aArrowName( aArrowStartName.getToken( 0, ' ', nIdx ) ); if ( aArrowName == "msArrowEnd" ) reLineEnd = ESCHER_LineArrowEnd; else if ( aArrowName == "msArrowOpenEnd" ) @@ -945,12 +945,12 @@ bool EscherPropertyContainer::GetLineArrow( const bool bLineStart, else if ( aArrowName == "msArrowOvalEnd" ) reLineEnd = ESCHER_LineArrowOvalEnd; else - b = false; + nIdx = -1; // now we have the arrow, and try to determine the arrow size; - if ( b ) + if ( nIdx>0 ) { - OUString aArrowSize( aArrowStartName.getToken( 1, ' ' ) ); + OUString aArrowSize( aArrowStartName.getToken( 0, ' ', nIdx ) ); sal_Int32 nArrowSize = aArrowSize.toInt32(); rnArrowWidth = ( nArrowSize - 1 ) / 3; rnArrowLength = nArrowSize - ( rnArrowWidth * 3 ) - 1; _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits