[Libreoffice-commits] core.git: sw/source
Miklos Vajna
vmiklos at collabora.co.uk
Thu May 8 09:56:34 PDT 2014
sw/source/core/text/frmpaint.cxx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
New commits:
commit 0fd4cc8ba7335e33515413f54b19455b376d5db9
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date: Thu May 8 18:49:11 2014 +0200
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
diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index fb41bab..69eb302 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;
More information about the Libreoffice-commits
mailing list