| Summary: | FILESAVE XLSX Some rotated shapes are vertically flipped | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | NISZ LibreOffice Team <libreoffice> |
| Component: | Calc | Assignee: | Dániel Arató (NISZ) <arato.daniel> |
| Status: | VERIFIED FIXED | ||
| Severity: | normal | CC: | aron.budea, nemeth, rb.henschel, shinji.enoki, szabolcs450, varga.balazs3 |
| Priority: | medium | Keywords: | filter:xlsx, implementationError |
| Version: | 7.0.0.3 release | ||
| Hardware: | All | ||
| OS: | All | ||
| See Also: | https://bugs.documentfoundation.org/show_bug.cgi?id=142914 | ||
| Whiteboard: | target:7.3.0 target:7.2.2 | ||
| Crash report or crash signature: | Regression By: | ||
| Bug Depends on: | |||
| Bug Blocks: | 136327 | ||
| Attachments: |
Example file from Excel with rotated shapes
The original file saved by Calc Screenshot of the original document in Calc Screenshot of the exported document in Calc All shapes in A1 Export with current master 'repaired' file proposed patch |
||
|
Description
NISZ LibreOffice Team
2021-06-15 15:17:15 UTC
Created attachment 172921 [details]
The original file saved by Calc
Created attachment 172922 [details]
Screenshot of the original document in Calc
Created attachment 172923 [details]
Screenshot of the exported document in Calc
I reproduced in the following environment: Version: 7.1.4.2 / LibreOffice Community Build ID: a529a4fab45b75fefc5b6226684193eb000654f6 CPU threads: 8; OS: Linux 5.10; UI render: default; VCL: gtk3 Locale: ja-JP (ja_JP.UTF-8); UI: ja-JP Calc: threaded I think, the shapes are not flipped, but have a wrong swapped width and height in the anchor. If the rotation angle is larger as 45deg, MSO swaps width and height in calculating the anchor, and LO too. But it seems for exact 45deg MSO does not swap width and height, but LO does it. To make it easier to calculate the object size from the anchor, put all shapes into one large cell. Then you can get the size as difference of the offset. If I do so, and then "repair" the document so, that the offset in the 'to' element corresponds to the not swapped width and height, the shapes will be shown correctly in Excel. Created attachment 172951 [details]
All shapes in A1
original ods file
Created attachment 172952 [details]
Export with current master
Created attachment 172953 [details]
'repaired' file
Here the offset in the 'to' element is set, so that from-colOff + ext.cx = to-colOff and from-rowOff + ext.cy = to-rowOff.
Created attachment 172956 [details]
proposed patch
I don't know, whether such change will have any impact on export to MS binary format or to other formats than OOXML.
This should be fixed together with bug 142914, because the same code part is affected. (In reply to Regina Henschel from comment #10) > This should be fixed together with bug 142914, because the same code part is > affected. Thanks for the analysis. I asked Szabolcs to take a look at this. Daniel Arato (NISZ) committed a patch related to this issue. It has been pushed to "master": https://git.libreoffice.org/core/commit/eae0636311d3a1b3a1af58a3e4df686b55afa3fa tdf#142881 XLSX import: fix shapes rotated exactly 45°, It will be available in 7.3.0. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Daniel Arato (NISZ) committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/30128c2fea22ccd08678744c9501ab052a1fb074 tdf#142881 XLSX import: fix shapes rotated exactly 45°, It will be available in 7.2.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Isn't this fixed now? Daniel Arato (NISZ) committed a patch related to this issue. It has been pushed to "libreoffice-7-2": https://git.libreoffice.org/core/commit/30128c2fea22ccd08678744c9501ab052a1fb074 tdf#142881 XLSX import: fix shapes rotated exactly 45°, It will be available in 7.2.2. The patch should be included in the daily builds available at https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: https://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Verified in: Version: 7.3.0.0.alpha0+ (x64) / LibreOffice Community Build ID: 8151f3a1d99ab740d2affdccc7115faa156bf3ad CPU threads: 4; OS: Windows 10.0 Build 17134; UI render: Skia/Raster; VCL: win Locale: hu-HU (hu_HU); UI: hu-HU Calc: threaded |