diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-11-21 17:51:25 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2013-11-23 14:20:36 +0100 |
commit | cd4628ae161609b5372905ad6fbc618193a2d3ee (patch) | |
tree | 2bc8d53b9041a1970749e6a3fb76bc39dd4d1e6e /sw | |
parent | c936dace9ad275debc300afe09bb96c939e2b6c0 (diff) |
Clarify loop condition
Change-Id: Ia6131a9964288e781bb76d59e24591b3cb375db9
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/itratr.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
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 ) { |