Bug 37828 - Writer: Rotated text is not saved correctly in doc format (sample with all angles)
Summary: Writer: Rotated text is not saved correctly in doc format (sample with all an...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium major
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:doc
: 47264 65974 129618 (view as bug list)
Depends on:
Blocks: DOC
  Show dependency treegraph
 
Reported: 2011-06-01 10:51 UTC by Alexandre Demers
Modified: 2024-08-18 21:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Original file (ODT) (15.48 KB, application/vnd.oasis.opendocument.text)
2011-06-01 10:52 UTC, Alexandre Demers
Details
Saved DOC file (15.00 KB, application/msword)
2011-06-01 10:52 UTC, Alexandre Demers
Details
Original ODT file (15.96 KB, application/vnd.oasis.opendocument.text)
2011-06-01 10:55 UTC, Alexandre Demers
Details
Saved DOC file (15.00 KB, application/msword)
2011-06-01 10:55 UTC, Alexandre Demers
Details
ZIP of DOCs written out under different versions of LO. (21.13 KB, application/zip)
2015-04-04 07:15 UTC, Owen Genat (retired)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Alexandre Demers 2011-06-01 10:51:15 UTC
I attached a demo file and the result in DOC.

As you can see on the first page:
- 0 and 270 degrees behave correctly.
- 45, 135, 225 and 315 degrees are not correctly expended. The reason is because the dimensions of the text area are not correctly translate from odt to doc.
- from 90 and 180 degrees, text is going in the wrong direction.

On the second page, the text is rotated vertically:
- 45, 135, 225 and 315 degrees are not correctly expended. The reason is because the dimensions of the text area are not correctly translate from odt to doc.
- from 90 and 270 degrees, text is going in the wrong direction.
Comment 1 Alexandre Demers 2011-06-01 10:52:13 UTC Comment hidden (obsolete)
Comment 2 Alexandre Demers 2011-06-01 10:52:48 UTC Comment hidden (obsolete)
Comment 3 Alexandre Demers 2011-06-01 10:55:04 UTC
Created attachment 47439 [details]
Original ODT file
Comment 4 Alexandre Demers 2011-06-01 10:55:38 UTC
Created attachment 47440 [details]
Saved DOC file
Comment 5 Björn Michaelsen 2011-12-23 12:03:49 UTC Comment hidden (obsolete)
Comment 6 Alexandre Demers 2011-12-23 14:35:04 UTC
This bug is still there in latest version and can be reproduced with the
attached files.
Comment 7 Rainer Bielefeld Retired 2012-01-28 01:14:16 UTC
[Reproducible] with "LibreOffice 3.5.0 RC2 German UI/Locale [Build-ID: e371a95-bf68a13-5a1aa2b-d3c1ae9-b938258] on German WIN7 Home Premium (64bit).

That did not work perfect in OOo 3.1.1, but much better than in LibO. OOo respected rotation angle, only made a mistake in word wrap.

Might be related to "Bug 34436 - TABLES text in cells behaves wrong when rotated"

@Cédric:
Please feel free to reassign (or reset Assignee to default) if it’s not your area or if provided information is not sufficient. Please set Status to ASSIGNED if you accept this Bug.
Comment 8 A (Andy) 2013-05-06 21:06:52 UTC
reproducible with LO 4.0.2.2 (Win7 Home, 64bit)
Comment 9 Owen Genat (retired) 2013-07-31 07:47:56 UTC
*** Bug 47264 has been marked as a duplicate of this bug. ***
Comment 10 Owen Genat (retired) 2013-07-31 07:49:02 UTC
*** Bug 65974 has been marked as a duplicate of this bug. ***
Comment 11 QA Administrators 2015-04-01 14:41:13 UTC Comment hidden (obsolete)
Comment 12 Owen Genat (retired) 2015-04-04 07:15:11 UTC
Created attachment 114608 [details]
ZIP of DOCs written out under different versions of LO.

Re-tested under GNU/Linux x86_64 using:
v3.3.4.1 OOO330m19 Build: 401
v3.4.6.2 OOO340m1 Build: 602
v3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b
v3.6.7.2 Build ID: e183d5b
v4.0.6.2 Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24
v4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
v4.2.8.2 Build ID: 48d50dbfc06349262c9d50868e5c1f630a573ebd
v4.3.5.2 Build ID: 3a87456aaa6a95c63eea1c1b3201acedf0751bd5
v4.4.1.2 Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432

All exported DOCs (attached) exhibit problems (incorrect rotation angle and lack of wrapping) when subsequently opened by LO Writer. If others can test under MS Word that would be appreciated.
Comment 13 Alexandre Demers 2015-04-05 01:25:37 UTC
(In reply to Owen Genat from comment #12)
> Created attachment 114608 [details]
> ZIP of DOCs written out under different versions of LO.
> 
> Re-tested under GNU/Linux x86_64 using:
> v3.3.4.1 OOO330m19 Build: 401
> v3.4.6.2 OOO340m1 Build: 602
> v3.5.7.2 Build ID: 3215f89-f603614-ab984f2-7348103-1225a5b
> v3.6.7.2 Build ID: e183d5b
> v4.0.6.2 Build ID: 2e2573268451a50806fcd60ae2d9fe01dd0ce24
> v4.1.6.2 Build ID: 40ff705089295be5be0aae9b15123f687c05b0a
> v4.2.8.2 Build ID: 48d50dbfc06349262c9d50868e5c1f630a573ebd
> v4.3.5.2 Build ID: 3a87456aaa6a95c63eea1c1b3201acedf0751bd5
> v4.4.1.2 Build ID: 45e2de17089c24a1fa810c8f975a7171ba4cd432
> 
> All exported DOCs (attached) exhibit problems (incorrect rotation angle and
> lack of wrapping) when subsequently opened by LO Writer. If others can test
> under MS Word that would be appreciated.

I've tested the resulting .doc files under MS Office 2007 and under LO 4.4.2. While both are not rendering the text correctly, LO is closer to the expected result than MS Office. So, it is still a problem.
Comment 14 tommy27 2016-04-16 07:27:25 UTC Comment hidden (obsolete)
Comment 15 Telesto 2016-12-05 18:57:05 UTC
Confirming with:
Version: 5.4.0.0.alpha0+
Build ID: 33f5bc54aaa7fe7aa9335726e30f9c349155e04d
CPU Threads: 4; OS Version: Windows 6.2; UI Render: default; 
TinderBox: Win-x86@62-merge-TDF, Branch:MASTER, Time: 2016-12-01_23:21:05
Locale: nl-NL (nl_NL); Calc: CL
Comment 16 QA Administrators 2017-12-10 16:43:03 UTC Comment hidden (obsolete)
Comment 17 ZhenQizhi 2018-11-29 08:17:20 UTC
Still exists in version:
Version: 6.3.0.0.alpha0+ (x64)
Build ID: 0f25a3c36f27fd51453b9a9115f236b83c143684
CPU threads: 8; OS: Windows 10.0; UI render: GL; VCL: win; 
TinderBox: Win-x86_64@42, Branch:master, Time: 2018-11-27_20:06:55
Locale: zh-TW (zh_TW); UI-Language: en-US
Calc: threaded
Comment 18 QA Administrators 2019-11-30 03:38:28 UTC Comment hidden (obsolete)
Comment 19 Timur 2019-12-10 13:21:38 UTC
We have very nice sample ODT but unfortunately we seem to have different behavior in versions per angles.
I confirmed filesave issue in LO with opening saved DOC in MSO (which is relevant), because again opening saved DOC in LO can give different result as a different fileopen issue. 
Filesave must be correct in order to test round-trip fileopen.

Now in LO master 6.5+:
 on 1st page in MSO wrong are 45, 135, 180, 225, 315 (while in LO is opposite, 90 and 270 appear wrong)
 on 2nd page in MSO all is wrong (while in LO just 90 appear wrong).

Seems improved from OO 3.3 to LO 6.5+:
 filesave on 1st page for 90 and 270 (per MSO)
 nothing on 2nd page (per MSO).
But round-trip fileopen (that may be another issue, but let me write it) is worsened, it appeared fine in OO 3.3 for 90 and 270 (though it wasn't because MSO is relevant), but is now in master 6.5+ wrong.
Comment 20 Timur 2020-02-27 12:25:01 UTC
*** Bug 129618 has been marked as a duplicate of this bug. ***
Comment 21 QA Administrators 2022-02-27 03:28:27 UTC Comment hidden (obsolete)
Comment 22 Regina Henschel 2022-08-15 11:26:48 UTC
I think, that the expectations are wrong in regard to 45deg, 135deg, 180deg, 225deg and 315deg. The textbox in doc is not able to rotate the text in those directions. It can only show texts horizontal, 90deg rotated and 270deg rotated.
Comment 23 QA Administrators 2024-08-15 03:15:01 UTC Comment hidden (obsolete)
Comment 24 tfabris 2024-08-18 21:10:49 UTC
Problem still reproduces for me on LibreOffice version 24.2.5.2 (X86_64) for MacOS Intel.

Repro steps:

- Start with an existing LibreOffice .odt file which contains a text box.
- Right-click on the text box and press "Position and Size".
- In the "Rotation" tab set the rotation to 90 degrees.
- Press "Save As" and save the file as a "Word 97-2003 (.doc)" file.
- If desired, you can also press "Save As" and save it as a "(.docx)" file too, for a slightly different version of the bug.
- Close the document.
- Try opening the resulting ".doc" file in both LibreOffice and in Microsoft Word 2003.

Expected:
- After opening the resulting ".doc" file, the text should be correctly rotated, regardless of which application you open it in.

Actual:
- The resulting ".doc" file opens and prints correctly in Microsoft Word 2003.
- The resulting ".doc" file does not open or print correctly in Libre Office.
- See this by open the resulting ".doc" file in LibreOffice: See that the text within the box is now incorrectly rotated at the wrong angle.
- The shape of the box is the same, and the box's outline is still at the original rotation. However the text WITHIN the box is now rotated at 180° instead of 90°, so now the text's word-wrap has completely changed because it's at the wrong angle and doesn't fit the box any more.
- The ".docx" version is also rotated incorrectly, but in a slightly different way; the text is separated from the frame and in a different place on the screen.

Note:
This bug is a particular problem for me in LibreOffice because I would like to use LibreOffice as a replacement for my aging copy of Word 2003. However I have many existing old documents with rotated text which will not open correctly in LibreOffice.