Bug 136282 - Fix for bug #99197 breaks openning of an rtl ms-word document
Summary: Fix for bug #99197 breaks openning of an rtl ms-word document
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.0.0.alpha1+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:7.1.0 target:7.0.2
Keywords: bibisected, bisected, regression, text:rtl
Depends on:
Blocks:
 
Reported: 2020-08-30 08:09 UTC by Yotam Benshalom
Modified: 2020-09-04 13:40 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
RTL doc file (13.00 KB, application/msword)
2020-08-30 08:10 UTC, Yotam Benshalom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yotam Benshalom 2020-08-30 08:09:06 UTC
Description:
The fix for bug #99197 makes Writer open an RTL word document as if it was an LTR document.

Steps to Reproduce:
1.Open attached file in ms word 2016
2.Open same file in LO Writer

Actual Results:
In Writer, the paragraphs in the document are set as LTR

Expected Results:
In Writer, the paragraphs in the document should be set as RTL, like they are in MS word 2016


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.0.0.0.alpha1 (x64)
Build ID: 6a03b2a54143a9bc0c6d4c7f1...
תהליכי משנה במעבד: 4; מערכת הפעלה: Windows 10.0 Build 18362; עיבוד מנשק: Skia/Raster; VCL: win; 
Locale: he-IL (he_IL); UI: he-IL
Calc: threaded
Comment 1 Yotam Benshalom 2020-08-30 08:10:16 UTC
Created attachment 164866 [details]
RTL doc file
Comment 2 Justin L 2020-08-31 07:07:18 UTC
confirmed bisect to 7.0 commit 7b9878671a74dc9043d0cdc93e019fdd7d622e8c
Author: Justin Luth on Sat Apr 18 11:35:11 2020 +0300
    tdf#99197 ww8import: all root-level para-styles default to LTR
    
    It is not just the "Normal" paragraph style that should
    default to LTR. Any new style that does not inherit from
    anything should be set to LTR, regardless of page/section
    settings.
Comment 3 Justin L 2020-08-31 12:04:49 UTC
Thanks for pointing out this regression. I'm surprised that no one caught it during the testing phase. Do we really not have any RTL documents in the Office Integration Testing?

Proposed fix at https://gerrit.libreoffice.org/c/core/+/101726
Comment 4 Commit Notification 2020-09-01 07:27:57 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

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

tdf#136282 ww8import: track para bidi, not char bidi for style

It will be available in 7.1.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 5 Yotam Benshalom 2020-09-01 07:32:28 UTC
Thanks for the quick fix!
Comment 6 Yotam Benshalom 2020-09-01 07:46:07 UTC
Is it possible to push this earlier though? 7.1.0 should land at least 9 months from now, and this is a very long time for broken interoperability for all bidi users.
Comment 7 Justin L 2020-09-01 09:20:22 UTC
(In reply to Yotam Benshalom from comment #6)
> Is it possible to push this earlier though?
Patience, my friend :-)
Comment 8 Commit Notification 2020-09-01 11:36:35 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-7-0":

https://git.libreoffice.org/core/commit/1e4bb55c1dba650077ef68953e7cd6514a43d781

tdf#136282 ww8import: track para bidi, not char bidi for style

It will be available in 7.0.2.

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 9 Xisco Faulí 2020-09-02 12:06:24 UTC
(In reply to Justin L from comment #3)
> Thanks for pointing out this regression. I'm surprised that no one caught it
> during the testing phase. Do we really not have any RTL documents in the
> Office Integration Testing?

Yes, we do. I've just checked and there are 1006 DOC files in the pool of files used by the tool. Be aware the tool doesn't catch everything. This might be one of those cases that slip away
Comment 10 Justin L 2020-09-02 12:26:40 UTC
(In reply to Xisco Faulí from comment #9)
> Yes, we do. I've just checked and there are 1006 DOC files in the pool of
> files used by the tool. Be aware the tool doesn't catch everything. This
> might be one of those cases that slip away

These are specifically right-to-left documents. So the subset of DOC files that are RTL will be rather small I'm sure.
I would expect the OIT test to catch this because the visual change is rather startling - basically a complete reversal where the most white-space would be on the left rather than on the right.
Comment 11 Xisco Faulí 2020-09-04 13:40:56 UTC
Verified in

Version: 7.1.0.0.alpha0+
Build ID: 6b2eff7d69c6e14d89dd33eaa58c01d82c541266
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3
Locale: en-US (en_US.UTF-8); UI: en-US
Calc: threaded

@Justin, thanks for fixing this issue!!