Bug 111977 - Find and Replace: Find formatting like italics not reliable
Summary: Find and Replace: Find formatting like italics not reliable
Status: RESOLVED DUPLICATE of bug 95927
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.4.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-08-22 20:54 UTC by Yannick.D
Modified: 2020-10-22 11:49 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Searching for text set in italics is unreliable (666.57 KB, image/png)
2017-08-22 20:55 UTC, Yannick.D
Details
Example document demonstrating this bug (13.83 KB, application/vnd.oasis.opendocument.text)
2017-08-22 20:56 UTC, Yannick.D
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yannick.D 2017-08-22 20:54:18 UTC
Description:
LO does not reliably find strings formatted in italics - some get detected, others not. As I can't reproduce under which circumstances it is unreliable please see the example odt-file and screenshots attached.
I would argue this is a critical bug since using Find and Replace for dealing with "dirty" formatting in large documents is an intended use of this function and often occurs directly before printing. Loosing (parts of) this formatting data (and probably not even noticing it!) can have severe consequences. But I leave that decision to you guys.

Steps to Reproduce:
1.Open attached odt-file in LO.
2.Open "Find & Replace"-dialoge under "Edit".
3.Expand "More options" and check "Regular Expressions".
4.Search for any number of any character by using the term ".*" and add "Format…" > font > style > italics.
5. Click "Search all".

Actual Results:  
Only 1 out of 4 strings set in italics is found and marked. (See screenshot.)

Expected Results:
All 4 strings set in italic should be found and marked.


Reproducible: Sometimes

User Profile Reset: Yes

Additional Info:
Same behavior in LO 5.2.3.5 and OpenOffice 4.1.3


User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/603.3.8 (KHTML, like Gecko) Version/10.1.2 Safari/603.3.8
Comment 1 Yannick.D 2017-08-22 20:55:58 UTC
Created attachment 135741 [details]
Searching for text set in italics is unreliable
Comment 2 Yannick.D 2017-08-22 20:56:57 UTC
Created attachment 135742 [details]
Example document demonstrating this bug
Comment 3 Thomas Lendo 2017-09-06 23:05:57 UTC
Hi Yannick, why are you using regular expressions? You can find all blocks of words that are formatted in italics when only searching with Format... > Fonts > Italics without any string in the "Find" textbox.
Comment 4 Buovjaga 2017-09-10 17:55:54 UTC
Similar:
bug 95927
bug 103400
bug 106076

Yannick: maybe your report can be closed as a duplicate of one of those?
Comment 5 Yannick.D 2017-09-11 17:03:32 UTC
(In reply to Thomas Lendo from comment #3)
> Hi Yannick, why are you using regular expressions? You can find all blocks
> of words that are formatted in italics when only searching with Format... >
> Fonts > Italics without any string in the "Find" textbox.

The use case was to replace each string (therefore ".*") set in italic with "<i>$0</i>" which to my knowledge is only possible using regular expressions. (The broader goal was to remove all direct formatting and than reapply italics/emphasis.) But you're absolutely right, in this example both searches show the very same result.
Comment 6 Yannick.D 2017-09-11 17:13:28 UTC
(In reply to Buovjaga from comment #4)
> Similar:
> bug 95927
> bug 103400
> bug 106076
> 
> Yannick: maybe your report can be closed as a duplicate of one of those?

Thanks for the hint! Unfortunately I only found one of those before filing this report. *Could* be the same issue but I'm not the one to judge. But please feel free to close it if anyone can confirm it as duplicate.

106076 contains macros and is about loosing formatting too
103400 tldr; but somehow related to MS Word
95927 seems only to be related to documents saved in LO 3.5

=> My report contains a short and isolated example and is easily reproducible as far as I can tell, so I leave it open. But as I said, anyone is free to close if it is indeed related.
Comment 7 Buovjaga 2017-11-30 12:58:11 UTC
I think I'll go with bug 95927 as a dupe.

*** This bug has been marked as a duplicate of bug 95927 ***