sw/source/core/doc/doctxm.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 7178d6197b892e456a8db8a3d085a24bfd52cf32 Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri May 3 17:33:56 2024 +0200 Commit: Michael Stahl <michael.st...@allotropia.de> CommitDate: Mon May 6 13:43:45 2024 +0200 tdf#40142 sw: only check level for table of contents Only Table of Contents has level settings, the level is always 0 for the other ToX types, which erroneously excludes nodes (as can be seen with testFDO77715 failing with upcoming tdf#160402 bugfix). (regression from commit 5c04c4474236cc50009aea6d89f7c443c861af19) Change-Id: Iec1c2b8eaba0ad20b2ad7d8c6b20603315a7a83d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167096 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.st...@allotropia.de> diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 613f68773493..9e2c409d9511 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1377,7 +1377,8 @@ void SwTOXBaseSection::UpdateTemplate(const SwTextNode* pOwnChapterNode, pTextNd->getLayoutFrame(pLayout) && pTextNd->GetNodes().IsDocNodes() && // tdf#40142 - consider level settings of the various text nodes - o3tl::make_unsigned(pTextNd->GetAttrOutlineLevel()) <= GetLevel() && + (TOX_CONTENT != SwTOXBase::GetType() || + o3tl::make_unsigned(pTextNd->GetAttrOutlineLevel()) <= GetLevel()) && (!pLayout || !pLayout->HasMergedParas() || static_cast<SwTextFrame*>(pTextNd->getLayoutFrame(pLayout))->GetTextNodeForParaProps() == pTextNd) && (!IsFromChapter() || IsHeadingContained(pOwnChapterNode, *pTextNd)))