diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-22 17:36:26 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-22 18:13:08 +0100 |
commit | 3635aec0c6595219946225cf02032c87b389db4c (patch) | |
tree | 3c795b510a00155419675e4e714b8c6185896686 /sw | |
parent | 9cd56129ab98653f3ce0b541a41572456514e242 (diff) |
fix export of ooo63048-1.sxw to .doc
I can't see that nCutPos = rInf.GetLen() makes a lot of sense, perhaps nCutPos
= rInf.GetIdx or nCutPos = rInf.GetLen() + rInf.GetIdx() makes more sense, but
nCutPos is only used in SwTxtPortion::BreakCut and the nLen has to be >= 0 to
be useful in there, so might as well straight-out flat invalidate it as -1 and
test for positive values in SwTxtPortion::BreakCut
Change-Id: Iad0c26efc47990cf2ffed54dc91207c3b8551096
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/text/guess.cxx | 2 | ||||
-rw-r--r-- | sw/source/core/text/portxt.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/sw/source/core/text/guess.cxx b/sw/source/core/text/guess.cxx index b379308e59b0..5484520817c5 100644 --- a/sw/source/core/text/guess.cxx +++ b/sw/source/core/text/guess.cxx @@ -201,7 +201,7 @@ bool SwTxtGuess::Guess( const SwTxtPortion& rPor, SwTxtFormatInfo &rInf, if ( rPor.IsFtnPortion() ) { nBreakPos = rInf.GetIdx(); - nCutPos = rInf.GetLen(); + nCutPos = -1; return false; } diff --git a/sw/source/core/text/portxt.cxx b/sw/source/core/text/portxt.cxx index c1c952f437a8..3573b0f51483 100644 --- a/sw/source/core/text/portxt.cxx +++ b/sw/source/core/text/portxt.cxx @@ -221,7 +221,7 @@ void SwTxtPortion::BreakCut( SwTxtFormatInfo &rInf, const SwTxtGuess &rGuess ) // We truncate ... const sal_uInt16 nLineWidth = (sal_uInt16)(rInf.Width() - rInf.X()); sal_Int32 nLen = rGuess.CutPos() - rInf.GetIdx(); - if( nLen ) + if (nLen > 0) { // special case: guess does not always provide the correct // width, only in common cases. |