https://bugs.documentfoundation.org/show_bug.cgi?id=149809

            Bug ID: 149809
           Summary: FILEOPEN FILESAVE Text orientation is wrong after
                    round-trip
           Product: LibreOffice
           Version: 7.5.0.0 alpha0+ Master
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Writer
          Assignee: libreoffice-bugs@lists.freedesktop.org
          Reporter: rb.hensc...@t-online.de
                CC: vmik...@collabora.com

Created attachment 181071
  --> https://bugs.documentfoundation.org/attachment.cgi?id=181071&action=edit
Test document from unit test

This is a follow-up to bug 87924.

The attached document is the test document from unit test
DECLARE_OOXMLIMPORT_TEST(testTdf87924, "tdf87924.docx").

Open the saved document in Word. Notice, that the text appears horizontal. In
fact the text is with text direction "Rotate all text 270°" which compensates
the 90° shape rotation.

Now open the document in LO. The text appears horizontal. Reason is, that the
text was set to "Rotate all text 0°".

Now save the document without any change to .docx format and open the saved
document in Word. Notice, that the text is vertical.

The fix for bug 87924 does not really work. But removing the matrix and the
rotation test does not solve the problem, since then the text is vertical
because the frame does not has the needed rotation for compensation.

[The matrix is wrong, but works accidentally for 90° and -90° rotations.]

A solution is complicated. I see several ways:
A) Keep "Rotate all text 270°" on import and export. But because the attached
frame is not able to rotate but honors writing modes, fake the writing
direction on rendering, so that it is looks as if the frame could rotate.
B) Set "Rotate all text 0°" on import and set it back to "Rotate all text 270°"
on export by considering the shape rotation on export too.
C) Do not use frames in case the shape is rotated.
D) Implement rotation for text frames at least for multiples of 90°.

My favorite is to use C) as short term solution. That would solve in addition
the error, that the text has a wrong position. Solution D) should be used in
the long term.
Solution C) would in addition allow to implement a true "upright" in Writer
too. Currently the text looks upright because the frame cannot rotate. But
saving and opening the saved document in Word shows that "upright" is not
handled correctly.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to