Bug 157447 - Calc does not preserve cell padding in XLSX
Summary: Calc does not preserve cell padding in XLSX
Status: RESOLVED DUPLICATE of bug 140185
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: x86-64 (AMD64) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: Cell-Border
  Show dependency treegraph
 
Reported: 2023-09-26 05:06 UTC by Murugavel
Modified: 2023-10-11 12:11 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
Screenshots (293.66 KB, application/vnd.oasis.opendocument.text)
2023-10-05 05:50 UTC, Murugavel
Details
Cell padding XLSX upon opening file screenshot (57.59 KB, image/png)
2023-10-05 21:33 UTC, Kira Tubo
Details
XLSX file with cell padding (5.32 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2023-10-05 21:41 UTC, Kira Tubo
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Murugavel 2023-09-26 05:06:39 UTC
Description:
Cell padding was set to 1.0 for entire sheet.
Edit a cell value. Did an undo operation.
Expected only the edit value operation to be undone. But the cell padding changes to the default value.

This happens even if the cell padding was set in previous sessions and not in this session.
This is present in previous versions of Calc also.

Steps to Reproduce:
1.Make a change to cell value.
2.Undo the change.
3.

Actual Results:
The cell padding automatically changes to the default value.

Expected Results:
The cell padding is preserved.


Reproducible: Always


User Profile Reset: No

Additional Info:
Workaround is to set the cell padding every time to the desired value.
Comment 1 Kira Tubo 2023-10-04 04:03:56 UTC
I'm not able to reproduce on 7.5.5.2 or daily master build. These are the steps I did: 

1. Open Calc
2. Select whole sheet
3. Right click > Format Cells > Borders > set Padding to 2.0pt (my default was 1.0pt)
4. Click OK
5. Save file and close Calc
6. Open saved Calc file
7. Type text in any cell and press Enter
8. CTRL+Z
9. Check on padding in Right click > Format Cells > Borders > Padding (mine preserved the padding at 2.0pt set at step 3)

@Murugavel, feel free to respond if these steps are incorrect.


Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: dd7fc07f83416a3d8a444947b7d28f7347520d6a
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded

Version: 7.5.5.2 (X86_64) / LibreOffice Community
Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: CL threaded
Comment 2 Murugavel 2023-10-05 05:50:41 UTC
Created attachment 190030 [details]
Screenshots

Default padding is 0.35 mm in my case (pic 1).
Set the padding to 2.00 mm (pic 2).
Saved the file and opened it again.
Entered a value in cell B3 and pressed CTRL-Z.
The padding is now 0.35 mm (pic 3). It may also be noticed that the height for row 3 is reduced.

After a bit of further checking, noticed that the padding is 0.35 after re-opening the file and even before changing any value and pressing CTRL-Z, though the row height has not changed (pic 4).
Comment 3 Murugavel 2023-10-05 05:52:34 UTC
(In reply to Kira Tubo from comment #1)
> I'm not able to reproduce on 7.5.5.2 or daily master build. These are the
> steps I did: 
> 
> 1. Open Calc
> 2. Select whole sheet
> 3. Right click > Format Cells > Borders > set Padding to 2.0pt (my default
> was 1.0pt)
> 4. Click OK
> 5. Save file and close Calc
> 6. Open saved Calc file
> 7. Type text in any cell and press Enter
> 8. CTRL+Z
> 9. Check on padding in Right click > Format Cells > Borders > Padding (mine
> preserved the padding at 2.0pt set at step 3)
> 
> @Murugavel, feel free to respond if these steps are incorrect.
> 
> 
> Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
> Build ID: dd7fc07f83416a3d8a444947b7d28f7347520d6a
> CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL:
> win
> Locale: en-US (en_US); UI: en-US
> Calc: CL threaded
> 
> Version: 7.5.5.2 (X86_64) / LibreOffice Community
> Build ID: ca8fe7424262805f223b9a2334bc7181abbcbf5e
> CPU threads: 6; OS: Windows 10.0 Build 22621; UI render: Skia/Raster; VCL:
> win
> Locale: en-US (en_US); UI: en-US
> Calc: CL threaded

Yes. These are the steps. I have attached the screenshots for reference.
Comment 4 Murugavel 2023-10-05 07:32:26 UTC
The file was saved in xlsx format. Sorry, I missed mentioning it earlier.
Comment 5 Kira Tubo 2023-10-05 21:33:17 UTC
Created attachment 190052 [details]
Cell padding XLSX upon opening file screenshot

(In reply to Murugavel from comment #4)
> The file was saved in xlsx format. Sorry, I missed mentioning it earlier.

Thanks for confirming. I think the XLSX format is causing the problem. Interestingly enough, if you check on the cell format when you open the XLSX file (BEFORE typing or undoing the text), the padding is already set to default 1.0 pt for me (as shown in attachment). I checked the ODS file, and the padding is saved in the Format Cell dialog.
Comment 6 Kira Tubo 2023-10-05 21:41:55 UTC
Created attachment 190053 [details]
XLSX file with cell padding

1. Open attached XLSX file
2. Note that padding is visibly set to 10pt
3. Right click > Format Cells
4. Padding is set to default 1.0pt (NOT expected)
5. Click OK
6. Padding visibly reset to default 

Expected: Cell padding settings should be retained in XLSX file

Actual: Saved cell padding settings are not retained in XLSX file. Visibly, the cell padding looks like it is saved, but in the Format Cells menu, cell padding is at default. 

It would be good if others can confirm the above steps.
Comment 7 Stéphane Guillou (stragu) 2023-10-11 06:24:03 UTC
Reproduced with:
1. Open Calc
2. Type some text in A1
3. Change cell padding of all cells to 2 mm
4. Save as XLSX
5. Reload

Result: padding lost.
Does not happen with ODS.

Version: 24.2.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: ff9c8b62c1015972e9e89799832fa3690dcd46b4
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Version: 5.4.0.3
Build ID: 92c2794a7c181ba4c1c5053618179937228ed1fb
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk2; 
Locale: en-AU (en_AU.UTF-8); Calc: group
Comment 8 Stéphane Guillou (stragu) 2023-10-11 12:11:13 UTC
This is actually an XLSX format limitation, closing as duplicate of bug 140185.

Thanks everyone!

*** This bug has been marked as a duplicate of bug 140185 ***