From cd4628ae161609b5372905ad6fbc618193a2d3ee Mon Sep 17 00:00:00 2001 From: Matteo Casalin Date: Thu, 21 Nov 2013 17:51:25 +0100 Subject: Clarify loop condition Change-Id: Ia6131a9964288e781bb76d59e24591b3cb375db9 --- sw/source/core/text/itratr.cxx | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'sw') diff --git a/sw/source/core/text/itratr.cxx b/sw/source/core/text/itratr.cxx index 6a608f4a88e8..743ce9e92ee2 100644 --- a/sw/source/core/text/itratr.cxx +++ b/sw/source/core/text/itratr.cxx @@ -1031,12 +1031,16 @@ sal_uInt16 SwTxtNode::GetWidthOfLeadingTabs() const sal_uInt16 nRet = 0; sal_Int32 nIdx = 0; - sal_Unicode cCh; - while ( nIdx < GetTxt().getLength() && - ( '\t' == ( cCh = GetTxt()[nIdx] ) || - ' ' == cCh ) ) + while ( nIdx < GetTxt().getLength() ) + { + const sal_Unicode cCh = GetTxt()[nIdx]; + if ( cCh!='\t' && cCh!=' ' ) + { + break; + } ++nIdx; + } if ( nIdx > 0 ) { -- cgit