Bug 141777 - Allow search by paragraph number proper in cross-reference dialog
Summary: Allow search by paragraph number proper in cross-reference dialog
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Cross-reference-dialog
  Show dependency treegraph
 
Reported: 2021-04-20 10:49 UTC by Christian Lehmann
Modified: 2022-04-07 20:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lehmann 2021-04-20 10:49:21 UTC
Description:
In the dialog window for the insertion of a cross-reference, the text that the user typed in the Selection field is currently sought at any position of the paragraphs of the selected Type. As a consequence, if the user wishes to refer to a numbered paragraph and proceeds to identify the target for the reference by its number, not only paragraphs bearing this number, but all numbered paragraphs containing the number somewhere are offered in the list of possible targets.
Likewise, if Headings is chosen as the Type of target and the user types the number of a heading, all headings whose number contains the number searched for, even in non-first position, are offered.
Enhancement: Allow the user to limit the search for targets to those that start with the number typed in.

Steps to Reproduce:
1. ALT-I.
2. Cross-reference
3. Type: numbered paragraphs
4: Selection: [type in the number of the paragraph wanted]

Actual Results:
In the list field below, all numbered paragraphs containing the number that was input in the Selection field are listed.

Expected Results:
Only those paragraphs whose number starts with the one searched for should be listed.


Reproducible: Always


User Profile Reset: No



Additional Info:
This enhancement has been discussed in Bug 141398.
'Number' refers to the elements that LO Writer can use for numbering of paragraphs. The stepwise narrowing down of the list of targets by sequential typing in more digits may be relevant only to decimal numbering.
Comment 1 Christian Lehmann 2021-04-24 07:13:55 UTC Comment hidden (obsolete)
Comment 2 Christian Lehmann 2021-04-24 07:15:29 UTC
Postscript:
Mike Kaganski mentioned in comment 10 on Bug 141398:
"Writer's link provider only gives strings, not structure internally".
It may be expedient to postpone the requested enhancement until Writer has learned to provide 
- a list of numbered objects of a type
- a list of references to a given target.
This would then be used not only in the enhancement suggested here, but also in the Find and Replace dialog.
Comment 3 Heiko Tietze 2021-05-10 14:02:52 UTC
For numbers I could agree but in case of text you would have to start with the article. Quite annoying.

Wildcards? Most users probably don't understand this anymore since Google thought us to search the search results rather than defining proper search parameters.
Comment 4 Heiko Tietze 2021-05-13 10:18:09 UTC
We discussed this topic in the design meeting. Recommendation is to keep the current state but if we modify the search this should be only for numbers.
Comment 5 Eyal Rozenberg 2022-04-07 20:57:50 UTC
Christian: I rephrased the title for brevity and, hopefully, clarity. Since this is "your" bug - if you don't approve of the title, feel free to rephrase.

I'll add another reason why this enhancement is very import: Alphabetic numbering.

When you uses numerals for paragraph numbers, then searching for a number might yield some false matches, but not _that_ many. However, if your "number" is "D" - and say it's the fourth paragraph in some subsection - you'll match half your numbered paragraphs.