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

New commits:
commit 0eb44f8c6ad764d8c2d044603f8f2aa84e3c7892
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: Thu Jul 20 00:31:37 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>
    (cherry picked from commit 379acb934164e673b708d0f3ec6b3ec046c8d73f)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154612
    Tested-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 47e56b390712..0a43dbb587ab 100644
--- a/sw/source/core/layout/paintfrm.cxx
+++ b/sw/source/core/layout/paintfrm.cxx
@@ -2804,6 +2804,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)
@@ -2812,7 +2814,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