Bug 126395 - DOCX-Table: Incorrect column order for table using word document (rtl)
Summary: DOCX-Table: Incorrect column order for table using word document (rtl)
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.5.0
Keywords:
Depends on:
Blocks: RTL-CTL DOCX-Tables
  Show dependency treegraph
 
Reported: 2019-07-15 07:35 UTC by seven
Modified: 2022-07-31 09:15 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Document with problem (5.12 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-07-15 07:36 UTC, seven
Details
Good document for compare (10.45 KB, application/vnd.oasis.opendocument.text)
2019-07-15 07:36 UTC, seven
Details

Note You need to log in before you can comment on or make changes to this bug.
Description seven 2019-07-15 07:35:46 UTC
Description:
Document have problem with save or show when open

Steps to Reproduce:
1. Open word document (from attachment)
2. It you see from left to right, but need for arabic document from right to left
3. Using properties table you see it is right to left, change direction to "left to right" and table will be with column #1 in right side (it is correct and same in .odt file)

Actual Results:
Change not saved or not apply when reopen document

Expected Results:
Change saved or open same like i see before close


Reproducible: Always


User Profile Reset: No



Additional Info:
Comment 1 seven 2019-07-15 07:36:18 UTC
Created attachment 152770 [details]
Document with problem
Comment 2 seven 2019-07-15 07:36:54 UTC
Created attachment 152771 [details]
Good document for compare
Comment 3 Dieter 2019-07-16 11:45:34 UTC
I confirm it with

Version: 6.4.0.0.alpha0+ (x64)
Build ID: 2f2f4767089512c34514896bc37823f9310e9dd4
CPU threads: 4; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2019-07-10_02:13:57
Locale: de-DE (de_DE); UI-Language: en-US
Calc: threaded

and with

Version: 6.2.5.2 (x64)
Build-ID: 1ec314fa52f458adc18c4f025c545a4e8b22c159
CPU-Threads: 4; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: threaded


Works correctly in MS Word 2016
Comment 4 Dieter 2021-06-08 06:52:04 UTC
Still present in

Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 4a9eef7849a75ba91806886ea9c96d114c8d56f9
CPU threads: 4; OS: Windows 10.0 Build 19043; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Steps to reproduce
1. Open attachment 152771 [details]
2. Save as docx
3. Reload

Actual result: Order of columns changes
Comment 5 Aron Budea 2021-08-08 02:20:37 UTC
Since this never worked, adjusting earliest version.
Comment 6 Justin L 2022-06-24 14:55:49 UTC
repro 7.5+

This looks like an import issue. MS Word 2003 opens the round-tripped DOCX okay.
Comment 7 Justin L 2022-06-30 01:43:08 UTC
The table seems to be taking RTL status from the first cell's first paragraph.

Initial research points the cause to SwDoc::TextToTable.
Comment 8 Justin L 2022-06-30 13:24:43 UTC
Proposed fix at https://gerrit.libreoffice.org/c/core/+/136673
Comment 9 Commit Notification 2022-07-01 13:33:47 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#126395 writerfilter: don't guess table direction

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 Dieter 2022-07-31 09:15:45 UTC
VERIFIED with

Version: 7.5.0.0.alpha0+ (x64) / LibreOffice Community
Build ID: 4827d5cb1508f6bca9489e31b877cfff36393c50
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL

Justin, thank you for fixing it!