[Libreoffice-commits] core.git: Branch 'libreoffice-7-0' - sw/qa sw/source

Justin Luth (via logerrit) logerrit at kemper.freedesktop.org
Wed Jun 3 13:49:13 UTC 2020


 dev/null                         |binary
 sw/qa/extras/layout/layout.cxx   |    9 ---------
 sw/source/core/layout/tabfrm.cxx |   16 +---------------
 3 files changed, 1 insertion(+), 24 deletions(-)

New commits:
commit 0fe109a27c9a1b10b0b8a3314cb55926ecf103ae
Author:     Justin Luth <justin.luth at collabora.com>
AuthorDate: Sat May 30 14:20:02 2020 +0300
Commit:     Justin Luth <justin_luth at sil.org>
CommitDate: Wed Jun 3 15:48:44 2020 +0200

    Revert "tdf#105478 sw layout: treat minHeight as "do not split row""
    
    This reverts LO7.0 commit aa5dc0b48cd4db6883c9b52c68b16170c9c81d1f,
    in order to prevent regressions like tdf#133441.
    
    Change-Id: Id08f5277621703e1577fc9db917841b8b7c0bda5
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95180
    Tested-by: Jenkins
    Reviewed-by: Justin Luth <justin_luth at sil.org>
    (cherry picked from commit 4e81ef96e3e1c10ca5162e4e4971c803780a75b4)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/95327

diff --git a/sw/qa/extras/layout/data/tdf105478_rowMinHeight.odt b/sw/qa/extras/layout/data/tdf105478_rowMinHeight.odt
deleted file mode 100644
index 3a7fd600ceee..000000000000
Binary files a/sw/qa/extras/layout/data/tdf105478_rowMinHeight.odt and /dev/null differ
diff --git a/sw/qa/extras/layout/layout.cxx b/sw/qa/extras/layout/layout.cxx
index b896df2e03d4..96c6edc51634 100644
--- a/sw/qa/extras/layout/layout.cxx
+++ b/sw/qa/extras/layout/layout.cxx
@@ -2841,15 +2841,6 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTableExtrusion2)
     assertXPath(pXmlDoc, sXPath, 0);
 }
 
-CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf105478)
-{
-    createDoc("tdf105478_rowMinHeight.odt");
-    xmlDocUniquePtr pXmlDoc = parseLayoutDump();
-
-    // Minimum row height forces the cell (with table header as row 1) to start on page 2, not page 1.
-    assertXPathContent(pXmlDoc, "/root/page[2]/body/tab/row[2]/cell/txt[1]", "Cell 1");
-}
-
 CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf116848)
 {
     SwDoc* pDoc = createDoc("tdf116848.odt");
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index b0376110a433..f4aed1ed650d 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1091,21 +1091,7 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
         m_pTable->SetRowsToRepeat(0);
         return false;
     }
-
-    // Minimum row height has the same force as "do not split row" (as long as it fits on one page)
-    if ( bSplitRowAllowed && bTryToSplit && !pRow->IsRowSpanLine() )
-    {
-        const SwFormatFrameSize &rSz = pRow->GetFormat()->GetFrameSize();
-        const sal_Int32 nMinHeight = rSz.GetHeightSizeType() == SwFrameSize::Minimum ? rSz.GetHeight() : 0;
-        if ( nMinHeight > nRemainingSpaceForLastRow )
-        {
-            // TODO: what if we are not in a page, but a column or something that is not page-sized.
-            const sal_Int32 nFullPageHeight = FindPageFrame()->getFramePrintArea().Height();
-            bSplitRowAllowed = nMinHeight > nFullPageHeight;
-        }
-    }
-
-    if ( !GetIndPrev() && nRepeat == nRowCount )
+    else if ( !GetIndPrev() && nRepeat == nRowCount )
     {
         // Second case: The first non-headline row does not fit to the page.
         // If it is not allowed to be split, or it contains a sub-row that


More information about the Libreoffice-commits mailing list