Bug 169183 - [26.2] Mixing half-width and full-width characters, or having line breaks within cells, or partially modifying the formatting of text within cells causes the text color to appear reddish
Summary: [26.2] Mixing half-width and full-width characters, or having line breaks wit...
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
26.2.0.0 alpha0+ master
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:26.2.0
Keywords: bibisected, bisected, regression
: 169142 169425 (view as bug list)
Depends on:
Blocks: Calc-Cells
  Show dependency treegraph
 
Reported: 2025-11-01 00:15 UTC by nobu
Modified: 2025-11-15 15:22 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample png (75.33 KB, image/png)
2025-11-01 00:17 UTC, nobu
Details
Reddish Font Color (12.95 KB, application/vnd.oasis.opendocument.spreadsheet)
2025-11-01 08:53 UTC, Takenori Yasuda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description nobu 2025-11-01 00:15:28 UTC
Description:
Mixing half-width and full-width characters, or having line breaks within cells causes the text color to appear reddish.

Steps to Reproduce:
1. Open new Calc.
2. Insert Text "Aあ" in Cell [A1].
   (Mixing half-width and full-width characters)

Actual Results:
3. The text color appears slightly reddish.

Expected Results:
3. The text color is the standard color of the predefined style.


Reproducible: Always


User Profile Reset: No

Additional Info:

The same issue occurs when there are line breaks within a cell.

Not reproducible
[2025-10-22]
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 4; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: CL threaded

===

Reproducible
[2025-10-24]
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 4; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Vulkan; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: CL threaded

Reproducible
[2025-10-30]
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 4; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: en-US (ja_JP); UI: en-US
Calc: CL threaded

Reproducible
[2025-10-31]
Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 63b5081fd89140762ed375a04cccfd01c65638a6
CPU threads: 2; OS: Linux 6.1; UI render: default; VCL: gtk3
Locale: ja-JP (ja_JP.UTF-8); UI: en-US
Calc: threaded
Comment 1 nobu 2025-11-01 00:17:25 UTC
Created attachment 203650 [details]
Sample png
Comment 2 Takenori Yasuda 2025-11-01 00:41:35 UTC
Reproduced.

Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 620(Build:0)
CPU threads: 8; OS: Windows 11 X86_64 (build 26100); UI render: Skia/Raster; VCL: win
Locale: ja-JP (ja_JP); UI: ja-JP
Calc: CL threaded Jumbo
https://dev-builds.libreoffice.org/daily/master/Win-x86_64@tb103-1-TDF/2025-10-30_20.18.53/
Comment 3 raal 2025-11-01 08:05:35 UTC
I cannot reproduce in Version: 26.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: c7b3ea692f293346fbbdf2a391d9d971c34fa1f2
CPU threads: 4; OS: Linux 6.8; UI render: default; VCL: gtk3
Locale: cs-CZ (cs_CZ.UTF-8); UI: en-US
Calc: threaded

Can you attach test file?
Comment 4 Takenori Yasuda 2025-11-01 08:53:03 UTC
Created attachment 203653 [details]
Reddish Font Color
Comment 5 nobu 2025-11-01 10:27:28 UTC
This issue also occurs when partially modifying the formatting of text within cells.

For example, if you make the letter "B" in the text "AB" bold.
Comment 6 Saburo 2025-11-03 07:31:29 UTC
bibisected with linux-64-26.2 db0650bb38b75371b192b1bff9a3ae5ef0cf0308 is the first bad commit
source fa7ed3501e1ee47600b41985b7c5b7f60a6a8b29

tdf#167605 take ClipRegion at OutDev into account

adding CC: Armin Le Grand
please, take a look?
Comment 7 Takenori Yasuda 2025-11-05 05:01:12 UTC
I just noticed something — could Bug 169183 and Bug 169142 be duplicates?

The bisect results appear to be the same (Bug 169183, Comment 6 and Bug 169142, Comment 0). Also, the issue described in Bug 169142 seems to be encompassed within Bug 169183.

Could someone please confirm whether this is the case?
Comment 8 Saburo 2025-11-06 03:59:02 UTC
(In reply to Takenori Yasuda from comment #7)
> I just noticed something — could Bug 169183 and Bug 169142 be duplicates?
> 
> The bisect results appear to be the same (Bug 169183, Comment 6 and Bug
> 169142, Comment 0). Also, the issue described in Bug 169142 seems to be
> encompassed within Bug 169183.
> 
> Could someone please confirm whether this is the case?

After writing comment 6, I looked at 169142.
The commit causing the issue is the same, and they are similar.
I think it would be okay to mark it as a duplicate.
Comment 9 Takenori Yasuda 2025-11-06 04:42:59 UTC
*** Bug 169142 has been marked as a duplicate of this bug. ***
Comment 10 Regina Henschel 2025-11-11 10:18:08 UTC
Reason seems to be in https://opengrok.libreoffice.org/xref/core/editeng/source/editeng/impedit3.cxx?r=117d9624a3b861ead575394f6dfc974b4f4eeee6#3355

Before the commit it was
    static bool bBlendForTest(false);
After the commit it is
    static bool bBlendForTest(true);

It seems, that a debug-variable was not set back before committing. When I set it to false, the font color is correct for me.

@Armin: Can you please look at it.
Comment 11 Regina Henschel 2025-11-11 23:58:26 UTC
Patch is in https://gerrit.libreoffice.org/c/core/+/193827.
Comment 12 Commit Notification 2025-11-12 08:55:37 UTC
Regina Henschel committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d9f1510d6b831df1a8d36cd4cd4910236080b5ba

tdf#169183 set bBlendForTest back to false

It will be available in 26.2.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Saburo 2025-11-15 15:22:25 UTC
*** Bug 169425 has been marked as a duplicate of this bug. ***