summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2017-04-26 17:10:09 +0200
committerMichael Stahl <mstahl@redhat.com>2017-04-26 17:30:35 +0200
commite15b8997f0d2e54fa7b8345063755616d0b100b9 (patch)
tree5cd39c95170586f621d4f518930a7ef90cd505b3
parent3995bf74a6ad711d6f7b63cbe8eeca83d5b0355f (diff)
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
-rw-r--r--sw/source/core/layout/flowfrm.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/sw/source/core/layout/flowfrm.cxx b/sw/source/core/layout/flowfrm.cxx
index 88de9e047f9c..d80c03a054e1 100644
--- a/sw/source/core/layout/flowfrm.cxx
+++ b/sw/source/core/layout/flowfrm.cxx
@@ -2402,6 +2402,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!" );
}