diff options
author | Frank Meies <fme@openoffice.org> | 2001-10-26 13:42:27 +0000 |
---|---|---|
committer | Frank Meies <fme@openoffice.org> | 2001-10-26 13:42:27 +0000 |
commit | c31e717e95c480f9ae95a080c30a6c2bd6a2b698 (patch) | |
tree | 5d655e4ff9631a6de08d60d28a75c6af0e19bfa4 /sw/source/core/text/portxt.cxx | |
parent | d2b887b5746d52d5227473fab2e8f9412da693fe (diff) |
Fix #93757#: Consider field contents during line break
Diffstat (limited to 'sw/source/core/text/portxt.cxx')
-rw-r--r-- | sw/source/core/text/portxt.cxx | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index 530febad838a..cd751a9ce65b 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -2,9 +2,9 @@ * * $RCSfile: portxt.cxx,v $ * - * $Revision: 1.15 $ + * $Revision: 1.16 $ * - * last change: $Author: fme $ $Date: 2001-08-20 13:08:45 $ + * last change: $Author: fme $ $Date: 2001-10-26 14:42:27 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -294,10 +294,14 @@ sal_Bool SwTxtPortion::_Format( SwTxtFormatInfo &rInf ) Width( KSHORT(rInf.Width() - rInf.X()) ); SetLen( aGuess.BreakPos() - rInf.GetIdx() ); - if( aGuess.BreakPos() < aGuess.BreakStart() && !InFldGrp() ) + + ASSERT( aGuess.BreakStart() >= aGuess.FieldDiff(), + "Trouble with expanded field portions during line break" ); + const xub_StrLen nRealStart = aGuess.BreakStart() - aGuess.FieldDiff(); + if( aGuess.BreakPos() < nRealStart && !InFldGrp() ) { SwHolePortion *pNew = new SwHolePortion( *this ); - pNew->SetLen( aGuess.BreakStart() - aGuess.BreakPos() ); + pNew->SetLen( nRealStart - aGuess.BreakPos() ); Insert( pNew ); } } |