1. Select a string in a text document. 2. Insert - Index Entry Actual and Expected: Selected string appears in Entry box. 3. Modify the entry (e.g., add or delete characters) 4. Select "Apply to all similar texts" Actual: The *original* selection is used to match (and insert) index entries. Expected: ?? The documentation already says that "Apply to all similar texts" cannot be used for manually entered texts. => any modification of the selected text in "Entry" should deactivate the "Apply to all similar texts" control. (the actual behavior after modifying the entry does not matter -- if it becomes impossible to select "Apply to all..." -- because the modified entry would simply be inserted where the original selection was made, without searching for other instances.) Marking as "minor"
Testing with: Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: e0daa98a802cc1f84ceb0f306f5d15fecabd62c1 CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded I think we need to instead clarify the documentation. When selecting some text, then modifying the entry and ticking the "Apply to all other occurrences", it works: all other occurrences of the originally selected text are indexed at once, and the entry in the index is the one that was manually changed. However, when opening the dialog without selected text, that's when the option is greyed out. So maybe the documentation should say something like "You cannot use the function without an associated text selection." Corresponding help page: https://help.libreoffice.org/7.6/en-US/text/swriter/01/04120100.html Same thing in OOo 3.3.0.
(In reply to Stéphane Guillou (stragu) from comment #1) > I think we need to instead clarify the documentation. Ok. Here is an attempt: 1. Documentation already notes that a selection is needed. 2. I think you have tested with a version that now has the "For Selected Entry" label above the "Apply to all..." option, which should help to emphasize that this option requires a selection. Propose (in relation to "Apply to all..." option in [1]): 1. Drop the sentence: "You cannot use the function for an Entry that you entered manually in this dialog." (because it is false). 2. Drop "and captions" in the second sentence in the first paragraph, because (a) it is covered by "frame" and (b) if the caption is taken out of the frame (as some persons do), then it can be indexed. 3. Insert the sentence: "For a modified entry, the match is conducted on the original selection, but the modified entry is inserted." between the first and third sentences in the first paragraph. Combining 2 and 3, the result would be: Automatically marks all other occurrences of the selected text in the document. For a modified entry, the match is conducted on the original selection, but the modified entry is inserted as the index entry. Text in headers, footers, and frames is not included. [1] https://help.libreoffice.org/7.6/en-US/text/swriter/01/04120100.html
Created attachment 186476 [details] screenshot of proposed help update (In reply to sdc.blanco from comment #2) > Ok. Here is an attempt: https://gerrit.libreoffice.org/c/help/+/149984 Attachment gives a screenshot of the result of the proposed patch.
Probably the tooltip/extended tip for this option in the dialog needs to be modified slightly to: Add an index entry to any other occurrences of the text selected into "Entry". And add this sentence to the extended tip: "For a modified entry, the match is conducted on the original selection, but the modified entry is inserted."
(In reply to sdc.blanco from comment #3) > https://gerrit.libreoffice.org/c/help/+/149984 Looks good, I +1'd. (In reply to sdc.blanco from comment #4) > Probably the tooltip/extended tip for this option in the dialog needs to be > modified slightly to: > > Add an index entry to any other occurrences of the text selected into > "Entry". > > And add this sentence to the extended tip: > > "For a modified entry, the match is conducted on the original selection, but > the modified entry is inserted." Sounds good. How about even more verbose for extended: "[...], but the modified entry is inserted _in the index_." ?
(In reply to Stéphane Guillou (stragu) from comment #5) >but the modified entry is inserted _in the index_." ? No problem with "verbose", but "in the index" refers to a future process. Would propose either: ...modified entry inserted as the index entry. or ...modified entry is inserted, and will appear in the index.
(In reply to sdc.blanco from comment #6) > ...modified entry is inserted, and will appear in the index. Sorry, I forgot that the empty-looking field is indeed inserted before all occurrences of the selection. It is a two step process. Your wording is best. I find the behaviour a little confusing still, regarding how the inserted field is a zero-width field before each occurrence (with no presence in the Navigator). I feel like it should at least span the selection... But that's a different issue. But to clarify that, should we also mention "inserted before each match" or something like of the sort?
(In reply to Stéphane Guillou (stragu) from comment #7) > I feel like it should at least span the selection... I recognize/share your concern, but with a recent master build, it seems like this wish has been granted already. Here is a version that WFM. Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 1e9f4de320f67d1218c710bcee1969a2324c6888 CPU threads: 8; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win Locale: da-DK (da_DK); UI: en-US Calc: CL threaded otoh, I did look in Navigator today to be sure that index entries were not appearing there. See bug 137704 for relevant discussion, rather than opening a new ticket. > But to clarify that, should we also mention "inserted before each match" or > something like of the sort? Maybe unnecessary now that spans are shown?
Patch for tooltip / extended tip https://gerrit.libreoffice.org/c/core/+/149988
Seth Chaiklin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/3b5bc5b4018ba94375ff66c381746e413af5b836 tdf#154184 modify/add tool/extended tip: "Apply to all other occurrences" It will be available in 7.6.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.
Seth Chaiklin committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/help/commit/5f36f1f9a460f33cb48e50aac6f3c24b82a8ae66 tdf#154184 clarify how "Apply to all occurrences" option works
Since this is now a "Documentation" bug, let's call this one FIXED. With followup tickets as needed (e.g., in relation to comment 7 and the UI for index entry).