https://bugs.documentfoundation.org/show_bug.cgi?id=130318
--- Comment #27 from Andreas Heinisch <[email protected]> --- So after investigating the request, I checked the code: In void SwTOXBaseSection::UpdateOutline [1] the outlines will be updated for the index. The same function checks if a TextNode belongs to the own chapter or not if the create index for chapter is set [2]. If we change the current behaviour and create the index from the cursor position, the IsFromChapter and lcl_FindChapterNode functions [3] have to be changed in order to find the first parent node from the current node where the cursor is. I am not an expert in the ToC index creation and I have to check how to retrieve the current cursor position in order to get the correct parent node for the index. Maybe we have to set also the starting level to make this working correctly. [1] https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/doctxm.cxx?r=5f9ffc31#1234 [2] https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/doctxm.cxx?r=5f9ffc31#1253 [3] https://opengrok.libreoffice.org/xref/core/sw/source/core/doc/doctxm.cxx?r=5f9ffc31#857 -- You are receiving this mail because: You are the assignee for the bug.
