Background color of a table row disappears after saving as docx. Steps to reproduce: 1. Create the following file: A line [a two-row and two-column table with any contents] Another line 2. Highlight the top row; Table->properties->background->row --> use any background color (I used red) 3. Save as docx 4. Reopen the same file Result: The background color disappears Expected result: the background color is preserved.
I confirm it with Version: 6.1.0.0.alpha0+ (x64) Build ID: d64ce643275e0b2b0dea9e532fc261391dc8793c CPU threads: 4; OS: Windows 10.0; UI render: GL; TinderBox: Win-x86_64@42, Branch:master, Time: 2018-03-01_03:24:30 Locale: de-DE (de_DE); Calc: CL additional information: the same problem occurs if you choose background => table the backround persists, if you choose background => cell
After saving as .doc the background color is preserved.
After saving as .doc the background color is not preserved anymore! LO 6.0.3.2, Mac 10.9.5
(In reply to haim kilov from comment #3) > After saving as .doc the background color is not preserved anymore! > LO 6.0.3.2, Mac 10.9.5 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
The docx format is not able to store the information "color of a row". So this is not our bug. The docx format has only "color of cell" and "color of entire table". Solution for you: Select the row and then from the background tab do not select the item "row" but use the item "cell". I can confirm that LibreOffice handles "color for table" wrongly in OOXML export. It should write the element nesting tbl -> tblPr -> shd. It is not a "fileopen" bug. I suggest, to change the subject accordingly.
Created attachment 144250 [details] tableBackground_cellsUndefined.docx: in MS Word, although table shd=blue, undefined cells are white > I can confirm that LibreOffice handles "color for table" wrongly in OOXML > export. It should write the element nesting tbl -> tblPr -> shd. Interestingly, MSWord almost completely ignores this value. If shd is not defined on the cell, then it becomes white regardless of the overall table color (tested with Word 2010 and 2003). So, actually LO doesn't handle this import compatibly, because it takes the table setting and uses it as the default.
proposed fix: https://gerrit.libreoffice.org/59260 tdf#116436 docx export: add missing table background fill I hope to also work on .doc export, and perhaps look at the import compatibility.
After saving as .doc the background color is preserved!
Created attachment 144251 [details] RowBackground.odt: row defines the fill color (In reply to haim kilov from comment #8) > After saving as .doc the background color is preserved! Not with my test documents, for either the table or the row. I'm attaching the one for the row (since my first suggested patch doesn't handle this yet.)
(In reply to Justin L from comment #6) > Created attachment 144250 [details] > tableBackground_cellsUndefined.docx: in MS Word, although table shd=blue, > undefined cells are white > > > I can confirm that LibreOffice handles "color for table" wrongly in OOXML > > export. It should write the element nesting tbl -> tblPr -> shd. > Interestingly, MSWord almost completely ignores this value. If shd is not > defined on the cell, then it becomes white regardless of the overall table > color (tested with Word 2010 and 2003). Yes you are right. The attribute is written by Word, but not read, tested in Word 365.
In reply to Justin L from comment #9: I stand corrected. Sorry. As far as I recall, the background color for a row was preserved earlier when saved as .doc, but in LO 6.0.5.2 it is not preserved anymore.
(In reply to Justin L from comment #9) > (since my first suggested patch doesn't handle this yet.) The patch is updated to handle rows. A couple of additional patches do the same for DOC and RTF format. https://gerrit.libreoffice.org/59281 tdf#116436 doc export: add missing table background fill https://gerrit.libreoffice.org/59282 tdf#116436 rtf export: add missing table background fill
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=8cc753d54ad1834709c5802115580adf65def89e tdf#116436 docx export: add missing table background fill It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=b576ab5073a8cdf5ca2db04838d255e142f5a896 tdf#116436 doc export: add missing table background fill It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
(In reply to haim kilov from comment #11) > As far as I recall, the background color for a row was preserved earlier > when saved as .doc, but in LO 6.0.5.2 it is not preserved anymore. I used bibisect to spot-check 5.2, 5.3, and 5.4. They all failed my test document. If you happen to run across a document where you see it was working, I would love to analyse that. Requesting to backport the patches to LO 6.1.
Justin Luth committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1a4bc964f15003c6aaec84989e3e47501b7f72df tdf#116436 rtf export: add missing table background fill It will be available in 6.2.0. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=029951e6d3636d99b370568313b8b5c2da8b452d&h=libreoffice-6-1 tdf#116436 doc export: add missing table background fill It will be available in 6.1.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=e7d3e0b101ff25bb7edd49df61e330ccb4b75a24&h=libreoffice-6-1 tdf#116436 docx export: add missing table background fill It will be available in 6.1.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
Justin Luth committed a patch related to this issue. It has been pushed to "libreoffice-6-1": http://cgit.freedesktop.org/libreoffice/core/commit/?id=3d81af669ea0886fb16282d29048f08025ace344&h=libreoffice-6-1 tdf#116436 rtf export: add missing table background fill It will be available in 6.1.2. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback.
it's ok. I also tried with red background. Red is preserved when saved as docx. tested on linux Version: 6.2.0.0.alpha0+ Build ID: e005ab5d40d358adb75a64e140d46f4bf605647d CPU threads: 4; OS: Linux 4.15; UI render: GL; VCL: gtk2; TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2018-09-15_02:08:38 Locale: ro-RO (ro_RO.UTF-8); Calc: threaded