Bug 117921 - Fileopen DOCX: Support both Vertical Directions in Text Box
Summary: Fileopen DOCX: Support both Vertical Directions in Text Box
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: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
Depends on:
Blocks: DOCX-Textbox Text-Direction-Unification
  Show dependency treegraph
 
Reported: 2018-05-30 22:06 UTC by Luke
Modified: 2021-01-01 21:26 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
docx Text Boxes with both directions of Vertical Text (15.07 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2018-05-30 22:06 UTC, Luke
Details
Screenshot of Word 2013 vs Writer 6.2 (94.05 KB, image/png)
2018-05-30 22:08 UTC, Luke
Details
Sample docx with wrap comparing TtoB vs BtoT (19.66 KB, application/vnd.openxmlformats-officedocument.wordprocessingml.document)
2019-05-07 03:14 UTC, Luke
Details
Screenshot of the document in current Writer master (93.29 KB, image/png)
2019-10-17 15:24 UTC, NISZ LibreOffice Team
Details
The second example file opened in LO 7.1 alpha (225.69 KB, image/png)
2021-01-01 21:16 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Luke 2018-05-30 22:06:59 UTC
Created attachment 142426 [details]
docx Text Boxes with both directions of Vertical Text

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 Luke 2018-05-30 22:08:43 UTC
Created attachment 142427 [details]
Screenshot of Word 2013 vs Writer 6.2
Comment 2 Buovjaga 2018-06-21 16:21:26 UTC
It seems this is covered in bug 111409, even though I left it unconfirmed for now.

"Writer can switch all four text direction for the whole page or just in a frame, but text box have no way to use TB-LR direction"
Comment 3 raal 2018-10-02 20:37:02 UTC
repro Version: 6.2.0.0.alpha0+
Build ID: e9c1cbce903d325b1e19602d72765511589f5bf2
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk2;
Comment 4 Miklos Vajna 2019-04-29 07:08:30 UTC
Could you please check if this is still present after <https://gerrit.libreoffice.org/plugins/gitiles/core/+/ff17478e069cc82681df62514876c06365dd5cd6>? Thanks.
Comment 5 Luke 2019-04-29 16:37:34 UTC
Miklos,

After ff17478e069c, the text is now the correct direction, but

1) The vertical position of the bottom to top shape seems to be relative to the bottom margin, rather than the top margin. 

2a) The resize shape to fit text calculations are wrong. (bottom to top shapes are incorrect size)

2b) If you Uncheck "Resize shape to fit text" in Word, bottom to top text direction is wrong, but shapes are the correct size

Do you want to file new bug reports for these issues or track one or all of these here?
Comment 6 Miklos Vajna 2019-04-30 07:11:01 UTC
Thanks for the testing, no need to do anything right now (let's keep this bug open and not open separate ones).
Comment 7 Luke 2019-05-07 03:14:17 UTC
Created attachment 151211 [details]
Sample docx with wrap comparing TtoB vs BtoT

This test docx shows the problem with Bottom to top text with various resize options.
Comment 8 NISZ LibreOffice Team 2019-10-17 15:24:49 UTC
Created attachment 155093 [details]
Screenshot of the document in current Writer master

Looks a lot better in:

Version: 6.4.0.0.alpha1+ (x86)
Build ID: f0340d58cc0f2808ce8003099ff2a0495360f267
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: default; VCL: win; 
Locale: hu-HU (hu_HU); UI-Language: en-US
Calc: CL

After:
https://gerrit.libreoffice.org/plugins/gitiles/core/+diff/9c81d0a268cca4ff36eff94c0842361b9c0287ef%5E%21

tdf#127825 DOCX import: fix handling for tbrl, auto-height and rel size shapes
Comment 9 Gabor Kelemen (allotropia) 2021-01-01 21:16:32 UTC
Created attachment 168626 [details]
The second example file opened in LO 7.1 alpha

This seems to have gotten better recently in:

https://cgit.freedesktop.org/libreoffice/core/commit/?id=712d7a5df188bb20527f1a7533b2e2c1d4377247

author	Miklos Vajna <vmiklos@collabora.com>	2020-11-16 21:07:48 +0100
committer	Miklos Vajna <vmiklos@collabora.com>	2020-11-17 09:03:37 +0100

tdf#137980 sw textbox: fix automatic size of shapes with rotated text