Bug 42938

Summary: FILEOPEN: RTF import forgets background colors in nested table cells
Product: LibreOffice Reporter: Jean-Baptiste Faure <jbfaure>
Component: WriterAssignee: Miklos Vajna <vmiklos>
Status: CLOSED FIXED    
Severity: normal CC: arnaud.versini, cedric.bosdonnat.ooo
Priority: medium    
Version: Master old -3.6   
Hardware: All   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Bug Depends on: 42858    
Bug Blocks:    
Attachments: Partial patch.

Description Jean-Baptiste Faure 2011-11-14 21:07:09 UTC
This bug report comes from bug 42858. To reproduce open the bugdoc https://bugs.freedesktop.org/attachment.cgi?id=53466 with the master.
The table seems correctly rendered but the background colors are missing in most of the cells.
To see what we should obtain, open https://bugs.freedesktop.org/attachment.cgi?id=53525

I do not know if it is linked, but cell borders seems not correctly set too.

Best regards. JBF
Comment 1 Jean-Baptiste Faure 2011-11-14 21:10:46 UTC
Assigned to Miklos. Please feel free to reassign to default if you can't handle this bug.

Thank you.
Comment 2 Miklos Vajna 2011-11-15 05:50:18 UTC
Thanks, will have a look.
Comment 3 Miklos Vajna 2011-12-18 15:52:00 UTC
Created attachment 54563 [details]
Partial patch.

I tried to fix this tonight, so far I only have a partial solution. The attached patch makes the first column (i.e. Jan/May/Sep) be imported propertly, but other months now aren't imported at all: DomainMapperTableHandler::endTable() results in 'Exception during table creation' (without an exception message).

To be continued.
Comment 4 Miklos Vajna 2011-12-18 15:55:08 UTC
Cedric, just in case this exception rings any bell, please let me know. :)

Thanks.
Comment 5 Cédric Bosdonnat 2011-12-19 00:48:17 UTC
(In reply to comment #4)
> Cedric, just in case this exception rings any bell, please let me know. :)

Well, that can be anything... the only way to know what's happening there is to debug the convertToTable call to see where the exception is thrown. Having interesting messages for UNO exceptions is an easy hack... and that method is full of exceptions like that ;)
Comment 6 Jean-Baptiste Faure 2012-03-19 22:56:41 UTC
Hi Miklos, Cédric, 

It seems that the color problem is fixed in LO 3.5.1. I do not know which commit changed the behaviour. That said, cell borders are still missing. If I find a bug report for this cell borders problem only, I will close this one as fixed.
If you can provide the commit ID which fix the color problem, please do it.

Side note: if I save odt file (https://bugs.freedesktop.org/attachment.cgi?id=53525) in RTF format with LO 3.5.1 the table is not rendered correctly. It seems that RTF exporter does not know how to manage tables inside a table. Surely not linked bug.

Best regards. JBF
Comment 7 Jean-Baptiste Faure 2012-03-20 22:42:48 UTC
For the cell borders problem, please follows it in the dedicated bug 44715.
So closing this bug as initial problem (background cell color) is fixed.

Will file a new bug report for table inside a table export problem if not already filed.

Best regards. JBF
Comment 8 Jean-Baptiste Faure 2012-03-20 22:43:21 UTC
closing.