Bug Hunting Session
Bug 117217 - Background colors for table cell are not retained after 24 column in word doc table
Summary: Background colors for table cell are not retained after 24 column in word doc...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: difficultyInteresting, easyHack, skillDebug
Depends on:
Blocks: Table-Styles
  Show dependency treegraph
 
Reported: 2018-04-25 05:32 UTC by jvchbabu
Modified: 2018-08-22 18:58 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
input and output files (25.08 KB, application/zip)
2018-04-25 05:33 UTC, jvchbabu
Details
max21columns.odt: 30 column table with RES_BACKGROUND cells (10.73 KB, application/vnd.oasis.opendocument.text)
2018-08-18 10:33 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description jvchbabu 2018-04-25 05:32:18 UTC
Description:
We use LibreOffice 5.2.3.3 to create  .docx and .doc documents using UNO Java API.
 We use MS Word 97 filter to produce .doc documents and MS Word 2007 XML  to produce .docx documents.

 We have content from HTML file. Background color for the text is not retained  id doc ouput.
 
We have a bookmark  in .odt  and used XDocumentInsertable.insertDocumentFromURL  API to insert text from HTML file in place of bookmark XTextCursor . But generated doc file is not retaining background colors for table cell after 24 column in doc output file
  
Please find the attachment for source html generated output

Steps to Reproduce:
1. Have a html content file with table and background colors in cells(refer sourcehtml)
2.Have  odt template with one bookmark to embed html content( refer template.odt)
3. Use UNO Java api's XDocumentInsertable.insertDocumentFromURL  API to insert text from HTML file in place of bookmark XTextCursor 

Actual Results:  
Background colors for table cell are not retained after 24 column in word doc table

Expected Results:
Background colors for table cell should be retained after 24 column in word doc table


Reproducible: Always


User Profile Reset: No



Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/65.0.3325.181 Safari/537.36
Comment 1 jvchbabu 2018-04-25 05:33:36 UTC
Created attachment 141616 [details]
input and output files
Comment 2 Mike Kaganski 2018-04-25 07:25:21 UTC
Thank you for efforts to improve LibreOffice!

Unfortunately, your report does not allow to reproduce the problem. What is "Use UNO Java api's XDocumentInsertable.insertDocumentFromURL  API to insert text from HTML file in place of bookmark XTextCursor" in the steps? Do you expect others to reinvent some code that you have in mind?

Please provide steps that make it possible to reproduce the issue without involved steps like doing programming: either attach all the necessary scripts and detailed steps how to run them, or provide steps how to reproduce this detached from using API. (I must say that simply opening the HTML and saving it as DOC does not reproduce the problem neither with 5.2.3.2, nor with 6.0.4.1).

Also, filing bugs against 5.2 is not useful. Before filing a bug, please test with current versions (currently it's 5.4.6 and 6.0.3) to check if the issue is fixed in them.
Comment 3 Justin L 2018-08-18 10:33:52 UTC
Created attachment 144264 [details]
max21columns.odt: 30 column table with RES_BACKGROUND cells

The maximum # of columns that LO exports to DOC is 21 because of wrtww8.cxx
sal_uInt8 nBoxes0 = rTabBoxes.size();
    if (nBoxes0 > 21)
        nBoxes0 = 21;

That has been true since the initial import from OOo.
Comment 4 Justin L 2018-08-22 18:58:50 UTC
I tried simply increasing the number, but that didn't work, so 21 must not be an arbitrary number.