Bug 34390 - Add to 'Search/Find & Replace' capability to find frame, page, list, and character styles
Summary: Add to 'Search/Find & Replace' capability to find frame, page, list, and char...
Status: RESOLVED DUPLICATE of bug 78582
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: Other All
: high enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 47184 (view as bug list)
Depends on:
Blocks: 38261 Find-Search Find&Replace-Styles
  Show dependency treegraph
 
Reported: 2011-02-17 05:41 UTC by sasha.libreoffice
Modified: 2017-05-29 12:52 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample Document, see Comment 1 (19.11 KB, application/vnd.oasis.opendocument.text)
2011-03-01 02:18 UTC, Rainer Bielefeld Retired
Details
example of style replacement (40.76 KB, application/vnd.oasis.opendocument.text)
2011-03-01 06:49 UTC, sasha.libreoffice
Details
another example (65.39 KB, application/vnd.oasis.opendocument.text)
2011-03-01 06:55 UTC, sasha.libreoffice
Details
explanation how use style (62.38 KB, application/vnd.oasis.opendocument.text)
2011-03-01 23:22 UTC, sasha.libreoffice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description sasha.libreoffice 2011-02-17 05:41:50 UTC
For example, I have text with numbers and I have created character or paragraph style "Numbers". And i need apply it style for all numbers in text.

I suppose using dialogue Find/Replace, set using regular expressions, set [0-9]* for search string and & for replace string. But how can I replace numbers in text to specified style?

I suppose adding new feature in Find/Replace dialogue: "Replace to specified style"
Comment 1 Rainer Bielefeld Retired 2011-03-01 02:17:09 UTC
@sasha.libreoffice@gmail.com:
We will have to find out your needs systematically.

Attached you will find a sample.odt with some Numbers in it. 
I expect you want to change style for Numbers (may be to character color red with yellow background, bold italic underlined)?

Can you please contribute a clear and simple step by step instruction 
- how you want to proceed (I expect that's already done)
- What "workaround" you currently proceed to reach your goal
Comment 2 Rainer Bielefeld Retired 2011-03-01 02:18:15 UTC
Created attachment 43958 [details]
Sample Document, see Comment 1
Comment 3 sasha.libreoffice 2011-03-01 06:49:39 UTC
Created attachment 43964 [details]
example of style replacement
Comment 4 sasha.libreoffice 2011-03-01 06:55:55 UTC
Created attachment 43965 [details]
another example

I have added 2 examples of how use replacement to style. At this time we can only apply properties for font using dialog Find&Replace. If I need change properties for font, I need use dialog Find&Replace another time. But if I can apply styles, I should be apply properties for one style. And not replace all text second time.
Comment 5 Rainer Bielefeld Retired 2011-03-01 08:17:11 UTC
I'm afraid I can't understand your need (I do not have much experience with such "extended search"). How do you apply style "_My_Numbers_" for one single arbitrary word or number in the text (of second sample) without search and replace?
Comment 6 sasha.libreoffice 2011-03-01 23:22:19 UTC
Created attachment 44005 [details]
explanation how use style
Comment 7 Cor Nouws 2011-05-13 06:33:39 UTC
IMO the idea is:
 - some text is found
 - the paragraph or character style of the text is changed to a style, that can 
   be chosen in the f&r dialogue
Comment 8 Björn Michaelsen 2011-12-23 13:55:17 UTC
Replace whiteboard status "UNCONFIRMED" with a move to status "NEEDINFO" for unassigned new bugs.
Comment 9 Björn Michaelsen 2011-12-23 17:01:33 UTC
needinfo keyword redundant by needinfo status.
Comment 10 y3kcjd5 2012-12-25 11:32:26 UTC
*** Bug 44801 has been marked as a duplicate of this bug. ***
Comment 11 y3kcjd5 2012-12-25 11:43:56 UTC
I believe the issue here is that character styles cannot be applied using the search and replace dialog, text properties such as font, color, highlighting, etc. can only be applied directly. In other words:
If, for example, a "numbers" (e.g. bold, yellow highlight) character style must be applied to all strings of numbers in a document, currently the only way to actually do that is to individually select each such string and apply the character style to them individually.
The Search and Replace dialog is capable of modifying text properties for searched strings, so it is possible to achieve a result visually identical to the "numbers" style you want to apply by adding the desired text properties (bold, yellow highlight) to the 'Replace with' field using the 'Format...' button. However, text thus modified is only visually identical to, and is not actually using, the "numbers" character style. Ergo, if further modifications are then made to the "numbers" character style (e.g. italics, not bold, no highlight), the text modified by the Search & Replace dialog will not automatically update its formatting as text actually using the "numbers" character style would.

See the following similar requests / duplicates for variations and expansions on this request; summary and importance updated to reflect merge:
Bug 44801 requests Search capability for character styles
Bug 47184 requests Search and Replace capability for page, frame, list, and character styles, with priority to character styles
Comment 12 y3kcjd5 2012-12-25 11:44:37 UTC
*** Bug 47184 has been marked as a duplicate of this bug. ***
Comment 13 Rainer Bielefeld Retired 2012-12-26 07:47:41 UTC
That never worked for LibO, so I modified Version.

I do not see high priority for this because of existing Enhancement "Alternative dialog Find & Replace for Writer 1.3.2"
 <https://bugs.freedesktop.org/show_bug.cgi?id=34390>

It seems more promising to encourage author of that that Extension to maintain and may be improve the Extension (make it available for Calc, ...)
Comment 14 sasha.libreoffice 2012-12-26 09:14:11 UTC
> It seems more promising to encourage author of that that Extension
What extension?
Comment 15 y3kcjd5 2012-12-26 17:58:40 UTC
This is the first time I have heard of such an extension myself. Is there some reason this extension has not already been integrated into LibreOffice? It strikes me as a tad odd that the maintenance and management of a functioning part of LO be left the sole provision of one author.
I would also think that the number of people (though, being new to bug tracking, I admittedly find it difficult to weigh such numbers) who have submitted and agreed to these requests would indicate that the current state of affairs is insufficient, existing solutions notwithstanding. At the very least, might it not be prudent to include a note or link to said extension in the LO documentation for the Search and Replace dialog until these features are implemented natively?
Comment 16 Rainer Bielefeld Retired 2012-12-27 17:11:52 UTC
(In reply to comment #14)
<http://extensions.libreoffice.org/extension-center/alternative-dialog-find-replace-for-writer>, sorry, I had a wrong link in the clipboard!
Comment 17 sasha.libreoffice 2012-12-28 05:50:45 UTC
Thanks for useful link
Comment 18 Paul Weiss 2013-01-14 18:54:14 UTC
Changed importance. From reading posts elsewhere, it is clear that this issue is preventing many users from switching from MSO Word to LibreOffice.
Comment 19 Rainer Bielefeld Retired 2013-01-14 21:56:54 UTC
(In reply to comment #18)
Nevertheless it's an enhancement, because everything works as intended.

Additionally this report is more or less Invalid, far away from our guidelines (1 problem per report, ...)

We will not get any progress by rising importance of all bugs 1 level. But we can get progress if we find ways how to solve possible problems.

Step1: 
We need a task Bug for tracking all "enhance find and replace capabilities" (may be we should do that with this one) and separate bug reports for each single problem. So may be we can make them Easyhacks, what will ease the task to find a developer very much.
Comment 20 Paul Weiss 2013-01-15 01:15:41 UTC
It is not clear to me that the current behavior is indeed intended. Do we know from developers that this is the case? The option in the Find & Replace dialog is worded "Search for Styles" rather than "Search for Paragraph Styles". That implies to me that the intent was to be able to search any type of style.

I can work on the meta-bug and discrete bugs, but probably won't have time for at least a couple of days.
Comment 21 Rainer Bielefeld Retired 2013-01-15 08:03:13 UTC
(In reply to comment #20)
> The option in the Find & Replace dialog is worded "Search for Styles"

Good Point! As you can see, only Paragraph styles will be suggested, and so text in dialog should be more precise. I submitted "Bug 59397 - UI: Use more precise wording at 'Find & Replace - More Options - Styles'" for this issue.
Comment 22 y3kcjd5 2013-01-15 12:52:21 UTC
(In reply to comment #19)
> Additionally this report is more or less Invalid, far away from our guidelines (1 problem per report, ...)
> 
> We will not get any progress by rising importance of all bugs 1 level. But
> we can get progress if we find ways how to solve possible problems.
> 
> Step1: 
> We need a task Bug for tracking all "enhance find and replace capabilities"
> (may be we should do that with this one) and separate bug reports for each
> single problem. So may be we can make them Easyhacks, what will ease the
> task to find a developer very much.

Functionally, I'd think that the issue(s) in this bug are essentially the same problem, or at least they should be solvable in pretty much the same way. I haven't looked at code myself, but from what I've gathered reading, the different style types seem to be defined and managed in very similar ways (sounded resemblant of CSS in HTML). That suggests to me that much of the code for this enhancement can be derived from the already present paragraph styles search capability. It would therefore appear to me that adding function for several (frame, list, character etc.) style types would take roughly the same effort as adding just one, making the addition of several style types essentially one single problem.
If, however, there is some reason these can only be added one at a time, judging by popular vote, character styles take priority.
Creating a task bug may be a good idea, but I would avoid using this one; the contents here are all closely related, whereas some of the other find & replace enhancement requests (e.g. bug 58744) would probably require work in very different parts of the code.
Comment 23 Cor Nouws 2016-03-09 10:16:10 UTC
Now IMO developer wise it would be better to split this in single issues...
such as https://bugs.documentfoundation.org/show_bug.cgi?id=78582

Would it be possible for you do that, Sacha?

Thanks,
Cor
Comment 24 Thomas Lendo 2017-03-30 15:01:21 UTC
Cor: When creating single bugs for every style, which style should this bug for? Or closing it in favor of the new ones?
Comment 25 Thomas Lendo 2017-05-26 17:17:42 UTC
Closing this bug as dupe of the new bugs for several style types. Duplicate of bug 78582, bug 106881, bug 106884, bug 106885.

If this is wrong, please reopen and rename this bug and set one other bug as dupe of this. (New bugs created according to comment 23.)

*** This bug has been marked as a duplicate of bug 78582 ***
Comment 26 Cor Nouws 2017-05-28 09:17:20 UTC
(In reply to Thomas Lendo from comment #25)
> Closing this bug as dupe of the new bugs for several style types. Duplicate
> of bug 78582, bug 106881, bug 106884, bug 106885.


Fine Thomas - sorry for missing time/some communication