Created attachment 192503 [details] basic document to demonstrate bug. Based on the recommendation at the link, this seems to be a regression bug. https://ask.libreoffice.org/t/header-fields-not-tracking-header-values/101951/2 At the above link, the claim is made by mikekaganski that this was working in version 7.6. I appreciate his help. LibreOffice 24.2.0.3 on Windows 10 64-bit I’ve done a bunch of searching trying to figure out how to have a field in my header track the headings in my data, and I had set up some styles I thought would work, and nothing worked, so finally I made what I think is a basic file, using default styles, and it doesn’t work either, so now I’m wondering if I’ve been reading the wrong documentation, if the documentation is wrong or insufficient, or if there is a bug. Below is the simple file, containing a header and a footer with the field for heading 9 content. Then there are some pairs of heading 9 styles and a default paragraph followed by a bunch of blanks. to get me to two pages. The Heading seems to pick up the first instance (CAT) of the heading 9 content, but doesn’t switch to a later one on page 2. The footer also picks up the first instance (CAT) of the heading 9 content, but since there are two of them on page 2, and from my research, I thought it should display the last heading 9 content on page 1 (DOG). I thought the header of page 2 should have (DOG), and the foot of page 2 should have (GOPHER). But the CAT is everywhere! So what basic feature have I misunderstood or isn’t working in this very simple file? While I’ve been using Writer for a while, this is the first attempt at using these fields and headers, and I’m stumped, in spite of finding lots of similar questions, and attempting to follow the similar answers in my more complex format, but now I see I don’t even understand how to get dynamic field values using the very most basic format.
To reproduce from scratch: 1. Create a new text document; 2. Insert->Field->More Fields->Document->Heading (Heading contents), select "Up to level": 9, press [Insert], then [Close]; 3. In Navigator, right-click the field, choose Edit, and inspect the "Up to level" value. In 7.6.0.3, it's 9. In 23.2.0.3 (and in current master), it's 8. Suspecting something related to the replacement of "Up to level"'s spin button with drop-down list.
Regression after commit 27fde46937ecb71e7ce738cba430119a79cea77f.
Sorry, start fixing it now.
(In reply to Baole Fang from comment #3) Thanks, and please don't be sorry. The collective wisdom in the project is "there is no improvement without a regression" ;) - which is ~expected, given the size of the codebase, its complexity and interconnections.
That's a very nice way to put it, Mike, a former co-worker used to put it this way: New bugs for old!
:)
Baole Fang committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/694b9b6422ee27da13ad455174cde50b1a673ac7 tdf#159678: Fix heading dropdown list It will be available in 24.8.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.
Baole Fang committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/9d48831793cdbf93975b71083fbcc9577c17fceb tdf#159678: Fix heading dropdown list It will be available in 24.2.2. 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.
Baole Fang committed a patch related to this issue. It has been pushed to "libreoffice-24-2-1": https://git.libreoffice.org/core/commit/613135cef0b6b2cc9d01d9a7126fb6707fd473f0 tdf#159678: Fix heading dropdown list It will be available in 24.2.1. 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.