tdf#130639 sw layout: fix table position
at fallback "switch off repeating header"
by removing temporary page break immediately.
Follow-up of commit f7e071a005
(tdf#88496 DOCX: disable long repeating table header).
Change-Id: I3ae62456fd50f3f3fa25bfea5326a8eb9bef01c6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/100245
Tested-by: Jenkins
Reviewed-by: László Németh <nemeth@numbertext.org>
This commit is contained in:
BIN
sw/qa/extras/layout/data/tdf88496.docx
Normal file
BIN
sw/qa/extras/layout/data/tdf88496.docx
Normal file
Binary file not shown.
@@ -467,6 +467,15 @@ CPPUNIT_TEST_FIXTURE(SwLayoutWriter, TestTdf134272)
|
||||
assertXPath(pXmlDoc, "/root/page[1]/header/txt[2]/infos/bounds", "bottom", "2819");
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testTdf88496)
|
||||
{
|
||||
SwDoc* pDoc = createDoc("tdf88496.docx");
|
||||
CPPUNIT_ASSERT(pDoc);
|
||||
xmlDocUniquePtr pXmlDoc = parseLayoutDump();
|
||||
// This was 4, table fallback "switch off repeating header" started on a new page
|
||||
assertXPath(pXmlDoc, "/root/page", 3);
|
||||
}
|
||||
|
||||
CPPUNIT_TEST_FIXTURE(SwLayoutWriter, testRedlineFlysInHeader)
|
||||
{
|
||||
loadURL("private:factory/swriter", nullptr);
|
||||
|
@@ -2494,6 +2494,14 @@ void SwTabFrame::MakeAll(vcl::RenderContext* pRenderContext)
|
||||
}
|
||||
|
||||
const bool bSplitError = !Split( nDeadLine, bTryToSplit, ( bTableRowKeep && !(bAllowSplitOfRow || bEmulateTableKeepSplitAllowed) ) );
|
||||
|
||||
// tdf#130639 don't start table on a new page after the fallback "switch off repeating header"
|
||||
if (bSplitError && nRepeat > GetTable()->GetRowsToRepeat())
|
||||
{
|
||||
setFrameAreaPositionValid(false);
|
||||
break;
|
||||
}
|
||||
|
||||
if (!bTryToSplit && !bSplitError)
|
||||
{
|
||||
--nUnSplitted;
|
||||
|
Reference in New Issue
Block a user