Bug 126309 - Opening RTF document with Hebrew RTL text is shown with the text rendered LTR
Summary: Opening RTF document with Hebrew RTL text is shown with the text rendered LTR
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.0 all versions
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard: target:6.4.0 target:6.3.1
Keywords: bibisected, bisected, filter:rtf, regression, text:rtl
Depends on:
Blocks:
 
Reported: 2019-07-09 12:13 UTC by Ingo Sigmund
Modified: 2023-04-01 20:28 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
RTF file to reproduce issue (202.88 KB, application/msword)
2019-07-09 12:15 UTC, Ingo Sigmund
Details
DOCX file (34.02 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-07-09 12:15 UTC, Ingo Sigmund
Details
Screenshots (518.78 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-07-09 12:16 UTC, Ingo Sigmund
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Ingo Sigmund 2019-07-09 12:13:19 UTC
Description:
When I open an RTF document that contains Hebrew text that is supposed to be written from right-to-left is shown as left-to-right text.

When I convert the same RTF document to a DOCX (using Microsoft Word) and open that resulting DOCX file, the text shows correctly.

Apparently it seems to be an issue with the RTF import not recognizing the RTL text formatting correctly.

Steps to Reproduce:
1. open attached file Hebrew_RTL_TEST.rtf
2. text is shown from left to right --> not correct
3. open attached file Hebrew_RTL_TEST.docx
4. text is shown correctly written from right to left

Actual Results:
wrong text direction (left to right) for RTF file

Expected Results:
text direction should be right-to-left when opening an RTF file


Reproducible: Always


User Profile Reset: No



Additional Info:
see attachment
Comment 1 Ingo Sigmund 2019-07-09 12:15:01 UTC
Created attachment 152677 [details]
RTF file to reproduce issue
Comment 2 Ingo Sigmund 2019-07-09 12:15:33 UTC
Created attachment 152678 [details]
DOCX file
Comment 3 Ingo Sigmund 2019-07-09 12:16:09 UTC
Created attachment 152679 [details]
Screenshots
Comment 4 Xisco Faulí 2019-07-30 16:35:08 UTC
Regression introduced by:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=4ee2a882dddb395a816cd54004b634d57cfb2446

author	Miklos Vajna <vmiklos@collabora.co.uk>	2015-04-17 10:44:47 +0200
committer	Miklos Vajna <vmiklos@collabora.co.uk>	2015-04-17 11:35:27 +0200
commit 4ee2a882dddb395a816cd54004b634d57cfb2446 (patch)
tree 5214a7e75d9a185d56f22538af4317798778eeee
parent 7e5980ccf39b54240524f059a65497b766af91cc (diff)
tdf#86182 RTF import: fix handling of \rtlpar

Bisected with: bibisect-50max

Adding Cc: to Miklos Vajna
Comment 5 Commit Notification 2019-08-06 07:06:27 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "master":

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

tdf#126309 RTF import: fix not needed para adjust swap for bidi text

It will be available in 6.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 6 Xisco Faulí 2019-08-06 09:06:04 UTC
Verified in

Version: 6.4.0.0.alpha0+
Build ID: 967644f09b8b7abe3b86d1647820f14e0196f8b4
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

@Miklos, thanks for fixing this issue!
Comment 7 Commit Notification 2019-08-06 10:48:36 UTC
Miklos Vajna committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

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

tdf#126309 RTF import: fix not needed para adjust swap for bidi text

It will be available in 6.3.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.