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

New commits:
commit 59a848d274538980cf73ff3ee3f8acf417330288
Author:     Caolán McNamara <caolan.mcnam...@collabora.com>
AuthorDate: Mon Jul 28 16:06:19 2025 +0100
Commit:     Adolfo Jayme Barrientos <fit...@ubuntu.com>
CommitDate: Thu Aug 21 01:18:37 2025 +0200

    Resolves: tdf#167419 Changing the borders of a table doesn't refresh bottom
    
    The bottom border can remain un-refreshed. That border is outside the
    FrameArea of the table when the default CollapsingBorders is enabled.
    Add it in here for the last row when determining the area to repaint.
    
    Change-Id: I45cecd11e7d0d53905b3d6d6b3de83e1a28a468d
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/188480
    Reviewed-by: Caolán McNamara <caolan.mcnam...@collabora.com>
    Tested-by: Jenkins
    (cherry picked from commit e9abbdd178d6a01f6ecd8642920c52902312e470)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/189494
    Reviewed-by: Adolfo Jayme Barrientos <fit...@ubuntu.com>

diff --git a/sw/source/core/layout/layact.cxx b/sw/source/core/layout/layact.cxx
index 9374f4fd72a7..8fb5d154ac12 100644
--- a/sw/source/core/layout/layact.cxx
+++ b/sw/source/core/layout/layact.cxx
@@ -22,6 +22,7 @@
 
 #include <ctime>
 #include <rootfrm.hxx>
+#include <rowfrm.hxx>
 #include <pagefrm.hxx>
 #include <viewimp.hxx>
 #include <crsrsh.hxx>
@@ -1321,6 +1322,23 @@ bool SwLayAction::FormatLayout( OutputDevice 
*pRenderContext, SwLayoutFrame *pLa
                 SwPageFrame* pPageFrame = static_cast<SwPageFrame*>(pLay);
                 aPaint = pPageFrame->GetBoundRect(pRenderContext);
             }
+            else if (pLay->IsRowFrame())
+            {
+                // tdf#167419 Changing the borders of a table doesn't refresh
+                // the bottom border. That border is outside the FrameArea
+                // of the table when the default CollapsingBorders is enabled.
+                // Add it in here for the last row when determining the area
+                // to refresh.
+                const SwRowFrame* pRowFrame = static_cast<SwRowFrame*>(pLay);
+                const bool bLastRow = !pRowFrame->GetNext();
+                const SwTwips nBorderThicknessUnderArea = bLastRow ? 
pRowFrame->GetBottomLineSize() : 0;
+                if (nBorderThicknessUnderArea)
+                {
+                    const SwTabFrame* pTabFrame = pRowFrame->FindTabFrame();
+                    if (pTabFrame && pTabFrame->IsCollapsingBorders())
+                        aPaint.AddBottom(nBorderThicknessUnderArea);
+                }
+            }
 
             bool bPageInBrowseMode = pLay->IsPageFrame();
             if( bPageInBrowseMode )

Reply via email to