Bug 128830 - FILEOPEN: text box rotated, saved as .docx, is corrupted when file is reopened
Summary: FILEOPEN: text box rotated, saved as .docx, is corrupted when file is reopened
Status: RESOLVED DUPLICATE of bug 82627
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.4.0.0.beta1+
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx
: 129263 (view as bug list)
Depends on:
Blocks: DOCX-Textbox
  Show dependency treegraph
 
Reported: 2019-11-16 04:11 UTC by Thom
Modified: 2021-07-04 08:30 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Example image of saved textbox vs. as reopened (20.75 KB, image/jpeg)
2019-11-16 04:14 UTC, Thom
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Thom 2019-11-16 04:11:30 UTC
Description:
Case 1. Rotated text box when saved as .docx file and then reopened is corrupted: Textbox is still rotated as when saved but text has separated and appears as unrotated.
Case 2. Rotated text box when saved as .doc file and then reopened is completely missing both box and text.

Steps to Reproduce:
1. Insert textbox
2. Type text in textbox
3. Right-click, select Position and Size, type rotation angle, OK
4. Save file as .docx (or .doc)
5. Close file
6. Open file

Actual Results:
Case 1. When .docx is opened, textbox is still rotated but text is horizontal through center of box. Rotated box will resize if additional horizontal text is added.
Case 2. When .doc is opened, textbox and text are both missing (or somehow invisible).

Expected Results:
Rotated text box containing rotated text should appear as it was when saved.


Reproducible: Always


User Profile Reset: No



Additional Info:
This fault occurred both in LibreOffice Writer 6.2.0.3 (x64) and in fresh install of LibreOffice Writer 6.4.0.0.alpha1 (x64)
Comment 1 Thom 2019-11-16 04:14:59 UTC
Created attachment 155868 [details]
Example image of saved textbox vs. as reopened
Comment 2 arawat 2019-11-17 03:19:43 UTC
Not a bug; .docx (or .doc) does not support rotated text boxes
Comment 3 Regina Henschel 2019-11-17 12:15:21 UTC
Word renders the rotated text boxes without problems. For modern Word versions it is the same as a shape and LibreOffice exports it as shape. The error is in LibreOffice import. When the file is imported into Writer, the text is not treated as shape label (as it would be in Impress), but the shape gets an associated frame. And such frame cannot rotate.

I think, the current import from docx needs to be changed, so that a frame is only used, if there exists rich content in the text, e.g. Math-OLE, table or pictures. Otherwise it should be handled the same as in Impress.

The old .doc format is a different problem. The relevant code parts are different from .docx import. Please report the problem in a separate bug report.
Comment 4 Timur 2019-12-10 14:55:03 UTC
This bug is missing source ODT to test. 
There's a nice sample ODT attachment 47439 [details] with many angles in bug 37828 for DOC.
When later is saved as DOCX and opened in MSO, it's mostly wrong for horizontal text and fine for vertical text.
Comment 5 Timur 2020-02-27 12:38:15 UTC
*** Bug 129263 has been marked as a duplicate of this bug. ***
Comment 6 NISZ LibreOffice Team 2021-07-04 08:30:23 UTC
Based on comment 3 and comment 4 I think this is a duplicate.

*** This bug has been marked as a duplicate of bug 82627 ***