sw/source/core/doc/doctxm.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit c54b8c442473c59deacc89de4c1a13e108993063
Author:     Andreas Heinisch <andreas.heini...@yahoo.de>
AuthorDate: Thu Oct 13 22:11:35 2022 +0200
Commit:     Xisco Fauli <xiscofa...@libreoffice.org>
CommitDate: Tue Nov 1 21:54:20 2022 +0100

    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.heini...@yahoo.de>
    (cherry picked from commit ba58fc11723b7c9d370d6407385ea0e8829db099)
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142136
    Reviewed-by: Xisco Fauli <xiscofa...@libreoffice.org>

diff --git a/sw/source/core/doc/doctxm.cxx b/sw/source/core/doc/doctxm.cxx
index 9665c3915714..ea4cf47a3dce 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;

Reply via email to