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"
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
Created attachment 43958 [details]
Sample Document, see Comment 1
Created attachment 43964 [details]
example of style replacement
Created attachment 43965 [details]
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.
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?
Created attachment 44005 [details]
explanation how use style
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
Replace whiteboard status "UNCONFIRMED" with a move to status "NEEDINFO" for unassigned new bugs.
needinfo keyword redundant by needinfo status.
*** Bug 44801 has been marked as a duplicate of this bug. ***
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
*** Bug 47184 has been marked as a duplicate of this bug. ***
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"
It seems more promising to encourage author of that that Extension to maintain and may be improve the Extension (make it available for Calc, ...)
> It seems more promising to encourage author of that that Extension
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?
(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!
Thanks for useful link
Changed importance. From reading posts elsewhere, it is clear that this issue is preventing many users from switching from MSO Word to LibreOffice.
(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.
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.
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.
(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.
(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.
> 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.
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?
Cor: When creating single bugs for every style, which style should this bug for? Or closing it in favor of the new ones?
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 ***
(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