Bug 142797 - FILESAVE XLSX Text anchor point inside shapes incorrectly saved
Summary: FILESAVE XLSX Text anchor point inside shapes incorrectly saved
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: XLSX-Shapes
  Show dependency treegraph
 
Reported: 2021-06-11 12:18 UTC by NISZ LibreOffice Team
Modified: 2021-06-27 04:21 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Attachments
Example file from Calc (12.46 KB, application/vnd.oasis.opendocument.spreadsheet)
2021-06-11 12:18 UTC, NISZ LibreOffice Team
Details
The original file saved by Calc (5.79 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-06-11 12:18 UTC, NISZ LibreOffice Team
Details
Screenshot of the original and exported document side by side in Excel and Calc (86.75 KB, image/png)
2021-06-11 12:18 UTC, NISZ LibreOffice Team
Details
spreadsheet with possibilities in OOXML (20.02 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2021-06-26 12:44 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
Description NISZ LibreOffice Team 2021-06-11 12:18:15 UTC
Created attachment 172817 [details]
Example file from Calc

Attached file contains shapes with text, after changing the text anchor point in the Text box properties.
After saving to XLSX and reloading the horizontally Left aligned texts become Center aligned.

Steps to reproduce:
    1. Open attached file
    2. Save as XLSX, reload.

Actual results:
The horizontally left aligned texts become horizontally centered.
The horizontally right aligned texts also become horizontally centered, but this alignment layout is not supported by Excel, so this is fine.

Expected results:
The horizontally left aligned texts stay horizontally left.

LibreOffice details:
Version: 7.2.0.0.alpha1+ (x64) / LibreOffice Community
Build ID: 239b4bb27fd8db26e8416045b3015688a8b1b0ae
CPU threads: 4; OS: Windows 10.0 Build 18363; UI render: default; VCL: win
Locale: en-US (hu_HU); UI: en-US
Calc: CL

Also in 6.0, 5.0, 4.0.
Comment 1 NISZ LibreOffice Team 2021-06-11 12:18:33 UTC
Created attachment 172818 [details]
The original file saved by Calc
Comment 2 NISZ LibreOffice Team 2021-06-11 12:18:48 UTC
Created attachment 172819 [details]
Screenshot of the original and exported document side by side in Excel and Calc
Comment 3 Regina Henschel 2021-06-26 12:32:50 UTC
The problem is, that OOXML does not have attributes or elements which would correspond to the settings possible in ODF.
You can find some explanations on https://wiki.documentfoundation.org/Documentation/Text_in_Custom_Shapes

In general you need to be very cautious not to mix up the anchor of the text box with the paragraph alignment.

You can try to simulate the ODF rendering in OOXML somehow. But without additional information in the file, you will not be able to recreate the original settings on reopening.

We might use the extension mechanism of OOXML to put information about the ODF attributes into the OOXML file.

The problem itself is not specific to Calc. I think, we should make sure, that OOXML filters in Calc and Impress/Draw treat text in shapes the same way. [Writer is different because of the frame bound to custom shapes.]

I set status to 'new' because the problem exists. But there might be duplicates; I have not searched yet.
Comment 4 Regina Henschel 2021-06-26 12:44:06 UTC
Created attachment 173221 [details]
spreadsheet with possibilities in OOXML

The spreadsheets shows the possibilities of OOXML. The examples have 'Wrap text in shape' disabled and 'Allow text to overflow shape' enabled. Otherwise you cannot examine the overflow behavior of the textbox.

This is all in latin LTR writing mode. RTL or east asian might have additional or different problems.