[Libreoffice-commits] core.git: sw/source

Miklos Vajna vmiklos at collabora.co.uk
Mon May 12 08:26:26 PDT 2014


 sw/source/core/text/frmpaint.cxx |    8 ++++++++
 1 file changed, 8 insertions(+)

New commits:
commit f7b88a2b03122360b2e60e2afa453603022d28df
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Mon May 12 17:11:37 2014 +0200

    fdo#78608 SwTxtFrm::Paint: fix missing repaint problem on the left edge
    
    Change-Id: Iba66a82e4a92a0afe1ad923cf4e0922730bd03de

diff --git a/sw/source/core/text/frmpaint.cxx b/sw/source/core/text/frmpaint.cxx
index 69eb302..112c148 100644
--- a/sw/source/core/text/frmpaint.cxx
+++ b/sw/source/core/text/frmpaint.cxx
@@ -437,6 +437,14 @@ SwRect SwTxtFrm::Paint()
         pRepaint->SetOfst( 0 );
         aRet = *pRepaint;
 
+        // In case our left edge is the same as the body frame's left edge,
+        // then extend the rectangle to include the page margin as well,
+        // otherwise some font will be clipped.
+        SwLayoutFrm* pBodyFrm = GetUpper();
+        if (pBodyFrm->IsBodyFrm() && aRet.Left() == (pBodyFrm->Frm().Left() + pBodyFrm->Prt().Left()))
+            if (SwLayoutFrm* pPageFrm = pBodyFrm->GetUpper())
+                aRet.Left(pPageFrm->Frm().Left());
+
         if ( IsRightToLeft() )
             SwitchLTRtoRTL( aRet );
 


More information about the Libreoffice-commits mailing list