Description: I have a spreadsheet created with Excel (in .xlsx format). In Excel, the various worksheet tabs are shown in a variety of colours. When opening this spreadsheet in LibreOffice, the tab colours are not shown. The file command reports: foo.xlsx: Microsoft Excel 2007+ Steps to Reproduce: 1. Open the .xlsx file in LibreOffice. 2. Note that tabs are not rendered in the correct colour(s). Actual Results: Tabs are shown in the default colour. Expected Results: Tabs should be shown in the colours as I see them in Excel. Reproducible: Always User Profile Reset: Yes Additional Info: I will try to make a reproducible file that I can attach here.
Hello, Thank you for filing the bug. Please send us a sample document, as this makes it easier for us to verify the bug. I have set the bug's status to 'NEEDINFO', so please do change it back to 'UNCONFIRMED' once you have attached a document. (Please note that the attachment will be public, remove any sensitive information before attaching it.) How can I eliminate confidential data from a sample document? https://wiki.documentfoundation.org/QA/FAQ#How_can_I_eliminate_confidential_data_from_a_sample_document.3F Thank you
Created attachment 148623 [details] Reproducible test case. The problem appears to be that the tab colour is not rendered correctly when the worksheet is protected.
Confirm. Version: 6.3.0.0.alpha0+ Build ID: 3fa4674615b747e219afe5bf0a9b689df3840439 CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11;
Any progress on this? Thanks.
still repro in current 7.1 master
Also in LibreOffice 6.4.7.2 (x86) and 7.0.2.2 (x64). Do not matter if file is created with Calc or Excel. Unprotected sheet tabs retain its color.
I can confirm this bug persists in LO 7.3.2.2 The issue only affects protected sheets in documents saved in xlsx format.
Protecting any sheets in an xlsx-formatted file with intact tab colors will also strip it of its tab colors.
LibreOffice sets the background color of the tab in ScDocFunc::SetTabBgColor where it checks if the tabs is protected or not. If the tab is protected, no background will be set for the corresponding tab. Allowing to change the background color in the function will allow the change of the background color via Basic macro: ThisComponent.getCurrentController().getActiveSheet().TabColor = 255*200 In M$ Excel I can change the background color of a tab via VBA as well: Worksheets("Sheet1").Tab.Color = RGB(25, 25, 25) Saving the document in LibreOffice/M$ will keep the changed background color of the tab. Should we stick to the behaviour of M$ or try to set the background color differently for a protected tab in LibreOffice?
I vote for mimicking MS Excel behaviour.