Bug 156375

Summary: Font color not copied from Calc to Writer
Product: LibreOffice Reporter: johnks <testing1237a-c>
Component: WriterAssignee: Not Assigned <libreoffice-bugs>
Status: NEW ---    
Severity: normal CC: ilmari.lauhakangas, jag, rafael.palma.lima, stephane.guillou
Priority: medium    
Version: 7.5.4.2 release   
Hardware: All   
OS: All   
URL: https://ask.libreoffice.org/t/formatting-loss-pasting-from-spreadsheet-to-text-doc/93951
See Also: https://bugs.documentfoundation.org/show_bug.cgi?id=142544
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on:    
Bug Blocks: 108844    
Attachments: .odt output file
input file to be opened in calc and excel

Description johnks 2023-07-19 10:23:29 UTC
Description:
copying cells from excel or calc and pasting into writer .odt is not 1:1.

this is not  a problem with calc or excel because both work 1:1 on the same data so this must be problem in writer

Steps to Reproduce:
1. open .xls file in calc or excel. both produce different results in writer
2. open .xls file in calc, copy the cells and paste in writer .odt file and compare
3. open .xls file in excel, copy the cells and paste in writer .odt file and compare.
4. open xls file in excel or calc and copy paste to another .xls file saved in the other software and compare. only this one is 1:1

Actual Results:
cell formatting does not get shown in writer. 

Expected Results:
cell formatting should be shown same as in excel and calc. 


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.5.4.2 (X86_64) / LibreOffice Community
Build ID: 36ccfdc35048b057fd9854c757a8b67ec53977b6
CPU threads: 12; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

excel 2019
Comment 1 johnks 2023-07-19 10:24:09 UTC
Created attachment 188465 [details]
.odt output file
Comment 2 johnks 2023-07-19 10:24:35 UTC
Created attachment 188466 [details]
input file to be opened in calc and excel
Comment 3 Rafael Lima 2023-07-19 14:30:58 UTC
I believe this is a duplicate of bug 142544.
Comment 4 Rafael Lima 2023-07-19 14:32:31 UTC
(In reply to Rafael Lima from comment #3)
> I believe this is a duplicate of bug 142544.

Well actually not a dupe, but rather a similar request... bug 142544 requests the same for Impress, whereas this ticket requests to retain cell formatting in Writer.
Comment 5 Wolfgang Jäger 2023-07-25 10:09:23 UTC
You may also throw a glance on this Q&A topic and my (Lupp's) comment there: https://ask.libreoffice.org/t/formatting-loss-pasting-from-spreadsheet-to-text-doc/93951.
Comment 6 Alistair Saywell 2023-07-25 10:48:16 UTC
From Calc, if I click 
Edit > Paste special > Paste special > HyperText Markup Language (HTML)
then the full formatting is pasted into Writer as a table with all font colours, background colours, italics and bolding.

So it is possible, just doesn't do it for default paste
Comment 7 Wolfgang Jäger 2023-07-25 11:19:28 UTC
(In reply to Alistair Saywell from comment #6)
> From Calc, if I click 
> Edit > Paste special > Paste special > HyperText Markup Language (HTML)
> then the full formatting is pasted into Writer as a table with all font
> colours, background colours, italics and bolding.
> 
> So it is possible, just doesn't do it for default paste

Doesn't work for me (and would be gravely misleading, imo).
For me ordinary pasting does the job if exactly one cell from a Calc sheet was copied. 
Having copied a true range No Paste Special... option preserves the formats - except the full insertion as an OLE object.
Comment 8 Stéphane Guillou (stragu) 2023-08-02 17:51:49 UTC
There are other bug reports about formatting not being copied across between Calc cells and a Writer table when they actually could.
- strikethrough text: bug 155019
- background colour: bug 149661

I guess what isn't already covered (unless I haven't found the report) is the red font colour in your example.

I think it would be a good idea to focus this report on the font colour, so we have focused tasks that are more actionable?
Comment 9 johnks 2024-06-01 04:26:05 UTC
copied from calc to excel. zero formatting on normal paste. on paste special> html, then full formatting and all features get pasted. including red color

Version: 24.2.0.3 (X86_64) / LibreOffice Community
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU threads: 12; OS: Windows 10.0 Build 17763; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded