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

Mark Hung marklh9 at gmail.com
Fri Apr 7 10:31:38 UTC 2017


 sw/source/core/layout/ssfrm.cxx |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit b13a0a27444ffbf9ef45cb16ad69fdff0dc64306
Author: Mark Hung <marklh9 at gmail.com>
Date:   Thu Mar 16 00:28:35 2017 +0800

    tdf#106390 improve table in table and table in frame clipping.
    
    Set bottom of PaintArea() with the topmost botom of the upper
    frames, in case table might be cover by upper frame.
    
    Change-Id: Id379469114af2c3c5f844a69b584863f7dd7fd4c
    Reviewed-on: https://gerrit.libreoffice.org/35237
    Tested-by: Jenkins <ci at libreoffice.org>
    Reviewed-by: Miklos Vajna <vmiklos at collabora.co.uk>

diff --git a/sw/source/core/layout/ssfrm.cxx b/sw/source/core/layout/ssfrm.cxx
index 2a4fd7421347..fa2e5673ea49 100644
--- a/sw/source/core/layout/ssfrm.cxx
+++ b/sw/source/core/layout/ssfrm.cxx
@@ -562,6 +562,7 @@ const SwRect SwFrame::PaintArea() const
     SwRectFn fnRect = bVert ? ( IsVertLR() ? fnRectVertL2R : fnRectVert ) : fnRectHori;
     long nRight = (aRect.*fnRect->fnGetRight)();
     long nLeft  = (aRect.*fnRect->fnGetLeft)();
+    long nBottom = (aRect.*fnRect->fnGetBottom)();
     const SwFrame* pTmp = this;
     bool bLeft = true;
     bool bRight = true;
@@ -573,6 +574,7 @@ const SwRect SwFrame::PaintArea() const
             nRowSpan = static_cast<const SwCellFrame*>(pTmp)->GetTabBox()->getRowSpan();
         long nTmpRight = (pTmp->Frame().*fnRect->fnGetRight)();
         long nTmpLeft = (pTmp->Frame().*fnRect->fnGetLeft)();
+        long nTmpBottom = (pTmp->Frame().*fnRect->fnGetBottom)();
         if( pTmp->IsRowFrame() && nRowSpan > 1 )
         {
             const SwFrame* pNxt = pTmp;
@@ -588,6 +590,8 @@ const SwRect SwFrame::PaintArea() const
             pTmp->IsCellFrame() || pTmp->IsRowFrame() || //nobody leaves a table!
             pTmp->IsRootFrame() )
         {
+            if( nTmpBottom < nBottom )
+                nBottom = nTmpBottom;
             if( bLeft || nLeft < nTmpLeft )
                 nLeft = nTmpLeft;
             if( bRight || nTmpRight < nRight )
@@ -640,6 +644,7 @@ const SwRect SwFrame::PaintArea() const
     }
     (aRect.*fnRect->fnSetLeft)( nLeft );
     (aRect.*fnRect->fnSetRight)( nRight );
+    (aRect.*fnRect->fnSetBottom)( nBottom );
     return aRect;
 }
 


More information about the Libreoffice-commits mailing list