Bug 93234 - TABLE: FILESAVE: Adding unneeded extra table borders when exporting to .docx
Summary: TABLE: FILESAVE: Adding unneeded extra table borders when exporting to .docx
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
4.3.0.4 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on: 92026
Blocks: DOCX-Tables
  Show dependency treegraph
 
Reported: 2015-08-07 11:49 UTC by Toms
Modified: 2018-11-24 15:16 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
.odt file and its export to .doc comparision (49.92 KB, image/png)
2015-08-07 11:49 UTC, Toms
Details
A .doc document with wrongly drawn border lines (examples No.3 No.5) (12.50 KB, application/msword)
2015-08-09 13:23 UTC, Toms
Details
An .odt document showing the original tables. (8.96 KB, application/vnd.oasis.opendocument.text)
2015-08-15 11:07 UTC, Toms
Details
printscreen (84.52 KB, image/png)
2015-08-20 07:46 UTC, raal
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Toms 2015-08-07 11:49:01 UTC
Created attachment 117740 [details]
.odt file and its export to .doc comparision

As it can be seen in the attachment, exporting to .doc in LibreOffice 5.0.0.5. adds some unnecessary table borders when using more complex table border formatting.
Similarly, it happens when exporting to .docx, but with extra borders in different places (not included in the screenshot).

Note: In the screenshot .doc is opened in MS Office 2007; however, the same applies when the same .doc file is opened in LibreOffice.

(I did not notice this behavior in previous LibreOffice 4 versions.)
Comment 1 raal 2015-08-08 05:16:20 UTC
Hello Toms,

Thank you for filing the bug. Please send us a sample document, as this makes it easier for us to verify the bug. 
I have set the bug's status to 'NEEDINFO', so please do change it back to 'UNCONFIRMED' once you have attached a document.
(Please note that the attachment will be public, remove any sensitive information before attaching it.)
How can I eliminate confidential data from a sample document?
https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F
Thank you
Comment 2 Toms 2015-08-09 13:23:04 UTC
Created attachment 117783 [details]
A .doc document with wrongly drawn border lines (examples No.3  No.5)

The intended borders of these tables can be seen in the screenshot.
Comment 3 Toms 2015-08-09 13:32:13 UTC
Raal,
Thank you for the response! Is the previous attachment enough or the original .odt document should be provided too?
(I'm sorry for not including this comment, when attaching file. I wrongly imagined that "attaching file" would attach a file to a later created comment with an option to add another file and not suddenly create a new comment.)
Comment 4 raal 2015-08-14 07:40:59 UTC
@Toms, please attach .odt document. Thank you.
Comment 5 Toms 2015-08-15 11:07:04 UTC
Created attachment 117932 [details]
An .odt document showing the original tables.
Comment 6 raal 2015-08-19 20:50:28 UTC
I cannot reproduce with Version: 5.1.0.0.alpha1+
Build ID: 6b7354ae66db40246a09e00aa876443057655a43
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-08-19_01:05:16

Seems to be fixed in dev version.
Comment 7 raal 2015-08-20 07:46:46 UTC
Created attachment 118037 [details]
printscreen

.doc export is correct, but I can reproduce the problem when  exporting to .docx
Version: 5.1.0.0.alpha1+
Build ID: 6b7354ae66db40246a09e00aa876443057655a43
TinderBox: Linux-rpm_deb-x86_64@70-TDF, Branch:master, Time: 2015-08-19_01:05:16
Comment 8 QA Administrators 2016-09-20 10:25:43 UTC Comment hidden (obsolete)
Comment 9 Telesto 2016-12-06 20:24:12 UTC
DOCX export isn't quite right (Table 5 has a full border)
Reproduced with
Version: 5.4.0.0.alpha0+
Build ID: a9f56091b6422ec8c42f09b8472200ae4ab12548
CPU Threads: 4; OS Version: Windows 6.19; UI Render: default; 
TinderBox: Win-x86@42, Branch:master, Time: 2016-12-05_23:12:26
Locale: nl-NL (nl_NL); Calc: CL
Comment 10 Eyal Rozenberg 2017-12-28 22:07:58 UTC
Reproduced with
Version: 6.0.0.0.beta2
Comment 11 Lars Jødal 2018-06-01 08:23:40 UTC
Table 5 having full border is confirmed with LO 6.0.4.2.

It can be noted that this behaviour is consistent with reporting (by me) in bug 92026 that the borders of the FIRST CELL IN THE TABLE are erronously copied to other cells when saved as DOCX.

It therefore seems that at the present state, this bug can be considered a duplicate of bug 92026.
Comment 12 Eyal Rozenberg 2018-06-01 10:34:48 UTC
(In reply to Lars Jødal from comment #11)
> It therefore seems that at the present state, this bug can be considered a
> duplicate of bug 92026.

There seems to be more than just the problem in 92026. In the example ODT, notice that no cell in table 3 has a bottom border, but in the DOCX, the middle cell does have a bottom border (and no other cell). So that at least is not a case of just replicating the first cell's borders.
Comment 13 Lars Jødal 2018-06-01 12:02:19 UTC
(In reply to Eyal Rozenberg from comment #12)
> (In reply to Lars Jødal from comment #11)
> > It therefore seems that at the present state, this bug can be considered a
> > duplicate of bug 92026.
> 
> There seems to be more than just the problem in 92026. In the example ODT,
> notice that no cell in table 3 has a bottom border, but in the DOCX, the
> middle cell does have a bottom border (and no other cell). So that at least
> is not a case of just replicating the first cell's borders.

True, the pdf attachment from comment 1 shows differences that cannot be explained by bug 92026.

However, if the odt file given as attachment in comment 5 is tested with LO 6.0.4.2 (present fresh version), then the result is different from the original bug report:

Tables 1, 2 AND 3 now have correct borders as docx.
Unlike the original report, Table 4 now has an extra right border at the right-most cell.
Table 5 is now correct regarding the vertical borders, but now has a bottom border for all cells (including the middle cell).

Assuming that table 3 had the vertical borders set from the middle cell, not from the first cell, all of this is consistent with borders of the first cell being copied to the whole cell. I.e., SET borders are copied, unset borders does not seem erase set borders.

In summary: Originally, this bug was more complicated. Comment 9 seems to indicate that the problem was partly fixed by version 5.4. The remaining problem is consistent with being a duplicate of bug 92026.

Agree?
Comment 14 Eyal Rozenberg 2018-06-01 17:06:19 UTC
Agreed, but that means that the original problem was not a dupe, but rather depended on some issue which by now has been resolved, and 92026. So - marking the second dependency for now. When 92026 is finally resolved, we'll double-check this one has been fully resolved as well.
Comment 15 Justin L 2018-09-08 16:26:56 UTC
(In reply to Eyal Rozenberg from comment #14)
> When 92026 is finally resolved, we'll
> double-check this one has been fully resolved as well.
The remaining problem of table 5 is definitely a duplicate of bug 92026. This document worked perfectly up until LO 4.3 commit ae61569eea0719a882010cfbb260a1a0d690d974 because

"Our exporter was writing all the cell properties in all cases, regardless of them being defined by the theme or not"

and obviously if every border is being explicitly written out, then it is easy to look like the original.
Comment 16 Justin L 2018-09-29 15:53:41 UTC
Fixed in 6.2 confirmed after bug 92026 was closed