Bug 117906 - Fileopen DOCX: Vertical Text in Tables incorrectly positioned
Summary: Fileopen DOCX: Vertical Text in Tables incorrectly positioned
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Miklos Vajna
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Tables Text-Direction-Unification
  Show dependency treegraph
 
Reported: 2018-05-30 15:37 UTC by Luke
Modified: 2019-02-26 22:43 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Simple Table with both kinds of Vertical Text. Bottom to Top text incorrect. (12.80 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-05-30 15:37 UTC, Luke
Details
comparison MSO 2010 and LibreOffice 6.1 (14.82 KB, image/png)
2018-05-30 16:07 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2018-05-30 15:37:43 UTC
Created attachment 142413 [details]
Simple Table with both kinds of Vertical Text. Bottom to Top text incorrect.

Text Boxes can have 2 vertical text directions. We only correctly import the bottom to top (90 deg). The more common top to bottom ( 270 deg) is imported as horizontal.
Comment 1 Xisco Faulí 2018-05-30 16:07:30 UTC
Created attachment 142414 [details]
comparison MSO 2010 and LibreOffice 6.1
Comment 2 Xisco Faulí 2018-05-30 16:08:06 UTC
Reproduced in

Version: 6.1.0.0.beta1+
Build ID: da49f4aeb8d5e9a7d2cba8855d911e7cc1d2f1e2
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded
Comment 3 Luke 2018-05-30 21:56:29 UTC
Arrgh. I screwed up my description as I was simultaneously creating test documents for 2 vertical text issue that I discovered. Let's track the table bug here. Updated the summary.
Comment 4 Luke 2018-06-01 03:20:27 UTC
The text that is correctly positioned uses
Table Format->Text Flow->Text Orientation = "Vertical"

The incorrectly positioned vertical text uses:
Table Format->Text Flow->Text Orientation = "Horizontal"
with a Character->Position->Rotation = 90


One approach to fixing this might be to add a new Vertical 90, Text Flow option. Otherwise, we'd probably need a special compatibility mode to avoid regressions in ODT that use character rotation in tables. 

Mark,
You're working on this area now. Any thoughts on this?
Comment 5 Mark Hung 2018-06-04 23:05:10 UTC
(In reply to Luke from comment #4)
> The text that is correctly positioned uses
> Table Format->Text Flow->Text Orientation = "Vertical"
> 
> The incorrectly positioned vertical text uses:
> Table Format->Text Flow->Text Orientation = "Horizontal"
> with a Character->Position->Rotation = 90
> 
> 
> One approach to fixing this might be to add a new Vertical 90, Text Flow
> option. Otherwise, we'd probably need a special compatibility mode to avoid

ODF allows writing-mode to be "tb-lr" in table cells[1] and it is already supported. One can manually crafts odt files and they format correctly. On the page level, it's enabled by Khaled Hosny[2]. So I think it's good to add "Vertical(Left-to-Right)" for text orientation option. We can create another EDITING issue for this.

> regressions in ODT that use character rotation in tables. 

What regression do you mean? I speculate that import filter for doc format try to emulate vertical (left-to-right) with character rotation. We should use tb-lr directly. Still need further investigation on this.

> 
> Mark,
> You're working on this area now. Any thoughts on this?


[1]http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part1.html#__RefHeading__1420404_253892949
[2]https://cgit.freedesktop.org/libreoffice/core/commit/?id=930a3d462b05e111da37d31de7f60998ce9454b3
Comment 6 Luke 2019-02-15 19:16:54 UTC
Miklos is working on text direction in tables.
Comment 8 Miklos Vajna 2019-02-18 08:42:31 UTC
Indeed -- sorry for not searching the bugzilla when writing the commit message. One problematic area I'm aware of is cursor / selection handling, I still plan to improve things there. E.g. you go to the table cell with btlr text direction, do Ctrl-A, then the selection rectangle is still bad. I plan to still fix that.