sw/qa/core/layout/data/floattable-2cols.docx            |binary
 sw/qa/core/layout/data/floattable-compat14-body.docx    |binary
 sw/qa/core/layout/data/floattable-compat14-nosplit.docx |binary
 sw/qa/core/layout/data/floattable-compat14.docx         |binary
 sw/qa/core/layout/data/floattable-footer-2rows.docx     |binary
 sw/qa/core/layout/data/floattable-footer.docx           |binary
 sw/qa/core/layout/data/floattable-widow.docx            |binary
 sw/qa/extras/ooxmlexport/ooxmlexport14.cxx              |   10 ++++++++++
 8 files changed, 10 insertions(+)

New commits:
commit a1f7f54202ed610da60e58d18af552ae39f5603a
Author:     László Németh <[email protected]>
AuthorDate: Thu Jun 29 11:13:28 2023 +0200
Commit:     Miklos Vajna <[email protected]>
CommitDate: Mon Jul 10 13:52:31 2023 +0200

    tdf#146346 fix unit test & extend it to empty multi-page footnote
    
    Implementing multi-page floating tables resulted a partial
    regression here: not last table of the footnote, but empty
    paragraph under it resulted an empty split footnote on the
    second page, without noticing the problem.
    
    Problem with the previous unit test of tdf#146346 was
    reported by Mike Kaganski: "using getPages, does *not*
    fail when there are two pages - because getPages is
    (problematically) implemented as jumping to the end of
    the document (body!), and texting which page is this; and
    for the original problem, only a part of footnotes moved
    to the second page, while all the body text was on the page 1."
    
    Add unit test to catch the original problem (all tables of the
    footnote must be on the first page), which fix likely wasn't
    tested correctly using only getPages(), also add a (disabled) test
    for the new regression, too.
    
    Follow-up to commit d1ac8df139a2a65db45d1970ccc0b80e17d827f6
    "tdf#146346 DOCX import: fix table margins in footnotes".
    
    (cherry picked from commit 7520349b61a74e93a1d5d992f41b60631c3c5937)
    
    [ Miklos: also now CppunitTest_sw_core_layout would fail, so pick a
    number of test document updates from commit
    fc1b9ab2913bc8c2d8414b6d8de3ceed3910c5d8 (tdf#133560: re-anchor objects,
    to use paragraph's dispose for bEndOfDocument, 2023-06-23) from master,
    too. ]
    
    Change-Id: I6006db3fe2b5e6f7029a8a2d5d9cf99a17ec2ad2
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154237
    Tested-by: Jenkins CollaboraOffice <[email protected]>
    Reviewed-by: Miklos Vajna <[email protected]>

diff --git a/sw/qa/core/layout/data/floattable-2cols.docx 
b/sw/qa/core/layout/data/floattable-2cols.docx
index c43779f2aac9..b55bc8dd49b8 100644
Binary files a/sw/qa/core/layout/data/floattable-2cols.docx and 
b/sw/qa/core/layout/data/floattable-2cols.docx differ
diff --git a/sw/qa/core/layout/data/floattable-compat14-body.docx 
b/sw/qa/core/layout/data/floattable-compat14-body.docx
index 134128348ce2..fc25b867afc9 100644
Binary files a/sw/qa/core/layout/data/floattable-compat14-body.docx and 
b/sw/qa/core/layout/data/floattable-compat14-body.docx differ
diff --git a/sw/qa/core/layout/data/floattable-compat14-nosplit.docx 
b/sw/qa/core/layout/data/floattable-compat14-nosplit.docx
index 7d24d95aa92f..bd3f09c69e65 100644
Binary files a/sw/qa/core/layout/data/floattable-compat14-nosplit.docx and 
b/sw/qa/core/layout/data/floattable-compat14-nosplit.docx differ
diff --git a/sw/qa/core/layout/data/floattable-compat14.docx 
b/sw/qa/core/layout/data/floattable-compat14.docx
index 5afb0af477d8..19221609ddee 100644
Binary files a/sw/qa/core/layout/data/floattable-compat14.docx and 
b/sw/qa/core/layout/data/floattable-compat14.docx differ
diff --git a/sw/qa/core/layout/data/floattable-footer-2rows.docx 
b/sw/qa/core/layout/data/floattable-footer-2rows.docx
index 72013be28fbd..0d3db047c125 100644
Binary files a/sw/qa/core/layout/data/floattable-footer-2rows.docx and 
b/sw/qa/core/layout/data/floattable-footer-2rows.docx differ
diff --git a/sw/qa/core/layout/data/floattable-footer.docx 
b/sw/qa/core/layout/data/floattable-footer.docx
index 52cc73b17dfb..731e4fdb23a5 100644
Binary files a/sw/qa/core/layout/data/floattable-footer.docx and 
b/sw/qa/core/layout/data/floattable-footer.docx differ
diff --git a/sw/qa/core/layout/data/floattable-widow.docx 
b/sw/qa/core/layout/data/floattable-widow.docx
index 4a70c942c976..c3f17e6cd9ed 100644
Binary files a/sw/qa/core/layout/data/floattable-widow.docx and 
b/sw/qa/core/layout/data/floattable-widow.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx 
b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
index c6949b14e6bc..5cc20d556853 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport14.cxx
@@ -1348,6 +1348,16 @@ DECLARE_OOXMLEXPORT_TEST(testTdf146346, "tdf146346.docx")
 {
     // This was 2 (by bad docDefault vertical margins around tables in 
footnotes)
     CPPUNIT_ASSERT_EQUAL(1, getPages());
+
+    // only first page has table
+    xmlDocUniquePtr pXmlDoc = parseLayoutDump();
+
+    // check first page: all tables on the first page
+    assertXPath(pXmlDoc, "/root/page[1]//anchored/fly", 8);
+    assertXPath(pXmlDoc, "/root/page[1]//anchored/fly/tab", 8);
+
+    // FIXME no second page (regression since multi-page floating tables?)
+    //assertXPath(pXmlDoc, "/root/page[2]", 0);
 }
 #endif
 

Reply via email to