sw/source/core/doc/doctxm.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
New commits: commit 863720dfc09343f61bc3e5f8105bfaf3544cfc3c Author: Michael Stahl <michael.st...@allotropia.de> AuthorDate: Fri May 3 17:33:56 2024 +0200 Commit: Miklos Vajna <vmik...@collabora.com> CommitDate: Fri May 10 14:20:09 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) (cherry picked from commit fdd44d9e7c6066aac8572d6d78dedef339b6058e) Change-Id: Iec1c2b8eaba0ad20b2ad7d8c6b20603315a7a83d Reviewed-on: https://gerrit.libreoffice.org/c/core/+/167444 Reviewed-by: Miklos Vajna <vmik...@collabora.com> Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoff...@gmail.com> diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index d29223050b6a..f9533b37f647 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -1375,7 +1375,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)))