Bug 47791 - EDITING: Find & Replace by format doesn't match round doubles or find italic
Summary: EDITING: Find & Replace by format doesn't match round doubles or find italic
Status: RESOLVED WORKSFORME
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.1 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: BSA
Keywords:
: 54324 (view as bug list)
Depends on:
Blocks: 38261
  Show dependency treegraph
 
Reported: 2012-03-23 21:58 UTC by Joseph Dietrich
Modified: 2015-03-06 15:02 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of Find & Replace by format dialog result (61.71 KB, image/png)
2012-03-23 21:58 UTC, Joseph Dietrich
Details
Screenshot: find all italic text (274.60 KB, image/png)
2012-10-08 23:04 UTC, stfhell
Details
Screenshot: find all bold text (267.26 KB, image/png)
2012-10-08 23:06 UTC, stfhell
Details
ODT: sample document with formatted text find_formatted_text.odt (29.67 KB, application/vnd.oasis.opendocument.text)
2012-10-08 23:08 UTC, stfhell
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Joseph Dietrich 2012-03-23 21:58:18 UTC
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
Comment 1 Timur 2012-04-09 02:32:23 UTC
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.
Comment 2 Sebastian@SSpaeth.de 2012-06-02 08:17:10 UTC
I can confirm this bug with 3.5.3.2. 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.
Comment 3 sasha.libreoffice 2012-06-18 04:50:57 UTC
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?
Comment 4 bfoman (inactive) 2012-08-24 08:39:13 UTC
Per comment 1:

Checked with:
LO 3.5.5.3 
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Could not reproduce. Hit returned when selected Including styles.

Per comment 2:

Checked with:
LO 3.5.5.3 
Build ID: own W7 debug build
Windows 7 Professional SP1 64 bit

Could not reproduce. 1 hit returned - italic moo.
Comment 5 sasha.libreoffice 2012-08-24 09:03:07 UTC
I also can not reproduce in 3.5.5 on Fedora. May be fixed. Or I am doing something wrong.
Comment 6 bfoman (inactive) 2012-08-24 14:00:17 UTC
Do not hesitate to reopen if this bug is reproducible with the latest stable release.
Comment 7 stfhell 2012-10-08 23:02:57 UTC
"Find & replace" with formatted text still does not work reliably with LibreOffice 3.6.2.2 (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.
Comment 8 stfhell 2012-10-08 23:04:50 UTC
Created attachment 68298 [details]
Screenshot: find all italic text

LO doesn't find all italic text, see yellow markers
Comment 9 stfhell 2012-10-08 23:06:42 UTC
Created attachment 68299 [details]
Screenshot: find all bold text

Works as expected
Comment 10 stfhell 2012-10-08 23:08:49 UTC
Created attachment 68300 [details]
ODT: sample document with formatted text find_formatted_text.odt

Document with character and paragraph formatting used for above screenshots
Comment 11 stfhell 2012-10-10 12:44:40 UTC
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

fo:margin-left="1.905cm"
fo:margin-bottom="0.499cm"
fo:margin-right="0.741cm"
fo:margin-left="6.985cm"
fo:font-size="11.6000003814697pt"

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.
Comment 12 Sebastian@SSpaeth.de 2012-11-08 09:06:22 UTC
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.
Comment 13 ydutrieux 2012-12-17 17:47:04 UTC
Not reproduced in libo 3.6.1.2 
Ubuntu 12.04 - 64bits

In this version, there is a option box :
[X] Search in style
that if checked, the search is ok.
Comment 14 Michael Meeks 2012-12-18 16:19:41 UTC
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) :-)
Comment 15 Michael Meeks 2012-12-18 16:38:09 UTC
*** Bug 54324 has been marked as a duplicate of this bug. ***
Comment 16 Krisztian Pinter 2013-02-23 14:54:42 UTC
Confirmed in Version 4.1.0.0.alpha0+ under Linux Mint 14 64bit
Comment 17 QA Administrators 2015-02-19 15:30:57 UTC
** 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 (4.4.0.3 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
Comment 18 Buovjaga 2015-03-06 15:02:57 UTC
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: 4.4.1.2
Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
Locale: fi_FI

Ubuntu 14.10 64-bit 
Version: 4.4.1.2
Build ID: 40m0(Build:2)
Locale: en_US