diff options
author | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-10-13 22:11:35 +0200 |
---|---|---|
committer | Andreas Heinisch <andreas.heinisch@yahoo.de> | 2022-10-18 08:15:48 +0200 |
commit | ba58fc11723b7c9d370d6407385ea0e8829db099 (patch) | |
tree | e59a0c60af3f1d6b9bfe7859ce25b12ed1512768 | |
parent | 008cf1285d8c9ab293ebf0de26317a9df9725742 (diff) |
tdf#151462 - Search for outline node containing the current node
If the index lies within a special section, the position of the anchor of the corresponding section will used to search the node of the paragraph. This patch searches for the outline node of the found paragraph in order to find all the corresponding sub indexes.
Change-Id: I9be4bdc0768d5d0d5987d47d37e41acc5009cca8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/141344
Tested-by: Jenkins
Reviewed-by: Andreas Heinisch <andreas.heinisch@yahoo.de>
-rw-r--r-- | sw/source/core/doc/doctxm.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx index 36c197732cd9..09c44f1ef489 100644 --- a/sw/source/core/doc/doctxm.cxx +++ b/sw/source/core/doc/doctxm.cxx @@ -733,6 +733,8 @@ static const SwTextNode* lcl_FindChapterNode( const SwNode& rNd, SwPosition aPos( *pNd ); pNd = GetBodyTextNode( pNd->GetDoc(), aPos, *pFrame ); OSL_ENSURE( pNd, "Where's the paragraph?" ); + // tdf#151462 - search for outline node containing the current node + return pNd->FindOutlineNodeOfLevel(pNd->GetSectionLevel() - 1, pLayout); } } return pNd ? pNd->FindOutlineNodeOfLevel(nLvl, pLayout) : nullptr; |