Identifying utilised and redundant user styles in CALC conditional formatting

Version: 7.0.6.2 (x64)
Build ID: 144abb84a525d8e30c9dbbefa69cbbf2d8d4ae3b
CPU threads: 4; OS: Windows 10.0 Build 19042; UI render: Skia/Raster; VCL: win
Locale: sv-SE (en_GB); UI: en-GB
Calc: threaded

Having made quite a few mistakes trying to create & modify user styles, there are now a number of redundant styles cluttering up my profile. If I’m not mistaken, each document also appears to have unique styles associated with it so I suspect I will have to “audit” quite a few documents.
Is there a method for identifying where the “registered” styles have been used - probably in conditional formatting?
Identifying where/if they have been utilised also potentially identifies the errors that should be “safe” to remove if there are no “hits”.
I can obviously search through the entries in the conditional format management function to identify those that “appear” to have been used but the CF management function also appears to be discrete to each sheet. I’m hoping there’s a slightly more productive method.
I’ve noticed that the user-defined styles do have the “delete” attribute when perusing the F11 style sheets and some are even entitled “untitled1” etc., so there already exists a probable “target” list - it’s really a case of verifying and then safely removing the dross.

Menu / View / Styles. Next, in the combo box below, select “Applied styles”.
You can only delete user-defined styles, inline (system) styles cannot be deleted.

@sokol92
I must confess I hadn’t appreciated the function of the combo box but whilst it lists “applied styles”, the only entry is “Default”. Could it be because my styles are only applied through the conditional formatting procedure?

“Custom Styles” contains entries but I suspect 66% of them are the result of failed /abandoned attempts where it was obviously all going “pear shaped”. Somewhere to start pruning:)).

The valid “custom styles” are all applied through the conditional formatting process so at least you’ve now given me an insight into where to start looking.

Thanks, much appreciated.

Maybe let’s see together? Could you upload a test file?
Yes, you are absolutely correct, showing applied styles does not take into account styles that are applied for conditional formatting. This is a bug and should be reported.

I deleted the extraneous items - without breaking the file - so there’s nothing left to demonstrate.
I experimented with a throwaway file first which now only contains effects I understand, and can refer to, for when I may want to replicate some of the effects. That’s now a nice clean file so nothing to see.
I haven’t yet checked any of the other files I may have miscreated bad styles on but I’m beginning to understand my own shortcomings and won’t have any trouble cleaning them up either.
Hint taken, I’ll file a bug report.
Amusingly, I filed an earlier bug report and was advised to take it up in the community forums as it proved to be my misunderstanding of the procedures. Clarification has now uncovered the bug in the presentation of applied styles that are only used for conditional formatting.
Also, the check box above the combo box [Show Previews] for me, only places a line feed between the list of styles. Should it do more? I assumed it would demonstrate the style. Another bug report?
Win Win.

I think yes. It seems to me that such a report already exists: #tdf90931.

If I have time, I’ll try to write a macro that will show which styles and where are applied in conditional formatting.

Would Styles Reporter in LibreOffice Extensions site help? Cheers, Al

2 Likes

I think the extension identified by EarnestAl below might obviate this - although I haven’t fully tested it and it doesn’t appear to be able to specifically identify those used in conditional formatting.

Just installed it and it certainly appears to be more functional than the LO stock function.
Thanks for the heads-up.

Wow, I just used it in anger and it really does do the job. The export to .ods is an awesome dashboard.

Thanks to @EarnestAl for the great extension!

Ah. It wasn’t me, I thought I recalled seeing one, and sure enough, someone had already made the extension previously.

In programming, in general, it is extremely difficult to find the primary source. :smile:

@EarnestAl - Agree wholeheartedly with @sokol92. Please feel free to give me a list of all your favourite extensions.

The author of the extension is JF Nifenecker. Many thanks!