Calc/Features/Sheet tab color
Sheet tab color
Specification Status | |
Author | Kohei Yoshida |
Last Change | See wiki history |
Status | In progress in CWS calctabcolor . |
Abstract
Calc's sheet tab now supports non-default background color. When a sheet tab has a non-default color, Calc displays a sliver of its color below the name if the sheet that the tab is associated with is active. For all the other tabs that are associated with the non-active sheets, their non-default color becomes their respective background color.
References
Reference Document | Check | Location (URL) |
Issue ID (required) | available | Issue 5560 |
Test case specification (required) | n/a |
Contacts
Role | Name | E-Mail Address |
Developer | Kohei Yoshida | kyoshida@novell.com |
Quality Assurance | Oliver Craemer | Oliver.Craemer@Sun.COM |
Documentation | up for grabs! | |
User Experience | up for grabs! |
Detailed Specification
Original specification authored by Daniel Watson is available here. The specification presented here only covers parts that are relevant for QA purposes.
When a sheet tab has a non-default color, Calc displays a sliver of its color immediately below the sheet name if the associated sheet is active. For all the other tabs of the non-active sheets, their non-default color becomes their respective background color. When the color of a tab is Default, the color is determined by the application which may vary with system's desktop theme when one is available.
The following screenshot depicts sheets tabs with non-default colors.
Menu
This feature introduce a new menu entry Tab Color... under Format > Sheet which launches the Tab color dialog when selected. This menu item is disabled when the active sheet is protected.
The context menu for the sheet tabs now has a new entry Tab Color... which launches the Tab color dialog when selected. This new menu entry is present only when the active sheet is not protected.
Tab color dialog
The Tab color dialog consists of a number of pre-defined colors and the option for the Default color. A new color gets applied to the tabs of all selected sheet, but the color will not get applied to the tabs of protected sheets in case one or more of the selected sheets are protected.
Either double-clicking a color directly, or hitting ENTER while a color is selected assigns that color to the selected tab(s) and dismisses the dialog.
The color table that this dialog contains can be edited in the Colors page of the Options dialog (Tools > Options).
API
This feature introduces a new optional property TabColor to the com.sun.star.sheet.Spreadsheet service. This property is of type com.sun.star.util.Color.
Migration
N/A
Configuration
N/A
File Format
ODF
This feature requires a file format change in the ODF specification. A proposal to the ODF specification has been submitted here. In a nutshell, the sheet tab color information is stored as a table property attribute as part of the automatic table styles.
Note that the tab color attribute is only saved in the ODF format when the specified ODF format version is 1.2 Extended.
Excel
The tab colors are loaded from and saved to the BIFF 8 binary Excel (xls) documents, and are loaded from the OOXML Spreadsheet (xlsx) documents.
Open Issues
When you open an ods document with colored tabs, re-saving that after you switch the desired ODF version to the standard 1.2 will strip the tab colors only for the modified sheets. This is because Calc caches the XML streams of non-modified sheets and re-uses them during export instead of regenerating the XML structure of all sheets, for performance reasons. What Calc should do under such scenarios is unclear.
Credits
A major part of this feature was developed by Daniel Watson.