Bug 145226 - MSWord 2019 doesn't open odt files with tables created by LibreOffice
Summary: MSWord 2019 doesn't open odt files with tables created by LibreOffice
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.7.2 release
Hardware: All All
: medium normal
Assignee: Michael Stahl (allotropia)
URL:
Whiteboard: odf target:7.5.0 target:7.4.0 target:...
Keywords: bisected, regression
Depends on:
Blocks: Writer-Tables
  Show dependency treegraph
 
Reported: 2021-10-19 18:39 UTC by himajin100000
Modified: 2022-08-11 22:54 UTC (History)
7 users (show)

See Also:
Crash report or crash signature:


Attachments
table-row with table:style-name (8.74 KB, application/vnd.oasis.opendocument.text)
2021-10-19 18:45 UTC, himajin100000
Details
table-row without table:style-name (8.43 KB, application/vnd.oasis.opendocument.text)
2021-10-19 18:45 UTC, himajin100000
Details

Note You need to log in before you can comment on or make changes to this bug.
Description himajin100000 2021-10-19 18:39:33 UTC
Description:
see steps to reproduce.

Steps to Reproduce:
1. Launch Writer
2. Insert 4x4 Table 
3. Save As odt (attached as original.odt)
4. Open the original.odt in MSWord

Actual Results:
"Word found unreadable content in original.odt. Do you want to recover the contents of this document?"

Expected Results:
opens with no such message.


Reproducible: Always


User Profile Reset: No



Additional Info:
I attached modified.odt. 

The difference between original.odt and modified.odt is:

Removed all the "table:style-name" attributes from the table:table-row elements in the content.xml

I can find any TableLine[a-z0-9]* styles neither in content.xml nor in styles.xml
There were no elements with table:style-name whose values start with "TableBox"
---
I will add Vasily Melenchuk and Thorsten Behrens to CC list.
https://gerrit.libreoffice.org/c/core/+/99023
Comment 1 himajin100000 2021-10-19 18:45:27 UTC
Created attachment 175837 [details]
table-row with table:style-name
Comment 2 himajin100000 2021-10-19 18:45:57 UTC
Created attachment 175838 [details]
table-row without table:style-name
Comment 3 m_a_riosv 2021-10-19 20:20:59 UTC Comment hidden (obsolete)
Comment 4 himajin100000 2021-10-19 20:28:33 UTC
>And what version of odt are you using to save?
Menu/Tools/Options/Load-Save/General - ODF format version.

I used 1.3 non-extended version.
the OP of the following question says he was able to reproduce with 1.2 Extended and 1.3 Extended
https://ask.libreoffice.org/t/writer-odt/69438

>And please attach a sample file.

I already did it.
Comment 5 Vasily Melenchuk (CIB) 2021-10-19 21:12:24 UTC
I confirm a problem. Yes it did came from my commit 083fe09958658de8c3da87a28e0f8ff7b3b8a5e9 (https://gerrit.libreoffice.org/c/core/+/99023) and I've reproduced a problem with LO starting from 7.0 and attempts to open document with Word 365.

Yes, problem did came from emitted table:style-name="TableLine*"
Comment 6 himajin100000 2021-10-19 21:32:10 UTC
Oops, I found typo in my comment
>I can find any TableLine[a-z0-9]* styles neither in content.xml nor in styles.xml
I can find any TableBox[a-z0-9]* styles neither in content.xml nor in styles.xml
Comment 7 Justin L 2021-12-09 11:02:18 UTC
backported to 6.4 - although I'm not sure which one it landed in. In any case, it will at least have affected 6.4.7, while the patch first landed in 7.1.
Comment 8 Gabor Kelemen (allotropia) 2021-12-16 13:13:58 UTC Comment hidden (obsolete)
Comment 9 Commit Notification 2022-07-31 12:23:27 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5a9fe1d80ea977c439dd10ee2056abe6b0cb4d07

tdf#145226 sw: ODF export: fix table-row/table-cell styles

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 10 Commit Notification 2022-08-03 15:29:28 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/de0120d9f75159f85d723439a89a6449082de669

tdf#145226 sw: ODF export: fix table-row/table-cell style display-name

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Michael Stahl (allotropia) 2022-08-03 15:38:33 UTC
should be fixed now
Comment 12 Commit Notification 2022-08-03 19:54:17 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-4":

https://git.libreoffice.org/core/commit/ea753b9c35616efa203dd6eddc524b54b198768a

tdf#145226 sw: ODF export: fix table-row/table-cell styles

It will be available in 7.4.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 13 Commit Notification 2022-08-04 23:25:29 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-3":

https://git.libreoffice.org/core/commit/72a103fb9f5ea77ef5d8f104709bfa9f497494d7

tdf#145226 sw: ODF export: fix table-row/table-cell styles

It will be available in 7.3.6.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2022-08-10 09:55:39 UTC
Michael Stahl committed a patch related to this issue.
It has been pushed to "libreoffice-7-4-0":

https://git.libreoffice.org/core/commit/f720fdcdeda4cec27db823a1c7f7563ae0d87d51

tdf#145226 sw: ODF export: fix table-row/table-cell styles

It will be available in 7.4.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2022-08-10 09:59:50 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/63f32f33709da3796b31328b358b313fd3887599

tdf#145226: sw_odfexport: Add unittest

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Gabor Kelemen (allotropia) 2022-08-10 11:15:43 UTC
Verified in 

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4e2ce2a460458f17ee4360c45a2da2fc4b4d753e
CPU threads: 14; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: threaded

Following steps in comment #0 the odt is opened in Word 2013/2016 fine.
Word 2010 complains, but only if ODF 1.2 or newer format is used for saving in LO, with 1.0/1.1 mode it is also opening the file fine.