Summary: | FILESAVE: Calc ignores directly formatted text color in .ods files | ||
---|---|---|---|
Product: | LibreOffice | Reporter: | Patrick Luby (volunteer) <guibomacdev> |
Component: | Calc | Assignee: | Not Assigned <libreoffice-bugs> |
Status: | NEW --- | ||
Severity: | normal | CC: | buzea.bogdan, heiko.tietze, kira.tubo, stephane.guillou |
Priority: | medium | Keywords: | bibisectRequest, filter:ods, regression |
Version: | 5.4 all versions | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.documentfoundation.org/show_bug.cgi?id=156182 https://bugs.documentfoundation.org/show_bug.cgi?id=149571 |
||
Whiteboard: | |||
Crash report or crash signature: | Regression By: | ||
Bug Depends on: | |||
Bug Blocks: | 108252, 157844 | ||
Attachments: |
Screen snapshot of .ods file after saving new spreadsheet and reopening it
Screen snapshot of .xlsx file after saving new spreadsheet and reopening it Saved .ods file Saved .xlsx file |
Description
Patrick Luby (volunteer)
2023-10-05 14:07:52 UTC
Created attachment 190044 [details]
Screen snapshot of .ods file after saving new spreadsheet and reopening it
Created attachment 190045 [details]
Screen snapshot of .xlsx file after saving new spreadsheet and reopening it
Created attachment 190046 [details]
Saved .ods file
Created attachment 190047 [details]
Saved .xlsx file
Note for myself: I found that the cell's ATTR_BACKGROUND gets set differently depending on whether you are opening the .ods or the .xlsx files attached to this bug. Next step: find where ATTR_BACKGROUND is set during loading of the document: diff --git a/sc/source/core/data/patattr.cxx b/sc/source/core/data/patattr.cxx index 7638652e6857..87383ec29398 100644 --- a/sc/source/core/data/patattr.cxx +++ b/sc/source/core/data/patattr.cxx @@ -472,6 +472,10 @@ void ScPatternAttr::fillColor(model::ComplexColor& rComplexColor, const SfxItemS } else { + // tdf#157618 when opening the .ods file, ATTR_BACKGROUND is set + // to the Error style's red background color whereas opening the + // .xlsx file, ATTR_BACKGROUND is set to the cell's directly + // formatted transparent background color. aBackColor = rItemSet.Get(ATTR_BACKGROUND).GetColor(); } Unrelated for this issue, just for completeness. Resolved the contrast issues from bug 156182 with https://gerrit.libreoffice.org/c/core/+/158024 (new contrast applies to all colors but Light Blue 2 aka Tango Sky, which is the default for object background). Thanks Patrick. Reproduced on Linux with: Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: b83f069101f1e6d8aaac09a805f02bbc4c619e7a CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3 Locale: en-AU (en_AU.UTF-8); UI: en-US Calc: threaded The black color is lost also in Version: 7.1.0.0.alpha0+ Build ID: abcc4eb907661e07ad850ccce7eb06f129da4286 CPU threads: 16; OS: Linux 6.2; UI render: default; VCL: gtk3 Locale: ro-RO (ro_RO.UTF-8); UI: en-US Calc: threaded I don't have older versions. Reproduced in: Version: 5.4.0.0.alpha1 (x64) Build ID: 0b9f9bef65bb21ebb6a64aafad448f7f62dc824a CPU threads: 6; OS: Windows 6.19; UI render: default; Locale: en-US (en_US); Calc: CL Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community Build ID: 676e0527d2f31556eccae314fbb12ce204f02ec7 CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win Locale: en-US (en_US); UI: en-US Calc: CL threaded ----------------- NOT reproduced in: Version 4.0.0.0.beta1 (Build ID: 87906242e87d3ddb2ba9827818f2d1416d80cc7) |