diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-05-08 18:49:11 +0200 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2014-05-08 18:56:08 +0200 |
commit | 0fd4cc8ba7335e33515413f54b19455b376d5db9 (patch) | |
tree | 4efb8835b663d389113b7c9dbe795a8bbf3f3591 | |
parent | 88db0ab698055ce1ea37a3b200a425eee5b9f2f8 (diff) |
fdo#78444 sw: avoid incorrect right shrinking of repaint rectangle
The old condition was: set the right edge of the repaint rectangle, in
case the result would be wider than the original (if we repaint more,
that can't hurt regarding the end result) or in case the left edge was
set.
But that's problematic, the reproducer situation described in the bug
triggers a case when the right edge is shrunk too much, so part of the
painted letter is missing.
Fix that by only setting the right edge of the repaint rectangle when we
know that it won't shrink.
Change-Id: I33b78a929021b284d5283fc2c35e0b3c999fa224
-rw-r--r-- | sw/source/core/text/frmpaint.cxx | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx index fb41bab969ed..69eb30259dbd 100644 --- a/sw/source/core/text/frmpaint.cxx +++ b/sw/source/core/text/frmpaint.cxx @@ -432,7 +432,7 @@ SwRect SwTxtFrm::Paint() pRepaint->Left( pRepaint->GetOfst() ); l = pRepaint->GetRightOfst(); - if( l && ( pRepaint->GetOfst() || l > pRepaint->Right() ) ) + if( l && l > pRepaint->Right() ) pRepaint->Right( l ); pRepaint->SetOfst( 0 ); aRet = *pRepaint; |