[Libreoffice-commits] core.git: Branch 'distro/nisz/libreoffice-6-4' - sw/qa sw/source
László Németh (via logerrit)
logerrit at kemper.freedesktop.org
Thu Jun 11 12:01:56 UTC 2020
sw/qa/extras/ooxmlexport/data/tdf88496.docx |binary
sw/qa/extras/ooxmlexport/ooxmlexport11.cxx | 10 ++++++++++
sw/source/core/layout/tabfrm.cxx | 7 ++++---
3 files changed, 14 insertions(+), 3 deletions(-)
New commits:
commit 814da1724b61a106ab82e8dd1836e3b2f628cf4e
Author: László Németh <nemeth at numbertext.org>
AuthorDate: Thu Jan 16 21:14:45 2020 +0100
Commit: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
CommitDate: Thu Jun 11 14:01:24 2020 +0200
tdf#88496 DOCX: disable long repeating table header
if the pages could contain only that, hiding the
non-repeating table rows. This behavior is similar
to MSO.
See also commit 110781a3a27dffe9e6690839bdce993796a08331
(tdf#58944 DOCX import: workaround for hidden table headers).
Change-Id: I646be45c6d2c5fe9e1df0badeee4583097dc79f1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/86928
Reviewed-by: László Németh <nemeth at numbertext.org>
Tested-by: László Németh <nemeth at numbertext.org>
(cherry picked from commit f7e071a00542c414a7e9d7bcf4434d908f225e59)
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/96106
Tested-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
Reviewed-by: Gabor Kelemen <kelemen.gabor2 at nisz.hu>
diff --git a/sw/qa/extras/ooxmlexport/data/tdf88496.docx b/sw/qa/extras/ooxmlexport/data/tdf88496.docx
new file mode 100644
index 000000000000..b34f30389e2f
Binary files /dev/null and b/sw/qa/extras/ooxmlexport/data/tdf88496.docx differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 9e99abb06848..cf2766ac2b45 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -1123,6 +1123,16 @@ DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf81100, "tdf81100.docx")
assertXPath(pDump, "/root/page[3]/body/tab/row", 1);
}
+DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf88496, "tdf88496.docx")
+{
+ xmlDocPtr pXmlDoc = parseExport("word/styles.xml");
+ CPPUNIT_ASSERT(pXmlDoc);
+ // Switch off repeating header, there is no place for it.
+ // Now there are only 3 pages with complete table content
+ // instead of a 51-page long table only with header.
+ CPPUNIT_ASSERT_EQUAL(3, getPages());
+}
+
DECLARE_OOXMLEXPORT_EXPORTONLY_TEST(testTdf121597TrackedDeletionOfMultipleParagraphs, "tdf121597.odt")
{
xmlDocPtr pXmlDoc = parseExport("word/document.xml");
diff --git a/sw/source/core/layout/tabfrm.cxx b/sw/source/core/layout/tabfrm.cxx
index 42150626aa10..a75a250c7fc9 100644
--- a/sw/source/core/layout/tabfrm.cxx
+++ b/sw/source/core/layout/tabfrm.cxx
@@ -1074,10 +1074,11 @@ bool SwTabFrame::Split( const SwTwips nCutPos, bool bTryToSplit, bool bTableRowK
if ( nRowCount < nRepeat )
{
// First case: One of the repeated headline does not fit to the page anymore.
- // At least one more non-heading row has to stay in this table in
- // order to avoid loops:
+ // tdf#88496 Disable repeated headline (like for #i44910#) to avoid loops and
+ // to fix interoperability problems (very long tables only with headline)
OSL_ENSURE( !GetIndPrev(), "Table is supposed to be at beginning" );
- bKeepNextRow = true;
+ m_pTable->SetRowsToRepeat(0);
+ return false;
}
else if ( !GetIndPrev() && nRepeat == nRowCount )
{
More information about the Libreoffice-commits
mailing list