Created attachment 58954 [details]
Screenshot of Find & Replace by format dialog result
Problem description: As per the subject, I cannot get Find & Replace by format to work reliably. Notably, whenever I have done anything with styles it doesn't seem to work.
Steps to reproduce:
1. Create a document with text.
2. Change style on text to something other than "Default."
3. Create local formatting on a word or phrase (i.e., boldface it).
4. Use Find & Replace to search for that local formatting.
Current behavior: Does not find the local formatting applied.
Expected behavior: Should find the local formatting applied.
Platform (if different from the browser):
Browser: Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0
This request is not quite clear. LO finds and replaces local formatting. Anyway, I recommend Alternative Find & Replace extension.
There are different requests for Find & Replace. I opened Bug 38261 - Better Find&Replace with regular expressions, but it's Enhancement, and thus not a priority.
I can confirm this bug with 22.214.171.124. Actually, it does not even work using the default style.
Simplified test case:
1) Open new writer doc
2) Type "moo moo moo", make the middle "moo" italic.
3) Open advanced search options dialog
4) Select "italic" in "Formats"
5) Search for "moo" (or .+ with regexes enabled).
Result: No hit found
Expected: 1 hit.
Thanks for additional explanation
Using description from comment 2:
[reproduced] in 3.5.4 on Fedora 64 bit
[not reproduced] in 3.3.4 on Fedora and in 3.5.2 on Windows 7 32 bit
Looks like regression. But unknown yet, from which version regression. And bug is Linux-specific or possible to reproduce it on Windows?
Per comment 1:
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit
Could not reproduce. Hit returned when selected Including styles.
Per comment 2:
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit
Could not reproduce. 1 hit returned - italic moo.
I also can not reproduce in 3.5.5 on Fedora. May be fixed. Or I am doing something wrong.
Do not hesitate to reopen if this bug is reproducible with the latest stable release.
"Find & replace" with formatted text still does not work reliably with LibreOffice 126.96.36.199 (on Linux 32 bit). I will add 2 screenshots and a sample document.
In the document there are 2 pages with text samples. Page 1 has character formatting (italic, bold, underlined + combinations of these) and paragraphs with different indentations. Page 2 has text with a screenplay layout (paragraphs with various indentations).
I enable regular expressions and search for pattern ".+" (via "Find all"):
(1) I set "italics" as format: LO finds a lot of italic text, but not all (see screenshot 1); combinations of italic + bold or underlined are not found. (LO displays "italic, normal" under the search key, whatever this might mean.)
(2) I set "bold" as format: LO finds all bold text, including combinations of bold + italic or underlined - everything as expected (see screenshot 2). (LO displays "bold" under the search key, without "normal".)
(3) I set "indent left: 0.5 cm" as format: LO finds all paragraphs with left-indent = 0.5 cm, except for 1 (which has also a right indent), which should be found as well.
(4) I set "indent left: 1.91 cm" as format: LO should find most of the screenplay paragraphs on page 2, but doesn't. (The single matching paragraph on page 1 is found.)
The bug is not a regression, it has been present for years. I have got used to searching for formatted text using the "Attributes" button instead of "Format", as this works more reliable.
Created attachment 68298 [details]
Screenshot: find all italic text
LO doesn't find all italic text, see yellow markers
Created attachment 68299 [details]
Screenshot: find all bold text
Works as expected
Created attachment 68300 [details]
ODT: sample document with formatted text find_formatted_text.odt
Document with character and paragraph formatting used for above screenshots
I had a look into the content.xml file in problematic ODTs and found that it contains certain formatting attributes in style:paragraph-properties or style:text-properties elements like
LO displays rounded numbers in its dialogues (like "1.91cm"), and if you enter these into the find dialogue, the true values in the dialogue and in the document will not match.
The text concerned has been copied into the ODT from an HTML file opened with LO. So this bug has to do with importing text not created with LO itself.
Other problems with the find formatted text function remain: You cannot find text with just formatting attribute "left indent" set to "1.91cm", you _have_ to specify a right indent as well (otherwise default of "0cm" is used).
And it doesn't find all italic text, as mentioned.
Just to confirm, the procedure as decribed in comment 2 by me is broken in 3.5.4, but works fine on 3.6.3, so that one is fixed indeed. But the issues as described by Joseph are still valid.
Not reproduced in libo 188.8.131.52
Ubuntu 12.04 - 64bits
In this version, there is a option box :
[X] Search in style
that if checked, the search is ok.
so - confirming, and re-titling to reflect what is left for 3.6.x (or did I mis-understand something). If there are several issues then it'd be best to split them out as nice, individual bugs and make this one a tracker (perhaps) :-)
*** Bug 54324 has been marked as a duplicate of this bug. ***
Confirmed in Version 184.108.40.206.alpha0+ under Linux Mint 14 64bit
** Please read this message in its entirety before responding **
To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.
There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.
If you have time, please do the following:
Test to see if the bug is still present on a currently supported version of LibreOffice (220.127.116.11 or later): https://www.libreoffice.org/download/
If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System
Please DO NOT
Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case)
Thank you for your help!
-- The LibreOffice QA Team
This NEW Message was generated on: 2015-02-19
Works for me with "Including styles" checked.
If someone can't get it to work even with "Including styles" checked, switch back to NEW.
Win 7 Pro 64-bit, LibO Version: 18.104.22.168
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Ubuntu 14.10 64-bit
Build ID: 40m0(Build:2)