Basic problem: Edit Field on an inserted cross-reference field opens to the last setting (Type, Selection and Format [in Refer using]) that was present in the Insert Field - Cross-reference tab (Ctrl+F2) dialog. Expected: The "edit field" dialog should open with the type, format, and selection of the field being edited. To see problem: 1. Insert a couple of different kinds of cross-reference fields. 2. Open Insert Field dialog and set the Type, Selection and Format to some different settings, and "Close" the dialog (do not need to insert anything). 3. Go back to one of the previously inserted fields, right-click, Edit Field. Actual: The setting in Step 2 is shown. Expected: The type, format, selection for the inserted field should be shown. Also observed with: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 375f85f8518f49ce4381b6663f1e94fc02bacf93
Bibisected with Linux 43max to 333282478a956709e648427b412d90f90fc1437b Related: fdo#75307 use the unique auto help id to identify tabpages
Created attachment 186617 [details] Example file Here is a silly test file for accelerated testing.
Adding mention of enhancement request - bug 92688 (to remember the last used cross-reference type for "insert - field") -- in case it involves the same underlying code.
(In reply to Buovjaga from comment #1) > Bibisected with Linux 43max to 333282478a956709e648427b412d90f90fc1437b > Related: fdo#75307 use the unique auto help id to identify tabpages Just a note: I was looking at the type to be specific.
(In reply to Buovjaga from comment #4) > Just a note: I was looking at the type to be specific. Will ask UXEval in relation to general issue. Also, maybe this is an EasyHack
Basically it's desirable to open a tabbed dialog at the right place. But I wouldn't treat it as a huge mistake if that's not the fact in some situations since all tabs should have some close relation with the target. When it comes to fields it might be a bit more difficult. If the first field is a cross-reference, followed by some docinformation, you wont be able to go from one to the other per edit field. If the fields are in the same context everything is updated as expected. So yes in general, and please share a better STR for the actual problem.
Created attachment 187437 [details] file to demonstrate problem (In reply to Heiko Tietze from comment #6) > please share a better STR for the actual problem. Demonstration file with instructions is attached, but any document with cross-reference fields can be used. STR. 1. (to prepare test document, such as the attached, insert some cross-references with a variety of "type", "selection" and "refering using") 2. Insert a new cross-reference (of any kind). 3. Edit one of the previous cross-reference fields. Actual: When a previous cross-reference field is edited, then the "Type", "Selection", and "Refer using" corresponds to the last used choice. Expected: That "Type", "Selection", and "Refer using" corresponds to the values of the field being edited.
I insert Document-Sender and the this will be shown even for page number, for instance. This should be fixed. Not only the type of field (resp. tab) and the type should to be set according the actual field content but also the selection/format. (Was wondering if we talk about Insert + Document, Insert + CrossRef... expecting the last choice again.)
(In reply to Heiko Tietze from comment #8) > (Was wondering if we talk about Insert + Document, Insert + CrossRef... > expecting the last choice again.) as noted in bug summary and in OP, the problem is in relation to fields entered from the Cross-references tab in the Insert Field dialog. afacit, there are no problems with editing fields that were inserted from the Document or DocInformation tab (i.e., editing those fields opens to the correct properties for the field).
Additional information 1. Use the attached test file (attachment 187437 [details]) 2. place cursor at end of document, open Insert Field dialog (Ctrl+F2) - DocInformation tab. 3. Select "Type" "Revision number" and Insert. 4. Now edit any of the inserted cross-ref fields. Actual and expected: Field is opened with correct type, selection, refer using. 5. Insert a new cross-reference field, then edit any existing cross-reference field. Actual: goes back to OP reported behavior (i.e., uses last selected type/selection/refer using). ==> inserting a docinformation field seems to "update" something that allows appropriate editing of cross-reference fields, which gets lost again after inserting a new cross-reference field.
I think what the bisect identified is the commit that restored the ability of this dialog to read the previous saved settings used in that page. What I think is then funky is that the page has "IsFieldEdit" which distinguishes between the page used to edit a field, vs the other case when its for inserting a field. But even if "IsFieldEdit" is set, then it uses the saved settings to restore the last used settings. What is particularly off is https://cgit.freedesktop.org/libreoffice/core/tree/sw/source/ui/fldui/fldref.cxx#n270 where we have: if( !IsRefresh() ) used twice, one inside the other, but if was true in the outer use, it would be true in the inner (all the way back to the initial commit). And IsRefresh is only true I think for the case of using the "next/back" button to go to edit another field. Which suggests that if you click next and then back that you then get the right results I think one of those IsRefresh was intended to be IsFieldEdit https://gerrit.libreoffice.org/c/core/+/165876
Caolán McNamara committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/db609a58df7be082de7d5a20a2a924789d6a64a1 Resolves: tdf#154715 don't use last-used field setting when editing field 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.
seems to do something more sensible now
Caolán McNamara committed a patch related to this issue. It has been pushed to "libreoffice-24-2": https://git.libreoffice.org/core/commit/843b3abd2ab05c66533b12ef6a4b155247f99e58 Resolves: tdf#154715 don't use last-used field setting when editing field It will be available in 24.2.3. 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.