Bug 81467 - No warning when deleting custom styles used only in conditional formatting
Summary: No warning when deleting custom styles used only in conditional formatting
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.2.5.2 release
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
: 147538 (view as bug list)
Depends on:
Blocks: Conditional-Formatting Sidebar-Styles
  Show dependency treegraph
 
Reported: 2014-07-17 18:21 UTC by helplibreoffice
Modified: 2023-01-16 16:03 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Demonstration of bug (96.93 KB, application/vnd.oasis.opendocument.spreadsheet)
2014-07-17 19:23 UTC, helplibreoffice
Details

Note You need to log in before you can comment on or make changes to this bug.
Description helplibreoffice 2014-07-17 18:21:30 UTC
I have encountered spreadsheets in which all custom styles have been deleted through the Styles and Formatting UI, yet when the file is saved as a flat XML files (.fods), it is clear that the styles have not been properly deleted (cells still are using the phantom styles).

In addition to the obvious issue (not properly deleting the style), this is also a minor security issue as the style names could contain private data.  The user would believe this private data was deleted, but it would still be contained in the file.

The spreadsheets were created in LO v4.2.x and the styles were deleted in v4.2.5.2.

I have tried to reproduce this issue from scratch, and I have been unsuccessful in my initial attempts.
Comment 1 helplibreoffice 2014-07-17 19:23:28 UTC
Created attachment 102999 [details]
Demonstration of bug

I have attached a demonstration file of this bug.  Simply open the file in LO Calc, press F11 to go to the Styles and Formatting subwindow, delete all styles, and then resave.  The style names will not be deleted from the file.
Comment 2 Jean-Baptiste Faure 2014-07-19 09:37:07 UTC
Reproducible with LibreOffice 4.3.1.0.0+ build at home under Ubuntu 14.04 x86-64.

The problem seems to come from conditional formatting. Indeed the bugdoc defines several conditional formats using custom styles. If you delete all custom styles (even the ones which are in use) and all conditional formatting, save the file, close it and reopen the .fods file with your preferred plain text editor, then you can check that you cannot find any name of the custom styles (search for the string "zs".

Updated summary accordingly.

Best regards. JBF
Comment 3 Markus Mohrhard 2014-07-30 22:17:28 UTC
So where is the bug? Obviously we can not delete a style that is still in use. You might be able to argue that we should not be able to delete it from the list in this case but otherwise the behavior is correct.

So if at all this is a bug that you are able to delete a style from the list while it is still used in a conditional formatting.

Oh and using the term security issue in such a bug report must be a joke.
Comment 4 QA Administrators 2015-09-04 02:48:36 UTC Comment hidden (obsolete)
Comment 5 Jean-Baptiste Faure 2015-09-05 18:37:11 UTC
I agree with Markus in comment #3 : the bug is only in the fact that there is no warning if the user removes a custom style that is used only in conditional formatting. This problem is still reproducible in LO 5.0.3.0+

best regards. JBF
Comment 6 QA Administrators 2016-09-20 10:29:41 UTC Comment hidden (obsolete)
Comment 7 Jean-Baptiste Faure 2016-09-25 19:14:00 UTC
Still reproducible in LO 5.2.3.0+ and current master, both built at home under Ubuntu 16.04 x86-64.

Summary updated according to comments #3 and #5.

Best regards. JBF
Comment 8 QA Administrators 2019-03-09 03:42:31 UTC Comment hidden (obsolete)
Comment 9 QA Administrators 2021-03-09 03:44:19 UTC Comment hidden (obsolete)
Comment 10 Buovjaga 2023-01-16 16:00:33 UTC
*** Bug 147538 has been marked as a duplicate of this bug. ***
Comment 11 Buovjaga 2023-01-16 16:03:45 UTC
Still repro

Arch Linux 64-bit, X11
Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 0160109aae49189f5cc9bed60db3c7084003e471
CPU threads: 8; OS: Linux 6.1; UI render: default; VCL: kf5 (cairo+xcb)
Locale: fi-FI (fi_FI.UTF-8); UI: en-US
Calc: threaded Jumbo
Built on 16 January 2023