Issue 3987 - Search should include current values of fields
Summary: Search should include current values of fields
Status: CONFIRMED
Alias: None
Product: Writer
Classification: Application
Component: ui (show other issues)
Version: 641
Hardware: PC All
: P3 Trivial with 4 votes (vote)
Target Milestone: ---
Assignee: AOO issues mailing list
QA Contact:
URL:
Keywords:
: 13683 38267 50270 52865 69596 93943 114042 (view as issue list)
Depends on:
Blocks:
 
Reported: 2002-04-12 02:23 UTC by ez
Modified: 2013-02-07 22:33 UTC (History)
1 user (show)

See Also:
Issue Type: ENHANCEMENT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description ez 2002-04-12 02:23:24 UTC
Searches for text in documents do not return all occurences of "find" field because fields are not searched even when the document is 
read-only and fields cannot be highlighted.
Comment 1 stefan.baltzer 2002-05-06 11:50:58 UTC
Reassigned to Christian.
Comment 2 christian.jansen 2003-03-24 07:46:25 UTC
Reassiged to Bettina.
Comment 3 eric.savary 2003-04-23 18:38:17 UTC
*** Issue 13683 has been marked as a duplicate of this issue. ***
Comment 4 igodard 2003-04-23 20:15:04 UTC
This issue is just one of a related group of issues regarding the interaction between search/replace and fielding. See also #13680, #13682, #13683. In 1.0.2, fields cannot be inserted into either search or replace text, and a cut of text containing fields pastes with the expansions of the fields. In addition, a search does not match on document text containing fields even if the field expansion is identical to the searched text.

This behavior is unfortunate because it precludes (for example): a) searching for all occurances of a userfield as opposed to the text that is that field's value; b) replacing with a field or text containing a field, so that if one wants to replace all occurances of "Foo" with a variable field (whose expansion might be the same for now but may be changed later) then you have to do it manually. These and many other user actions are reasonable and useful and should be supported.

However, there is a design problem here. On the one hand, the user may reasonably want a search text containing a field to match only document text containing that same field. On the other hand, he may want the search to match any document text that expands to the same (fieldless) text that the search text expands to. Both are reasonable needs.

Hence I propose that the search/replace dialog and semantics be changed as follows:

1) Both search and replace text should support all entry that is possible in the main document, including the insertion of field references.

2) Text cut from the main doument and pasted into either search or replace texts should preserve any embedded field references unexpanded.

3) There should be an "Expand fields?" check box next to each of the search and replaces entry boxes. If checked, search compares the expanded texts in the search entry with the expanded text of the document, and replace inserts the expanded text of the replace box. If unchecked, then search compares the unexpanded text of the entry with the unexpanded text of the document and requires an exact non-textual match for any embedded fields, while replace inserts the field reference instead of its expansion. Note that when unchecked a search text containing one uservariable field will not match a document text containing a different uservariable, even if the expansions of the two variables are the same.

4) The default search/replace menu should have the "Expand fields?" unchecked.


This design supports using either expansion text or the references themselves in either search, replace, both, or neither. It does not support search or replace text that contains multiple fields only some of which are to be expanded. However, that behaviour can be synthesized by the user by typing in the expansion directly in a text that is otherwise unexpanded, or by several partial search/replaces that insert dummy anchors.

Implementation should not be too difficult. It requires that the objects behind the search/replace entry boxes be changed to sections (or whatever is the object under a document that accepts fields). It also requires that comparison be either to expanded or unexpanded texts. Comparison at present seems to leave the document unexpanded, so the expanding compare may have to be coded. The dialog change is trivial.
Comment 5 eric.savary 2004-12-02 01:45:39 UTC
*** Issue 38267 has been marked as a duplicate of this issue. ***
Comment 6 eric.savary 2005-06-24 10:13:52 UTC
*** Issue 50270 has been marked as a duplicate of this issue. ***
Comment 7 umr5174 2005-06-24 13:48:47 UTC
"Number of words" (word count) doesn't take fields into account.
OOo is not entitled to decide what is a word and what is not.
So this issue should be classified as "defect".
Comment 8 eric.savary 2005-08-04 15:27:04 UTC
*** Issue 52865 has been marked as a duplicate of this issue. ***
Comment 9 eric.savary 2006-09-18 11:27:06 UTC
*** Issue 69596 has been marked as a duplicate of this issue. ***
Comment 10 kpalagin 2007-03-17 22:32:20 UTC
Dear developers,
any progress with this issue?
Thanks a lot.
Comment 11 Oliver Specht 2008-09-30 06:38:23 UTC
*** Issue 93943 has been marked as a duplicate of this issue. ***
Comment 12 bettina.haberer 2010-05-21 14:48:28 UTC
To grep the issues easier via "requirements" I put the issues currently lying on
my owner to the owner "requirements". 
Comment 13 eric.savary 2010-08-22 13:56:43 UTC
*** Issue 114042 has been marked as a duplicate of this issue. ***