summaryrefslogtreecommitdiff
path: root/sw/source/core/text/portxt.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/text/portxt.cxx')
-rw-r--r--sw/source/core/text/portxt.cxx15
1 files changed, 7 insertions, 8 deletions
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx
index 59a180ca0d98..ace126870b54 100644
--- a/sw/source/core/text/portxt.cxx
+++ b/sw/source/core/text/portxt.cxx
@@ -466,14 +466,13 @@ bool SwTextPortion::Format( SwTextFormatInfo &rInf )
// rInf.nIdx points to the next word, nIdx-1 is the portion's last char
void SwTextPortion::FormatEOL( SwTextFormatInfo &rInf )
{
- if( !(
- ( !GetNextPortion() || ( GetNextPortion()->IsKernPortion() &&
- !GetNextPortion()->GetNextPortion() ) ) &&
- GetLen() &&
- rInf.GetIdx() < TextFrameIndex(rInf.GetText().getLength()) &&
- TextFrameIndex(1) < rInf.GetIdx() &&
- ' ' == rInf.GetChar(rInf.GetIdx() - TextFrameIndex(1)) &&
- !rInf.GetLast()->IsHolePortion()) )
+ if( ( GetNextPortion() &&
+ ( !GetNextPortion()->IsKernPortion() || GetNextPortion()->GetNextPortion() ) ) ||
+ !GetLen() ||
+ rInf.GetIdx() >= TextFrameIndex(rInf.GetText().getLength()) ||
+ TextFrameIndex(1) >= rInf.GetIdx() ||
+ ' ' != rInf.GetChar(rInf.GetIdx() - TextFrameIndex(1)) ||
+ rInf.GetLast()->IsHolePortion() )
return;
// calculate number of blanks