summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sw/qa/extras/ooxmlexport/data/tdf88496.docxbin0 -> 25175 bytes
-rw-r--r--sw/qa/extras/ooxmlexport/ooxmlexport11.cxx10
-rw-r--r--sw/source/core/layout/tabfrm.cxx7
3 files changed, 14 insertions, 3 deletions
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
--- /dev/null
+++ b/sw/qa/extras/ooxmlexport/data/tdf88496.docx
Binary files differ
diff --git a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
index 36b4a8331466..aa57c48f19e1 100644
--- a/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
+++ b/sw/qa/extras/ooxmlexport/ooxmlexport11.cxx
@@ -1021,6 +1021,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 26d834113ee8..b3f4ffef0ab2 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 )
{