Bug 164402 - Find & Replace Can't Find a Character with White as its Colour
Summary: Find & Replace Can't Find a Character with White as its Colour
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
24.8.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Find-Search
  Show dependency treegraph
 
Reported: 2024-12-20 20:39 UTC by Doug Lacy
Modified: 2024-12-21 14:31 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample document exhibiting the bug (15.68 KB, application/vnd.oasis.opendocument.text)
2024-12-20 20:41 UTC, Doug Lacy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Lacy 2024-12-20 20:39:59 UTC
Description:
I have a document with some of the characters displayed with White as the colour. I want to change their colour from White to Black so I can display the document without a dark grey background.

In the Find & Replace dialog box, I "Find First" for "." with the format set to "White", and it's unable to find any characters. If I do the same with the format set to "Yellow" or "#FFC080" (also in the sample document), it's able to find all characters.

Steps to Reproduce:
1. Open the sample document.
2. Open the Find & Replace dialog box (Ctrl-H)
3. With the cursor in the Find box, click "Format..." and choose a Font Color of White in the Font Effects tab.
4. Type "." (without the quotes) in the Find box, and check "Regular Expressions" in the "Other options" list.
5. Click "Find Next" to find the first occurrence of any character with White at its colour.

Actual Results:
After clicking "Find Next", the dialog box indicates "Search key not found".

Expected Results:
If the character colour is set to White, then the first character with its colour set to White will be selected. If I change the chosen colour to Yellow (for example), it finds the first Yellow character.


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 24.8.4.2 (X86_64) / LibreOffice Community
Build ID: bb3cfa12c7b1bf994ecc5649a80400d06cd71002
CPU threads: 24; OS: Windows 11 X86_64 (10.0 build 22631); UI render: Skia/Raster; VCL: win
Locale: en-CA (en_CA); UI: en-US
Calc: CL threaded
Comment 1 Doug Lacy 2024-12-20 20:41:35 UTC
Created attachment 198195 [details]
Sample document exhibiting the bug
Comment 2 m_a_riosv 2024-12-21 03:45:12 UTC
Seems something else is involved here.
The issue is reproducible with your text, but not with a new one an applying to it white color.

I'm not sure if it is a LibreOffice bug.
Comment 3 BogdanB 2024-12-21 10:57:51 UTC
In your document, in order, you have 4 colors:
ffffff, ffc080, ffff00 and f0fff0. So, the last word is not white, but almost white, it's a bit different.

I solved your case:
Find and Replace, check "Attributes...", there check Effects and Font color, and press Find all: Result Search key found 1 times with selected text: "[00:00:00.00 - 00:00:05.00]", where the color is a real white. 

Please retest with my instructions. You dont need to check for Regular expresion and dont need to insert any dot in the Find field.
Comment 4 Doug Lacy 2024-12-21 13:55:12 UTC
I followed instructions, and it worked in the sample document for changing White to Black. It did NOT work for any of the other colours in the sample document.

As an aside (this is a new bug which I'll leave to you to report), Writer crashed when I tried to Reload the document after changing White to Black.
Comment 5 BogdanB 2024-12-21 14:25:44 UTC
Remember that you have this colors in your document
ffffff, ffc080, ffff00 and f0fff0

I tried with ffc080 for yellow and I could replaced it with black very easy.
You need to go in the format to Font Effect - font color and from the color choose custom and insert the color ffc080 and in the replace field black, and everything was fine. The color was replaced.

I will keep the bug open until I see you solved the problem.
Comment 6 BogdanB 2024-12-21 14:31:35 UTC
Indeed, it is not working for ffc080. Sorry for not testing enough.

Repro with
Version: 24.8.3.2 (X86_64) / LibreOffice Community
Build ID: 48a6bac9e7e268aeb4c3483fcf825c94556d9f92
CPU threads: 16; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: ro-RO (ro_RO.UTF-8); UI: en-US
Calc: threaded