summaryrefslogtreecommitdiffstats
path: root/sw/source/core/doc/doctxm.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/core/doc/doctxm.cxx')
-rw-r--r--sw/source/core/doc/doctxm.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index d29223050b..f9533b37f6 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)))