Created attachment 173893 [details] Writer document as described above I create a new document and enter some sample text in Text Body. I add a Heading 1 and I add a Heading 2, I then insert a frame and add a Heading 4 and some text, such as a note that sits outside the main text. I create a Table of Contents using the default settings and the Headings are in page order. I now see in Navigator that the lower level 4 Heading comes before the body of the document and before higher level Headings, although in the TOC they are in correct order. The incorrect order is reflected in Bookmarks when exported as PDF, where the level 4 headings are now shown at the same level as Heading 1 but coming before the main body of the text Can the Headings in frames be ordered in Navigator according to their anchor points in the main body of the text?
Confirm the problem in Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 6805efdecb240fad8c82a5c1756a2a0e92f12b7d CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Vulkan; VCL: win Locale: ru-RU (ru_RU); UI: en-US Calc: threaded
For more information, see: https://ask.libreoffice.org/en/question/319950/headings-outside-the-main-body-are-shown-out-of-order/ https://ask.libreoffice.org/en/question/270540/chapter-numbers-in-frames/
The fix for this is already in the code. The same function used to assign sort numbers to Sections can be used for Headings as well. Link to proposed patch: https://gerrit.libreoffice.org/c/core/+/127022
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c8ac73daa670ab571c3d52541c67c28270ee6a08 tdf#143569 fix fly frame Headings out of order in Navigator It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Jim Raykowski committed a patch related to this issue. It has been pushed to "libreoffice-7-3": https://git.libreoffice.org/core/commit/6c9f77e2f776f3a28764e423bbe42696c0b0627c tdf#143569 fix fly frame Headings out of order in Navigator It will be available in 7.3.0.0.beta2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
The Navigator ordering seems to be fixed. I am unsure about the PDF part of the bug report. If there is more to do here please reopen.
Xisco Fauli committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/dd073b6e2be32749333af25c160ea637c4a27e10 tdf#143569: sw: Add UItest It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Although the current fix places headings that are in a frame at the sort position of the node the frame is anchored, the headings within the frame are still sorted alphabetically. The approach used to make the Navigator list field and hyperlink content in frames in the order of document layout appearance[1][2] seems to also work to order outline headings in frames in the order of document layout appearance. Here is a link to patch to make outline headings in frames list in the order of document layout appearance: https://gerrit.libreoffice.org/c/core/+/133359 [1] https://gerrit.libreoffice.org/c/core/+/133101 [2] https://gerrit.libreoffice.org/c/core/+/133342
Jim Raykowski committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/c81f4a4ecbfa7dc97d8c28b5ec5f00d1d561b6bb tdf#143569 SwNavigator: Make Headings entries from headings in frames It will be available in 7.4.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Can verify that headings in frames are placed at top of Headings list in Navigator for 7.2.7.2, but for 7.6.0.0.alpha0+ (X86_64) these headings appear in the appropriate order in the headings list in Navigator. Thanks for the fix Jim! Did not test the PDF issue.