Bug 135915 - FILEOPEN XLSX Rotated shape has wrong height and width values displayed
Summary: FILEOPEN XLSX Rotated shape has wrong height and width values displayed
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium normal
Assignee: Balázs Regényi
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: OOXML-Shapes
  Show dependency treegraph
 
Reported: 2020-08-19 11:16 UTC by NISZ LibreOffice Team
Modified: 2020-08-27 10:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshot of the original document side by side in Excel and Calc (190.79 KB, image/png)
2020-08-19 11:16 UTC, NISZ LibreOffice Team
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2020-08-19 11:16:12 UTC
Created attachment 164464 [details]
Screenshot of the original document side by side in Excel and Calc

Attachment #164368 [details] contains some drawing shapes that demonstrate rotated shapes.
When opening in Calc the shapes with non 0, 90, 180 or 270 degrees rotation are imported with correct rotation and sizes but the Position and Size dialog displays hugely incorrect height and width values.

Steps to reproduce:
    1. Open Attachment #164368 [details] from bug #135828
    2. Observe shape width values in the sidebar/Position and Size dialog

Actual results:
The “Nyíl: felfelé mutató 4” shape has 3.26 cm width and 5.26 cm height instead of 0.82 cm width and 5,5 cm height in the dialog (all are supposed to have the same values).
“Nyíl: felfelé mutató 5” and “Nyíl: felfelé mutató 7” shapes have 5.57 cm width and 2.05 cm height.
“Nyíl: felfelé mutató 8” shape has 2.63 cm width and 5.46 cm height 
“Nyíl: felfelé mutató 10” shape has 2.99 cm widht and 5.36 cm height
“Nyíl: felfelé mutató 11” shape has 5.56 cm widht and 2.11 cm height
“Nyíl: felfelé mutató 13” shape has 5.38 cm width and 3 cm height.
“Nyíl: felfelé mutató 14” shape has 3.80 cm width and 5 cm height.


Expected results:
Shapes correct height and width is displayed in the dialog.

LibreOffice details:
Version: 7.1.0.0.alpha0+ (x64)
Build ID: <buildversion>
CPU threads: 4; OS: Windows 6.3 Build 9600; UI render: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: en-US
Calc: CL

And in:
Version: 7.0.0.3 (x64)
Build ID: 8061b3e9204bef6b321a21033174034a5e2ea88e
CPU szálak: 4; OS: Windows 6.3 Build 9600; Felületmegjelenítés: Skia/Raster; VCL: win
Locale: hu-HU (hu_HU); UI: hu-HU
Calc: CL

But not yet in:
Verzió: 6.4.0.3 (x86)
Build az.: b0a288ab3d2d4774cb44b62f04d5d28733ac6df8
CPU szálak: 4; OS: Windows 6.3 Build 9600; Felületmegjelenítés: alapértelmezett; VCL: win; 
Területi beállítások: en-US (hu_HU); Felület nyelve: hu-HU
Calc: CL

Additional Information: 

Bibisected using bibisect-win64-7.1 to:
URL: https://cgit.freedesktop.org/libreoffice/core/commit/?id=130e6a3f4493b987a7d0b177cc84d65219b47d1
author	 Szabolcs Toth <szabolcs450@gmail.com>	2020-05-21 09:06:08 +0200
committer	László Németh <nemeth@numbertext.org>	2020-05-29 17:26:08 +0200

tdf#83593 XLSX DrawingML shape import: fix missing rotation

Adding CC to: Szabolcs Tóth
Comment 1 László Németh 2020-08-27 06:37:26 UTC
@Balázs: Is it possible, that using bounding box data of the rotated object is only the (intended?) behaviour of rotation in LibreOffice, i.e. there is no regression here.
Comment 2 László Németh 2020-08-27 07:36:30 UTC
(In reply to László Németh from comment #1)
> @Balázs: Is it possible, that using bounding box data of the rotated object
> is only the (intended?) behaviour of rotation in LibreOffice, i.e. there is
> no regression here.

It seems, bitmap image and metafile rotations use the the original size, but shape rotation uses the bounding box. I believe, this is intended, because shape rotation is a common tool (especially in Impress and Draw) to create new shapes, i.e. building blocks of a complex image, where handling bounding box size is more natural. So I thinks, this is not a real bug, especially because there are two workarounds:

1. Resize the shape than rotate.

or

2. Convert shape to GDI metafile. After that its rotation works as requested here.
Comment 3 László Németh 2020-08-27 10:42:34 UTC
Not a regression, but it is an interoperability issue, according to MSO's different behavior.