Reproduction instructions -------------------------- 1. Create a new Writer document 2. Using the menu, at Tools | Chapter Numbering (which is misnamed by the way!) Make Heading 1 paragraphs numbered using western numerals and with a '.' separator. 3. Set the paragraph style to Heading 1; the paragraph should now be numbered. 4. Type in some text 5. Press Enter; the style should now change to Text Body 6. Insert a cross-reference to a heading - the Heading 1 you created; for "refer using", choose "Chapter". Close the dialog after inserting the cross-ref. 7. Right-click the cross-ref, choose "Edit Field..." 8. Set the "refer using" to "Number" and close the dialog. 9. Right-click the cross-ref, choose "Edit Field..." 10. Set the "refer using" to "Chapter" and close the dialog. Expected results ------------------ After step 6, the cross-ref's displayed text is "1" After step 8, the cross-ref's displayed text is "1." After step 10, the cross-ref's displayed text is "1" After step 9, the cross-ref's chosen "refer using" is "Number" Actual results ------------------ After step 6, the cross-ref's displayed text is "1" After step 8, the cross-ref's displayed text is "1." After step 10, the cross-ref's displayed text remains "1" After step 9, the cross-ref's chosen "refer using" is "Chapter".
(In reply to Eyal Rozenberg from comment #0) > Expected results > After step 10, the cross-ref's displayed text is "1" > .... > After step 10, the cross-ref's displayed text remains "1" Don't get it. And what exactly is the difference to bug 147774?
(In reply to Heiko Tietze from comment #1) > Don't get it. Oh, I mistyped! I meant " remains "1." ". It doesn't go back to "1".
Cannot confirm the issue.
Hello Eyal Rozenberg, Please attach a screencast reproducing the issue
Created attachment 179948 [details] A document for reproducing the bug Sorry about the confusion. I'll try to make reproduction simpler. If that doesn't work I'll screencast. So: 1. Open the attached document (148108.odt) 2. Right-click just before the cross-reference (on the single text body paragraph). 3. Choose "Edit Fields..." and note which "Refer Using" item is chosen. 4. Set the "Refer Using" choice to ""Above"/"Below"" 5. Right-click just before the cross-reference 6. Choose "Edit Fields..." and note which "Refer Using" item is chosen. Expected results: * After step 3, "Refer Using" should show "Page Number (styled)" (as the cross-reference text is "i", which is the first page number; and the page style has page numbers use lowercase Roman numerals) * After step 6, "Refer Using" should show ""Above"/"Below"" - which is what we had just chosen. Actual results: * After step 3, "Refer Using" shows "Chapter Number" * After step 6, "Refer Using" shows "Chapter Number" that's certainly invalid, both times, since the "Chapter Number" is "A".
Created attachment 179949 [details] Screencast demostrating the bug Here's the screencast too..
[Automated Action] NeedInfo-To-Unconfirmed
I see the problem in a new document too. Tested with Version: 7.4.0.0.alpha0+ (x64) / LibreOffice Community Build ID: e4a7a50d831cb6fca95f2afff2af5298d66b5876 CPU threads: 8; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win Locale: de-DE (en_US); UI: en-US Calc: threaded It seems to be a problem with initializing that part of the dialog. Insert a second field. If you now use the 'next' and 'previous' buttons in the dialog, then the actual used type is selected in the 'Refer using' list.
(In reply to Regina Henschel from comment #8) > I see the problem in a new document too. Tested with Version: > It seems to be a problem with initializing that part of the dialog. Insert a > second field. You mean, a second cross-reference, yes. > If you now use the 'next' and 'previous' buttons in the > dialog, then the actual used type is selected in the 'Refer using' list. Oh, wow, I didn't even realize those buttons existed! They rather easy to miss with my theme anyway, since they're gray-on-gray and it's not obvious what they even do. Maybe I should open a separate bug. Anyway, you're right, it's the initialization. But also, when you press Ok, it doesn't change the "Refer using" choice to the mis-initialized "Chapter", it leaves the "refer using" as is (I demonstrated this in the screencast).
Miklos, Hossein: this smells like a nice easyhack. Do you have code pointers at hand?
sw/uiconfig/swriter/ui/editfielddialog.ui is the .ui file for the Edit Fields dialog, SwFieldEditDlg in sw/source/ui/fldui/fldedt.cxx is the matching class. I'm not sure if fixing this would be an easy hack or not, perhaps Hossein has an opinion on that.
(In reply to Heiko Tietze from comment #10) > Miklos, Hossein: this smells like a nice easyhack. Do you have code pointers > at hand? I'm working on this issue to estimate the amount of effort needed to fix it.
Repro in 7.4, but not in master. Please re-test. (In reply to Eyal Rozenberg from comment #0) > After step 8, the cross-ref's displayed text is "1." The displayed text in master is always just "1" now. The selected "refer using" is always logical now when reopening the dialog. Arch Linux 64-bit Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: fb39ae1bc7e4b1cbfc3108efca52ec310faf7363 CPU threads: 8; OS: Linux 6.10; UI render: default; VCL: kf6 (cairo+wayland) Locale: fi-FI (fi_FI.UTF-8); UI: en-US Calc: CL threaded Built on 14 September 2024
(In reply to Buovjaga from comment #13) > Repro in 7.4, but not in master. Please re-test. Can also no longer reproduce. It's still a problem that neither "Number" and "Chapter" show "1." and both show "1", but let's call that a different bug and close this one.