Bug 162046 - Some strings are not found by search and replace with formatting added to the search box
Summary: Some strings are not found by search and replace with formatting added to the...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.2.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2024-07-15 15:50 UTC by Daniele
Modified: 2024-08-20 19:39 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Video showing the bug (568.04 KB, video/mp4)
2024-07-15 15:50 UTC, Daniele
Details
Test file (37.36 KB, application/vnd.oasis.opendocument.text)
2024-07-15 15:50 UTC, Daniele
Details
Test file2 (11.70 KB, application/vnd.oasis.opendocument.text)
2024-07-15 16:10 UTC, Daniele
Details
Screenshot with the search without modify nothing in the file (271.39 KB, image/png)
2024-07-16 00:30 UTC, m_a_riosv
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Daniele 2024-07-15 15:50:14 UTC
Description:
I hava come across this problem in a very large document I am working with with three columns one with German text, one with Spanish text, one with French.
I sometimes need only to search and replace words in one of the languages, so I add to the Advanced Search Window, Format - Language - Spanish (Spain) in our example. But some words or sometimes none are skipped. I managed to copy paste one of those in a example file. The way I coded the text is by selecting the whole column and then clicking at the bottom of the page (between Default page style and insert) to assign it a specific language.

Steps to Reproduce:
1. Open attached document
2. Look for word kairos adding it Spanish (Spain) as a language beforehand
3. 

Actual Results:
The search will skip string n. 4.

Expected Results:
It should go through all matching strings in the searched language


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 8; OS: macOS 14.5; UI render: Skia/Metal; VCL: osx
Locale: en-US (en.UTF-8); UI: en-US
Calc: threaded
Comment 1 Daniele 2024-07-15 15:50:35 UTC
Created attachment 195315 [details]
Video showing the bug
Comment 2 Daniele 2024-07-15 15:50:51 UTC
Created attachment 195316 [details]
Test file
Comment 3 Daniele 2024-07-15 16:10:00 UTC
The same thing happens if I look for the same word not in italics, see new attached test file kairos2. I noticed that if I delete some text before or after the word which should not be found but it is or which is found but should not, the problem disappears, but this cannot be considered a solution, because in a document with almost a million words, there is no way a normal user could know why LO is behaving this way.
Comment 4 Daniele 2024-07-15 16:10:20 UTC
Created attachment 195317 [details]
Test file2
Comment 5 m_a_riosv 2024-07-16 00:30:45 UTC
Created attachment 195324 [details]
Screenshot with the search without modify nothing in the file

With the first test file works for me.
Version: 24.2.5.2 (X86_64) / LibreOffice Community
Build ID: bffef4ea93e59bebbeaf7f431bb02b1a39ee8a59
CPU threads: 16; OS: Windows 10.0 Build 22631; UI render: Skia/Raster; VCL: win
Locale: es-ES (es_ES); UI: en-US
Calc: CL threaded

Please test in safe mode, Menu/Help/Restart in Safe Mode

I don't understand how to test in your comment#3
Comment 6 Rainer Bielefeld Retired 2024-07-16 15:10:01 UTC
REPRODUCIBLE with Server Installation of Version: 24.8.0.0.alpha0+ (X86_64)
Build ID: 2146e66d8df2b7b6a2dd868e886cae76aaf7f48b
CPU threads: 12; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE; Theme: Colibre
Calc: threaded – normal Test Profile created from 7.6. 

My steps:

1. Open attached document kairos.odt
2. Menu  ˋEdit → Find & Replace → if any option is checked uncheck 
   → Search String = "kairos" → Find all
   » as expected 6 hits  
3. close document, relaunch LibO, open attached document kairos.odt
4. Menu  ˋEdit → Find & Replace → [Attributes] → Check Language → OK 
   → [Format] → Select "Spanish (Spain) → OK → Search String = "kairos"
   → Find allˊ
   » Expected: 6 hits(?)
    Actual: 5 hits, No. 4 not found  😥❓ 
5. Close Search Dialog
6. ˋTools → Language → All Document → "Spanish (Spain)"  
7. Redo Search from step 4 → Redo testsˊ
   » Expected: 6 hits
   Actual: 6 hits                    👌

So simply "kairos" No 4 seems not to be Spanish?

New test starting with step (3) but doing (5) before 4:
👌will show 6 hits                   👌

Additional Info: 
a) Only step (6) will do the trick and heal the problem  
a1) Selecting "Spanish (Spain) in Format Characters Dialog for "kairos" does 
    not work 
a2) also detour ˋSwedisch → Spanish (Spain)ˊ does not heal Search
a3) also selecting additional characters left and right from "kairos" for (a1) 
   and (a2) does not heal Search.

Strange!

b) Still not sure whether LibO issue or damaged document.
Comment 7 Rainer Bielefeld Retired 2024-07-16 15:20:34 UTC
c) Already REPRODUCIBLE with reporter's sample document and 
Version: 6.0.7.3 (x64)
Build ID: dc89aa7a9eabfd848af146d5086077aeed2ae4a5
CPU threads: 12; OS: Windows 10.0; UI render: default; 
Locale: de-DE (de_DE); Calc: CL

d) 4.0.0. finds nothing with language Attribute active
Comment 8 Rainer Bielefeld Retired 2024-07-16 15:29:18 UTC
e) My step (4) will work for Search Strin "kair", string 4 will be found 
e1) stops working with Search String "kair", string 4 will NOT be found
Comment 9 Rainer Bielefeld Retired 2024-07-16 16:40:33 UTC
(In reply to Rainer Bielefeld Retired from comment #8)
Sorry, I wrote some nonsense in #8x (e1)! 

Correct: 
e) My step (4) will work for Search Strin "kair", string 4 will be found 
e1) stops working with Search String "kairo", string 4 will NOT be found
Comment 10 raal 2024-08-20 19:39:24 UTC
Confirm with Version: 25.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1565181908a06dcdb8d97d6be8ff773acd1d05cb
CPU threads: 4; OS: Linux 6.5; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

and Version: 4.1.0.0.alpha1+
Build ID: a2c9d4f8bbde97f175bae4df771273a61251f40