Bug 159325 - Allow changing workbook property showObjects (from none to all, so objects are not hidden)
Summary: Allow changing workbook property showObjects (from none to all, so objects ar...
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.6.4.1 release
Hardware: All Windows (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-01-22 15:01 UTC by Franz
Modified: 2024-02-22 14:59 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:


Attachments
test file with corrupt diagram state. (14.00 KB, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet)
2024-01-22 15:03 UTC, Franz
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Franz 2024-01-22 15:01:40 UTC
Description:
After importing unstable excel file
flickering diagram when hidden on page.

Steps to Reproduce:
1. Create a simple file in Excel (current version for example)
2. create some data and a diagram
3. move the diagram in his own page.
4. goto this page and click an unused area(not the diagram itself)
5. Press CTRL + 6 (hide/recover element)
6. Save File(XLSX) and open up with LO Calc

Bonus Excel handles this in a corrupt state too. No Editing or Undoing possible.

Actual Results:
Calc open the file flawlesly but rendering is kinda broken
diagram is not shown until you click it and is "flickering".

Expected Results:
Make the diagram rendering more robust not flickering
-> maybe gray out
-> Make a border for this element even it is hidden.

Contacting Microsoft after fixing this bug inside LO :-)


Reproducible: Always


User Profile Reset: No

Additional Info:
Version: 7.6.4.1 (X86_64) / LibreOffice Community
Build ID: e19e193f88cd6c0525a17fb7a176ed8e6a3e2aa1
CPU threads: 8; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: de-DE
Calc: CL threaded
Comment 1 Franz 2024-01-22 15:03:25 UTC
Created attachment 192099 [details]
test file with corrupt diagram state.
Comment 2 Dean 2024-02-21 01:20:35 UTC
Hello Franz,

I have checked the attachment that you provided and the hidden diagram is not flickering on my end. I created on my excel and opened it on LO calc spreadsheet. My diagram is not flickering but hidden. I have tried to do the expected results and managed to add a border but it is still hidden. 

Version: 24.0.1 (x86_64)
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
CPU Threads: Windows 10.0 Build

I recommend that you try to reproduce this bug that you've found with the latest LibreOffice build from https://dev-builds.libreoffice.org/daily/master/.

I have set the bug's status to 'NEEDINFO'. Please change it back to 'UNCONFIRMED' if the bug is still present in the standard/master build.
Comment 3 Dean 2024-02-21 01:26:11 UTC
(In reply to Dean from comment #2)
> Hello Franz,
> 
> I have checked the attachment that you provided and the hidden diagram is
> not flickering on my end. I created on my excel and opened it on LO calc
> spreadsheet. My diagram is not flickering but hidden. I have tried to do the
> expected results and managed to add a border but it is still hidden. 
> 
> Version: 24.0.1 (x86_64)
> Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
> CPU Threads: Windows 10.0 Build
> 
> I recommend that you try to reproduce this bug that you've found with the
> latest LibreOffice build from
> https://dev-builds.libreoffice.org/daily/master/.
> 
> I have set the bug's status to 'NEEDINFO'. Please change it back to
> 'UNCONFIRMED' if the bug is still present in the standard/master build.

More Info on Version Information:
Version: 24.2.0.3 (x86_64)
Build ID: da48488a73ddd66ea24cf16bbc4f7b9c08e9bea1
Environment: CPU Threads:8; OS: Windows 10.0 Build 19045
UI render: Skia/Raster; VCL: win
Locale: en-US 
Calc:threaded
Comment 4 ady 2024-02-21 16:22:36 UTC
I found the hidden chart by using Calc's menu View > Navigator (F5). The chart itself remains hidden, but I can see the corners.

I guess that by "flickering" you mean that the chart remains hidden and that the "only" way to make it visible in Calc is to click and hold the mouse's button on it, which shows the chart for a second. You can still move or resize the (hidden) chart.

Right-click on the (hidden) chart area > Edit. That shows the chart, until we exit from edit mode.

While in edit mode for the chart, I can save the file as a new XLSX and when reloading it the chart is visible, even when not in edit mode.

I am tempted to ask which precise attribute is applied in Excel for the chart to be hidden, in order to test for compatibility or support in Calc for an equivalent setting/attribute. But...

(In reply to Franz from comment #0)
> Bonus Excel handles this in a corrupt state too. No Editing or Undoing
> possible.

If the XLSX file was created by Excel, and Excel itself has a problem with this file (or with the chart), IDK how exactly Calc should know how to handle this in some "better" way. I guess this makes Calc "compatible" (in some way) with what happens in Excel.

For any kind of improvement, we would need to know which exact attribute Calc is supposed to match or emulate or be compatible with.
Comment 5 Franz 2024-02-22 09:39:37 UTC
Hey everyone.
I've tried to test the file and the behavior in the latest versions of Excel and LO Calc. Same issues as before.

I think an other behaviour for hidden elements would be good. Something like greyed out(half transparent). Atleast when it is the only element on that page.

Thank you for your time.
Comment 6 ady 2024-02-22 14:35:51 UTC
No reaction to comment 4. This seems to be some kind of enhancement request, but with no clear request.
Comment 7 Buovjaga 2024-02-22 14:59:10 UTC
Mystery solved:

1. Unzip the .xlsx file
2. Edit file xl/workbook.xml in a text editor
3. Notice this element: <workbookPr showObjects="none" defaultThemeVersion="166925"/>

The showObjects="none" is a non-default value, which apparently hides the objects (even though the chart *is* visible when opened in office.com). The attribute is optional, so it can be removed or the value changed to "all". Zipping up the files again (and changing extension to .xlsx) and opening in LibreOffice gives us a visible chart.

I read about the property in this API doc: https://learn.microsoft.com/en-us/dotnet/api/documentformat.openxml.spreadsheet.workbookproperties?view=openxml-2.8.1

Looking at LibreOffice source

$ git grep -n showObjects
oox/source/token/tokens.txt:4711:showObjects
sc/source/filter/excel/excdoc.cxx:230:        Add( new XclExpBoolRecord(0x008D, false, XML_showObjects ) );   // HIDEOBJ
sc/source/filter/excel/excdoc.cxx:343:    Add( new XclExpBoolRecord(0x008D, false, XML_showObjects ) );   // HIDEOBJ
sc/source/filter/excel/xerecord.cxx:177:            // HACK: HIDEOBJ (excdoc.cxx) should be its own object to handle XML_showObjects
sc/source/filter/excel/xerecord.cxx:178:            mnAttribute, mnAttribute == XML_showObjects ? "all" : ToPsz( mbValue ));
sc/source/filter/oox/workbooksettings.cxx:126:    maBookSettings.mnShowObjectMode    = rAttribs.getToken( XML_showObjects, XML_all );

Picking one of the files and looking at log:

git log -S"HIDEOBJ" sc/source/filter/excel/excdoc.cxx

I see a very old commit

commit 43bafd9dd74489bac28edb5bbdb8a7d0b2442cc5
Author: Release Engineers <releng@openoffice.org>
Date:   Wed Jul 1 08:58:41 2009 +0000


So this has been handled for a long time.

I guess the question is if we want GUI access to change this workbook property.

Let's discuss it.