Bug 118461 - No background color when pasting cells from Calc as RTF in Writer
Summary: No background color when pasting cells from Calc as RTF in Writer
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
3.5.7.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: RTF-Paste
  Show dependency treegraph
 
Reported: 2018-06-29 19:08 UTC by Telesto
Modified: 2023-03-15 10:53 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Telesto 2018-06-29 19:08:03 UTC
Description:
No background color when pasting cells from Calc as RTF in Writer

Steps to Reproduce:
1. open Calc
2. Add a background color to the cells
3. Copy them
4. Special as RTF in Writer 

The other way around is working (table in Writer), pasting it as RTF in Calc.

Work around: HTML paste

Actual Results:
No background color

Expected Results:
Should be working. 


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 6.2.0.0.alpha0+
Build ID: 7e1cabd96526cb7befc5ea5073358093efbe12d0
CPU threads: 4; OS: Windows 6.3; UI render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2018-06-27_23:39:20
Locale: nl-NL (nl_NL); Calc: CL
Comment 1 Dieter 2018-06-30 15:47:57 UTC
I confirm it with

Version: 6.1.0.0.beta2 (x64)
Build ID: 0f4d2060bc90b4008fbc8e6d9a49ec7eeea60b78
CPU threads: 4; OS: Windows 10.0; UI render: GL; 
Locale: en-US (de_DE); Calc: CL
Comment 2 QA Administrators 2019-07-01 02:47:26 UTC Comment hidden (obsolete)
Comment 3 Dieter 2021-06-01 06:25:55 UTC
Still present in

Version: 7.1.4.1 (x64) / LibreOffice Community
Build ID: f67b1ddedeb24fca1c5938e7cebfab73d708b35b
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL
Comment 4 Aron Budea 2021-10-12 23:16:46 UTC
I'm assuming this and bug 93362 are somewhat related (feel free to correct me if not).

Sample spreadsheet with some conditional formatting as well (which doesn't get copied, either): attachment 147289 [details]
Comment 5 orbanbalage 2022-11-17 13:51:48 UTC
Perhaps this is related to bug 112053?

In the sense that both are pointing at the same fact that the background color is not supported?

If the original OOo implementation was to mimick MSWord on Windows, then this is by design:


\cbN Background color (default is 0). 

N specifies the color as an index of the color table.
Note: Windows versions of Word have never supported this control word (see \chcbpatN for Word background color).

– https://web.archive.org/web/20190708132914/http://www.kleinlercher.at/tools/Windows_Protocols/Word2007RTFSpec9.pdf

I can reproduce this simply on Mac with TextEdit, saving the string "cowsay" with a black background produces (on the relevant lines) the code:
> \f0\fs24 \cf2 \cb3 cowsay

pasting the same RTF content into LO makes the black background disappear, and saving the file as RTF does not include the \cb3 (for black) as expected:

> \hich\af5\loch\cf17\fs24\f5\loch
cowsay