sw/source/core/layout/flowfrm.cxx | 6 ++++++ 1 file changed, 6 insertions(+)
New commits: commit 253a345ccd0bd499950759c792da62fe9dc437ee Author: Michael Stahl <mst...@redhat.com> Date: Wed Apr 26 17:10:09 2017 +0200 tdf#107398 sw: do not leave empty footnote container in layout ... when applying loop control in SwFlowFrame::MoveBwd(). The SwFootnoteContFrame is newly created in MoveBwd(), line 2062: pNewUpper = m_rThis.GetLeaf( MAKEPAGE_FTN, false ); If it stays empty, that is not a valid layout so delete it again. Since the idle/timer refactoring in VCL the invalid layout stays until the document is closed; presumably before LO 5.0 the timer based layout would reformat things again. (regression from af41b7f91f22052d49654d41ae9916d6981db3f6) Change-Id: I841f42b465f8123f9246f1fa70d1417ffdd57700 (cherry picked from commit e15b8997f0d2e54fa7b8345063755616d0b100b9) Reviewed-on: https://gerrit.libreoffice.org/37008 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> (cherry picked from commit 27bbee974eaf59f722c115c9717faa8c74b9d815) Reviewed-on: https://gerrit.libreoffice.org/37058 Reviewed-by: Christian Lohmaier <lohmaier+libreoff...@googlemail.com> Reviewed-by: Markus Mohrhard <markus.mohrh...@googlemail.com> Tested-by: Markus Mohrhard <markus.mohrh...@googlemail.com> diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx index 29e1300a4a98..7ab8e85c7119 100644 --- a/sw/source/core/layout/flowfrm.cxx +++ b/sw/source/core/layout/flowfrm.cxx @@ -2404,6 +2404,12 @@ bool SwFlowFrame::MoveBwd( bool &rbReformat ) ( pNextNewUpper == m_rThis.GetUpper() || pNextNewUpper->GetType() != m_rThis.GetUpper()->GetType() ) ) { + // tdf#107398 do not leave empty footnote container around + if (!pNewUpper->Lower() && pNewUpper->IsFootnoteContFrame()) + { + pNewUpper->Cut(); + SwFrame::DestroyFrame(pNewUpper); + } pNewUpper = nullptr; OSL_FAIL( "<SwFlowFrame::MoveBwd(..)> - layout loop control for layout action <Move Backward> applied!" ); }
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits