diff options
author | Justin Luth <justin.luth@collabora.com> | 2024-11-22 19:33:52 -0500 |
---|---|---|
committer | Justin Luth <justin.luth@collabora.com> | 2024-11-25 17:31:42 +0100 |
commit | 8431865e6b4d006f9df34663c4d81e76cccbda44 (patch) | |
tree | abdd5572992cdb45fd439ae4b36d0d405fd6ade4 /sw/source | |
parent | ac2b3c339ee47497365066754e9937aba2cca700 (diff) |
tdf#108820 tdf#158713 sw layout: no footnote in repeated table rows
This fixes my LO 7.1 regression from bug 108820.
The problem was that footnotes-placed-in-table-headline
were being visually removed if a split-table was ever joined
during editing, etc. (i.e. one less page needed).
Avoid the join() cleanup code being triggered on GetFollow frames
because those were wrongly being informed that there was a footnote,
despite being deliberately disallowed in IsFootnoteAllowed,
so it really must not HasFootnote()!
make CppunitTest_sw_core_layout \
CPPUNIT_TEST_NAME=testTdf158713_footnoteInHeadline
Change-Id: I8f395217ba66a258738fc3f32846b952c69d367b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/177059
Reviewed-by: Justin Luth <jluth@mail.com>
Tested-by: Jenkins
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/core/text/txtftn.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx index 0cf0f266511a..84f961781232 100644 --- a/sw/source/core/text/txtftn.cxx +++ b/sw/source/core/text/txtftn.cxx @@ -797,10 +797,10 @@ SwFootnotePortion *SwTextFormatter::NewFootnotePortion( SwTextFormatInfo &rInf, OSL_ENSURE( ! m_pFrame->IsVertical() || m_pFrame->IsSwapped(), "NewFootnotePortion with unswapped frame" ); - SwTextFootnote *pFootnote = static_cast<SwTextFootnote*>(pHint); + if (!m_pFrame->IsFootnoteAllowed()) + return new SwFootnotePortion(u""_ustr, nullptr); - if( !m_pFrame->IsFootnoteAllowed() ) - return new SwFootnotePortion(u""_ustr, pFootnote); + SwTextFootnote *pFootnote = static_cast<SwTextFootnote*>(pHint); const SwFormatFootnote& rFootnote = pFootnote->GetFootnote(); SwDoc *const pDoc = &m_pFrame->GetDoc(); @@ -1408,7 +1408,7 @@ bool SwFootnotePortion::Format( SwTextFormatInfo &rInf ) SetAscent( rInf.GetAscent() ); Height( rInf.GetTextHeight() ); rInf.SetFootnoteDone( !bFull ); - if( !bFull ) + if (!bFull && m_pFootnote) rInf.SetParaFootnote(); return bFull; } |