Bug 121110 - FILEOPEN: Bidi text is aligned to the left
Summary: FILEOPEN: Bidi text is aligned to the left
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.2.0.1 target:6.3.0
Keywords: bibisected, bisected, regression
Depends on:
Blocks: RTL
  Show dependency treegraph
 
Reported: 2018-11-01 22:57 UTC by Xisco Faulí
Modified: 2024-08-03 09:15 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (19.00 KB, application/msword)
2018-11-01 22:57 UTC, Xisco Faulí
Details
Comparison (72.64 KB, image/png)
2018-11-01 22:58 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2018-11-01 22:57:57 UTC
Created attachment 146238 [details]
sample file

Steps to reproduce:
1. Open attached document

-> See all lines aligned to the left. Some of them should be aligned to the right.

Reproduced in

Version: 6.2.0.0.alpha1+
Build ID: 4326fb3ef3ddd7c6f9d08ba96add4f4736503ceb
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: threaded

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2018-11-01 22:58:16 UTC
Created attachment 146239 [details]
Comparison
Comment 2 Xisco Faulí 2018-11-01 22:59:35 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=85818da3307a28b2d9c6fa5c1c97ca7833dfe24c

author	Justin Luth <justin.luth@collabora.com>	2018-07-11 22:37:00 +0300
committer	Justin Luth <justin_luth@sil.org>	2018-08-22 06:14:28 +0200
commit 85818da3307a28b2d9c6fa5c1c97ca7833dfe24c (patch)
tree 7f1fb56846401ded0c1fb06161fbc4005331456f
parent cbce9044b075f22a936c8a15bacf3cb57130c984 (diff)
tdf#106174 ww8import: bidi - prev adjust? prev bidi?

Bisected with: bibisect-linux64-6.2

Adding Cc: to Justin Luth
Comment 3 Lior Kaplan 2018-11-02 07:31:45 UTC
Just notice that tdf#106174 has 3 commits. One of them done to both 6.1 & 6.2 branches and the rest to 6.2 only.
Comment 4 Justin L 2018-11-05 19:04:24 UTC
(In reply to Lior Kaplan from comment #3)
> Just notice that tdf#106174 has 3 commits. One of them done to both 6.1 &
> 6.2 branches and the rest to 6.2 only.
The one backported to 6.1 was just related to the proposed fix.

Round-tripping this file in .doc was already broken in a similar (the same?) way, but it seems fine as .docx. In master, if I load the .doc, fix it up, and then round-trip it, it works fine too. 

The problem is the use of sprmPJc80 - which ignore RTL status. So somehow I need a flag to indicate that a Jc80 should not be adjusted.
Comment 5 Justin L 2018-11-19 18:05:28 UTC
proposed fix at https://gerrit.libreoffice.org/63591
Comment 6 Justin L 2018-12-06 06:54:31 UTC
With the following revert commit, I have "delayed" the regression until 6.3. I can verily easily fix it by "polluting" the SvxAdjustItem, but I'm really struggling with doing anything with properties in an acceptable fashion. Therefore I want a very long time period for fixing, testing, and review.


Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-2" target:6.2.0.1:

https://git.libreoffice.org/core/+/931cb1caf26a09d7152360407e1f163fc3fab1c2%5E%21

Revert "tdf#106174 ww8import: bidi - prev adjust? prev bidi?"
Comment 7 Commit Notification 2018-12-17 08:39:48 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/f10404e30ab2f468147457f0304e0e9fe64eefa3%5E%21

tdf#121110 ww8import Jc80 justify is absolute, not Bidi relative

It will be available in 6.3.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 8 Justin L 2018-12-17 09:02:59 UTC
Fixed by reverting for LO 6.2 and fixed for LO 6.3 by detecting whether the justify setting is absolute or relative to BiDi (comment 7).
Comment 9 Xisco Faulí 2018-12-18 10:14:59 UTC
Verified in

Version: 6.3.0.0.alpha0+
Build ID: 6dc36d343aeacb3d1e14ec0c847937d63f4e68a7
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); UI-Language: en-US
Calc: threaded

@Justin Luth, Thanks for fixing this!!