[Libreoffice-commits] core.git: sw/source
Justin Luth (via logerrit)
logerrit at kemper.freedesktop.org
Mon Jul 27 17:48:08 UTC 2020
sw/source/core/text/inftxt.cxx | 2 +-
sw/source/core/text/txtftn.cxx | 5 +++--
2 files changed, 4 insertions(+), 3 deletions(-)
New commits:
commit 9054c903b215892198f54f105947b16544a78f01
Author: Justin Luth <justin.luth at collabora.com>
AuthorDate: Sat Jul 25 13:03:15 2020 +0300
Commit: Justin Luth <justin_luth at sil.org>
CommitDate: Mon Jul 27 19:47:27 2020 +0200
tdf#108820 sw layout: no ftn fieldshading in repeated header
IsFootnoteAllowed() removes the footnote marker from
the repeated table headers, but it didn't remove the
view menu -> field shadings background.
NewExtraPortion() is the only function that calls
NewFootnotePortion(), and it will create a blank
FieldPortion is nullptr is returned, so return a
null FoonotePortion instead so that we can test
for is-footnote and then prevent the drawing
of the fieldshadings.
FieldShading is an on-screen item only and never printed,
so no unit test is possible.
Change-Id: I940eaf2dc3f4ad808b333d46f0964df31a9345b1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99423
Tested-by: Jenkins
Reviewed-by: Michael Stahl <michael.stahl at cib.de>
Reviewed-by: Justin Luth <justin_luth at sil.org>
diff --git a/sw/source/core/text/inftxt.cxx b/sw/source/core/text/inftxt.cxx
index b7a58b198c6c..a6903b9aab75 100644
--- a/sw/source/core/text/inftxt.cxx
+++ b/sw/source/core/text/inftxt.cxx
@@ -1335,7 +1335,7 @@ void SwTextPaintInfo::DrawViewOpt( const SwLinePortion &rPor,
&& ( PortionType::Number != nWhich
|| m_pFrame->GetTextNodeForParaProps()->HasMarkedLabel())) // #i27615#
{
- bDraw = true;
+ bDraw = PortionType::Footnote != nWhich || m_pFrame->IsFootnoteAllowed();
}
break;
case PortionType::Bookmark:
diff --git a/sw/source/core/text/txtftn.cxx b/sw/source/core/text/txtftn.cxx
index 73aff1cf57bf..05f71a25bf74 100644
--- a/sw/source/core/text/txtftn.cxx
+++ b/sw/source/core/text/txtftn.cxx
@@ -783,10 +783,11 @@ 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 nullptr;
+ return new SwFootnotePortion("", pFootnote);
- SwTextFootnote *pFootnote = static_cast<SwTextFootnote*>(pHint);
const SwFormatFootnote& rFootnote = pFootnote->GetFootnote();
SwDoc *const pDoc = &m_pFrame->GetDoc();
More information about the Libreoffice-commits
mailing list