From 07df3ab2d2720b2b9548a8dd5ecd51a3f321863f Mon Sep 17 00:00:00 2001 From: Mike Kaganski Date: Thu, 4 Apr 2024 15:11:24 +0500 Subject: tdf#81012: avoid content frames in footnotes / endnotes This makes the behavior of the endnotes in the end of sections consistent with the behavior of dedicated endnote pages, where heading fields ignore headings in endnote content. Change-Id: Iad0218b75a678808b1266024fe4c81f040a631c4 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165789 Tested-by: Jenkins Reviewed-by: Mike Kaganski (cherry picked from commit 746b21760b911860c7ac497f10ab07d60111e867) Reviewed-on: https://gerrit.libreoffice.org/c/core/+/165842 Reviewed-by: Michael Stahl --- sw/source/core/fields/expfld.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'sw') diff --git a/sw/source/core/fields/expfld.cxx b/sw/source/core/fields/expfld.cxx index 6ed4cdb7c125..47c675cc42bf 100644 --- a/sw/source/core/fields/expfld.cxx +++ b/sw/source/core/fields/expfld.cxx @@ -233,7 +233,7 @@ const SwTextNode* GetBodyTextNode( const SwDoc& rDoc, SwPosition& rPos, else pContentFrame = pPgFrame->FindLastBodyContent(); - if( pContentFrame ) + if( pContentFrame && !pContentFrame->IsInFootnote() ) { assert(pContentFrame->IsTextFrame()); SwTextFrame const*const pFrame(static_cast(pContentFrame)); -- cgit