| Summary: | FILESAVE DOCX: Styles of new RTL document saved in .docx as LTR | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | eladhen2 |
| Component: | Writer | Assignee: | Justin L <jluth> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | eladhen2, jluth, serval2412, xiscofauli |
| Priority: | medium | ||
| Version: | Inherited From OOo | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=98620 | ||
| Whiteboard: | target:6.3.0 | ||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 43808, 104520 | ||
|
Description
eladhen2
2018-03-14 17:10:54 UTC
On pc Debian x86-64 with master sources updated today, I could reproduce this. Reproduced in Version: 5.2.0.0.alpha0+ Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53 Threads 4; Ver: 4.10; Render: default; Version: 4.3.0.0.alpha1+ Build ID: c15927f20d4727c3b8de68497b6949e72f9e6e9e I am able to reproduce only partially: * I do see the Heading 1 and Text Body styles of the DOCX file are defined to have LTR direction, in their style properties. However, * I see the two paragraphs I had written using those styles still directed RTL (and right-aligned) Also using v6.0.2.1 on GNU/Linux Mint 18.3. (In reply to Eyal Rozenberg from comment #3) > I am able to reproduce only partially: > > * I do see the Heading 1 and Text Body styles of the DOCX file are defined > to have LTR direction, in their style properties. However, > * I see the two paragraphs I had written using those styles still directed > RTL (and right-aligned) > > Also using v6.0.2.1 on GNU/Linux Mint 18.3. That's identical to what I get. the text that's already written stays RTL, but the styles are now all LTR, and if you apply any of them the text they are applied on becomes LTR. This seems to happen with Arabic as well, so changing the "Blocking" bug number. This is an excellent, clear problem description - thanks. Also applies to .DOC.
Note that this ONLY seems to apply to completely new documents. If saved as ODF and re-loaded, then the export to docx saves the bidi setting. That suggests an "unset" default value is being skipped in the export process. Wrtw8styl.cxx OutputStyle identifies nPos==0 as "Normal" style, so we can force the RES_FRAMEDIR property to be ::SET here.
The identical thing is happening on import in WW8RStyle::Import().
/*
Word defaults to ltr not from environment like writer. Regardless of
the page/sections rtl setting the standard style lack of rtl still
means ltr
*/
proposed fix via these three parts: -https://gerrit.libreoffice.org/66964 tdf#116404 filter\ww8: use bidi for default style in RTL locale -https://gerrit.libreoffice.org/66965 tdf#116404 DOC: check locale if BiDi inherits Environment -https://gerrit.libreoffice.org/66966 tdf#116404 RTF: check locale if BiDi inherits Environment Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/06742182e5306d6d06e3253981723a69a3c978ab%5E%21 tdf#116404 filter\ww8: use bidi for default style in RTL locale 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. Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/ae4e0a81753dd280f6b77b5ee61cf7e9f85e5cfe%5E%21 tdf#116404 DOC: check locale if BiDi inherits Environment 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. Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/aebc79b670fb60c43dd07e8e963abe019754c092%5E%21 tdf#116404 RTF: check locale if BiDi inherits Environment 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. Justin Luth committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/+/daa4aef1512eb7a6b615720725a5a682b0030f8e%5E%21 try2 tdf#116404 filter\ww8: use bidi for default style in RTL locale 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. |