Bug 118421 - FILESAVE: Shape is incorrectly rotated after RT
Summary: FILESAVE: Shape is incorrectly rotated after RT
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
6.2.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Justin L
URL:
Whiteboard: target:6.2.0 target:6.1.0.1
Keywords: bibisected, bisected, regression
Depends on:
Blocks:
 
Reported: 2018-06-27 17:05 UTC by Xisco Faulí
Modified: 2020-05-30 07:10 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (55.00 KB, application/msword)
2018-06-27 17:05 UTC, Xisco Faulí
Details
sample 2 (68.00 KB, application/msword)
2018-06-28 13:24 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Xisco Faulí 2018-06-27 17:05:04 UTC
Created attachment 143171 [details]
sample file

Steps to reproduce:
1. Open attached document
2. Save it as .DOC
3. Open the new document

Observed behaviour: the arrow is incorrectly rotated compared to the original file.

Reproduced in

Version: 6.2.0.0.alpha0+
Build ID: 6ebc026e34d0c119067e7dfbad8d932f92844760
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded 

[Bug found by office-interoperability-tools]
Comment 1 Xisco Faulí 2018-06-27 17:08:01 UTC
Regression introduced by:

author	Victor Mireyev <victor@opennodecloud.com>	2018-06-02 16:08:59 +0300
committer	Justin Luth <justin_luth@sil.org>	2018-06-16 06:49:56 +0200
commit c14911a80e3b6e66439b1d569e7cd558c6010864 (patch)
tree a1a49a1073c4372ded754865f85f1df05e9231a4
parent 2c85607101e2e04e870e3b87362f39f9a9148e6c (diff)
tdf#70838 ww8export: rotate shape vertically = swap width/height
During import, rotation past 45 degrees swaps height and width
in SvxMSDffManager::ImportShape, so exporting needs to do the same.

restored from abandonment and corrected by Justin

Import also adjusts TopLeft position, but position seems to
generally be set by other factors on export. Prefer to have
an example proof document and not just guess since it seems
that position is affected by many factors. Therefore, not
doing anything about the position in this commit.

Bisected with: bibisect-linux64-6.2

@Justin, since Victor is no longer envolved, I thought it could be a good idea to add you as CC.
Comment 2 Justin L 2018-06-28 08:51:54 UTC
@Xisco: please add more problematic documents as you find them. This one isn't black or white.

On import, these shapes all come in with 0 rotation. They must be converted into rotated LO shape.  They also roundtrip without rotation, but I don't know where they lose the rotation - so not sure which category of shapes to exclude.
Comment 3 Xisco Faulí 2018-06-28 13:24:11 UTC
Created attachment 143188 [details]
sample 2

Another document affected by the same problem
Comment 4 Justin L 2018-06-28 13:33:00 UTC
@Xisco: looks like Lines and Grouped shapes shouldn't be rotated. If you see any other regressions that don't appear to belong to those two categories, please add them.

Proposed fix: gerrit.libreoffice.org/56595
Comment 5 Xisco Faulí 2018-06-28 13:48:17 UTC
Hi Justin,
Unfortunately I couldn't find any other file affected by this problem...
Comment 6 Commit Notification 2018-06-29 05:44:11 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=1cedd88d40a26a55ce433f8b742215aea83a5382

tdf#118421 ww8export: rotate vertically: not Lines or groups

It will be available in 6.2.0.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 7 Commit Notification 2018-06-30 07:49:56 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "libreoffice-6-1":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=fc32fd280efe27f7618b4905ffc232a824cf9666&h=libreoffice-6-1

tdf#118421 ww8export: rotate vertically: not Lines or groups

It will be available in 6.1.0.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 8 Xisco Faulí 2018-07-02 23:27:02 UTC
Verified in

Version: 6.2.0.0.alpha0+
Build ID: 5fce97a58b8f764e35bf98128591c9a89537da05
CPU threads: 4; OS: Linux 4.13; UI render: default; VCL: gtk3; 
Locale: ca-ES (ca_ES.UTF-8); Calc: group threaded

@Justin, thanks for fixing this!!