Bug 142120 - Application color for CalcText not respected for cells with line breaks
Summary: Application color for CalcText not respected for cells with line breaks
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.2.0.0.alpha0+
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Options-Dialog-Colours
  Show dependency treegraph
 
Reported: 2021-05-06 09:57 UTC by Heiko Tietze
Modified: 2023-01-19 17:42 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot with LibreOffice Dark color scheme (91.26 KB, image/png)
2021-05-06 09:57 UTC, Heiko Tietze
Details
test ODS with different text return types (10.90 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-07-27 01:41 UTC, Stéphane Guillou (stragu)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Heiko Tietze 2021-05-06 09:57:32 UTC
Created attachment 171685 [details]
Screenshot with LibreOffice Dark color scheme

Via Tools > Options > LibreOffice > Application Colors: Text (under Spreadsheet) it is possible to change the appearance of text in case of value highlighting. This works for ordinary cells but not if the cell content has multiple lines. 

Without value highlighting the font color is set via General > Font Color. And that works for all kind of cells.

The example uses LibreOffice Dark color scheme (see bug 142116); the cursor points to the cell with "Hello \n World" in black while A1 and B1 adopt the defined color.
Comment 1 Stéphane Guillou (stragu) 2021-07-27 01:41:03 UTC
Created attachment 173873 [details]
test ODS with different text return types

Heiko, I tried in 7.0.6, 7.2 RC1 and 7.3 alpha0+ (on Ubuntu 18.04), and I couldn't even change the text colour for any cell. In "Tools > Options > LibreOffice > Application Colors", starting from the default colour scheme, I change the value for "Spreadsheet > Text", clicked Apply or OK: no change whatsoever.

If I change the scheme to Dark, the text colour does change to whatever the scheme defines, but changing the Text colour again does not work either.

Version: 7.2.0.1 / LibreOffice Community
Build ID: 32efc3b7f3a71cfa6a7fa3f6c208333df48656cc
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 7.3.0.0.alpha0+ / LibreOffice Community
Build ID: cd2b5168e8ef1cb6e721bc5220421464ed723096
CPU threads: 8; OS: Linux 4.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
TinderBox: Linux-rpm_deb-x86_64@86-TDF, Branch:master, Time: 2021-07-21_14:56:23
Calc: threaded

Adding a test document to make it easy to test.

Which version were you using, Heiko?
Comment 2 Heiko Tietze 2021-08-23 09:59:46 UTC
(In reply to stragu from comment #1)
> Which version were you using, Heiko?

You have to enable View > Value Highlighting to get numbers in blue and text in black. This black font color is hard-coded (not the blue) and should follow what's defined in General > Font Color (like it's the fact when "Value Highlighting" is off).

Version: 7.2.0.4 / LibreOffice Community
Build ID: 20(Build:4)
CPU threads: 8; OS: Linux 5.13; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (en_US.UTF-8); UI: en-US
7.2.0-1
Calc: threaded
Comment 3 Buovjaga 2022-05-19 12:05:13 UTC
Reproduced with all UI backends

Version: 7.4.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: a353f633ec029fc5c7cdc8062aefb6f979265a9e
CPU threads: 2; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: fi-FI (fi_FI); UI: en-US
Calc: threaded Jumbo

Arch Linux 64-bit
Version: 7.4.0.0.alpha1+ / LibreOffice Community
Build ID: 60addb6e864e1e8eb6c4ea7bb5be04a94a1ea7fb
CPU threads: 8; OS: Linux 5.17; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded
Built on 19 May 2022
Comment 4 Rafael Lima 2023-01-19 14:12:19 UTC
Still reproducible in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: f43d2015ab45505ea068820b8ef6af91984fc95c
CPU threads: 16; OS: Linux 5.19; UI render: default; VCL: kf5 (cairo+xcb)
Locale: pt-BR (pt_BR.UTF-8); UI: en-US
Calc: CL threaded
Comment 5 Rafael Lima 2023-01-19 17:42:47 UTC
Code pointer:

ScDrawStringsVars::SetPattern

https://opengrok.libreoffice.org/xref/core/sc/source/ui/view/output2.cxx?r=f9395a12&mo=10965&fi=303#303

For some weird reason SetPattern is not called when the input string has a line break. I investigated it but could not find a reason why.