sw/source/core/layout/paintfrm.cxx |    8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

New commits:
commit f9898fa64bd2a575be94c309b43373de53c5331b
Author:     László Németh <nem...@numbertext.org>
AuthorDate: Tue Jul 18 16:41:52 2023 +0200
Commit:     László Németh <nem...@numbertext.org>
CommitDate: Wed Jul 19 10:07:00 2023 +0200

    tdf#150308 sw: fix missing top table border after hidden table rows
    
    First visible line of a table with preceding hidden deleted rows
    hid also the top border of the table, if the inner horizontal row
    borders drawn only by bottom-only borders (like in the default table
    style).
    
    Note: re-use an existing workaround to show the missing line,
    see commit 3a4b7c3555f2ffb4e89502bb04ff063d8c08f628
    "fdo#39415: sw: fix collapsing border painting more:"
    
    Note: layout testing doesn't work, because of the missing calculation
    with the width of the enabled border of the row frame. Also there is
    a problem with metafile testing (empty meta file?).
    
    Change-Id: Ia8476a2ec592be1dc36e0ea71c10a71c257c29e0
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154595
    Tested-by: Jenkins
    Reviewed-by: László Németh <nem...@numbertext.org>

diff --git a/sw/source/core/layout/paintfrm.cxx 
b/sw/source/core/layout/paintfrm.cxx
index 69f78db19c59..117ac8eb5e61 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2805,6 +2805,8 @@ void SwTabFramePainter::FindStylesForLine( Point& 
rStartPoint,
 /**
  * Special case: #i9860#
  * first line in follow table without repeated headlines
+ * Special case: tdf#150308
+ * first visible line of a table with preceding hidden deleted rows
  */
 static bool lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(
         SwTabFrame const& rTabFrame, SwFrame const& rFrame, SvxBoxItem const& 
rBoxItem)
@@ -2813,7 +2815,11 @@ static bool 
lcl_IsFirstRowInFollowTableWithoutRepeatedHeadlines(
         dynamic_cast<const SwRowFrame*>(rFrame.GetUpper());
     return (pThisRowFrame
         && (pThisRowFrame->GetUpper() == &rTabFrame)
-        && rTabFrame.IsFollow()
+        && ( rTabFrame.IsFollow()
+            // tdf#150308 first table row isn't equal to the table row of the 
first
+            // row frame of the first table frame: there are invisible deleted 
rows
+            // in Hide Changes mode before the first visible table row
+            || rTabFrame.GetTable()->GetTabLines().front() != 
pThisRowFrame->GetTabLine() )
         && !rTabFrame.GetTable()->GetRowsToRepeat()
         &&  (  !pThisRowFrame->GetPrev()
             || static_cast<const SwRowFrame*>(pThisRowFrame->GetPrev())

Reply via email to