Bug 147227 - LO Writer Editing: Find and replace options don't have the expected effect
Summary: LO Writer Editing: Find and replace options don't have the expected effect
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find&Replace-Dialog
  Show dependency treegraph
 
Reported: 2022-02-06 11:09 UTC by Christian Lehmann
Modified: 2024-02-25 14:15 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
test file for find-and-replace options (10.13 KB, application/vnd.oasis.opendocument.text)
2022-02-21 17:47 UTC, Christian Lehmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Christian Lehmann 2022-02-06 11:09:31 UTC
Description:
The file contains the following string
sí̱/si̱i̱
In the 'Find' field, I enter si.
In the options, I mark 'Whole words only' and 'Diacritic-sensitive'.
'Find next' stops at both of the above occurrences. This means that neither of the two options does what the user expects.

Steps to Reproduce:
1. The file contains words containing diacritics and words adjacent to special characters.
2. In the 'Find and replace' dialogue box, mark 'whole words only'.
3. Enter a search string in the Find field and press Next.

Actual Results:
'Whole words only' finds the string if adjacent to non-ascii characters, too.
'Diacritic-sensitive' considers a non-ASCII string as a find for an ASCII string. It apparently only considers ANSI characters and ignores other diacritics.

Expected Results:
In the example, 'Find next' should stop at neither of the two examples.


Reproducible: Always


User Profile Reset: Yes



Additional Info:
Apparently the implementation has a very simple notion both of word boundary and of diacritic. Both should be refined.
Comment 1 Dieter 2022-02-21 07:35:00 UTC
Christian, thank you for reporting the bug. Please attach a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' once the requested document is provided.
(Please note that the attachment will be public, remove any sensitive information before attaching it)
Comment 2 Christian Lehmann 2022-02-21 17:47:39 UTC
Created attachment 178447 [details]
test file for find-and-replace options

Try the find-and-replace options as explained in the attachment.
Comment 3 Dieter 2022-02-21 18:47:17 UTC
Steps:
1. Open attachment 178447 [details]
2. Edit -> Find and Replace
3. Test 1: Insert "word" in Find-field and select "Whole words only"
4. Find next => "word" in second paragraph is found
5. Test 2: Insert "a" in Find-field and select "Diacritic sensitive"
6. Find next => "á" (5th paragraph) and every "a" is found

Christian, do you get the same result? Does this cover your description of actual an expected result in comment 0?

Pleae also have a look at bug 146521.

Tested with
Version: 7.3.0.3 (x64) / LibreOffice Community
Build ID: 0f246aa12d0eee4a0f7adcefbf7c878fc2238db3
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 4 Christian Lehmann 2022-02-21 20:07:34 UTC
Yes, this is what I meant. In Test 2, not only is the ä found, but also the following a's with diacritics.
My impression (i.e, without having executed a complete and systematic test) is that diacritics are recognized as such if they are part of one (complex) character, but are not seen if they are added upon or below a simple character as "non-spacing diacritic".
Comment 5 Dieter 2022-02-21 20:22:58 UTC
(In reply to Christian Lehmann from comment #4)
> Yes, this is what I meant. In Test 2, not only is the ä found, but also the
> following a's with diacritics.

Very strange: In my initial test, "ä" "a̱" are not found. But now they are included in the search result.

So let's change status to NEW.
Comment 6 QA Administrators 2024-02-23 03:14:52 UTC Comment hidden (obsolete)
Comment 7 Christian Lehmann 2024-02-25 14:15:25 UTC
The bug persists unchanged in
Version: 7.6.2.1 (X86_64) / LibreOffice Community
Build ID: 60(Build:1)
CPU threads: 12; OS: Linux 5.14; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (de_DE.UTF-8); UI: en-US
Calc: threaded