How to Delete Conditional Formatting using Calc Macro?

I tried the following

ThisComponent.CurrentSelection.ConditionalFormat.clear()

but does’nt work

How can I delete a condition of Conditional Format using a macro?

thanks.

Please Kunjomachen

take a look to this thread:

These are unrelated. There is an old API for conditional formats that we still support. This just won’t let you modify new conditional formats as these have no representation in the old API. Since the old API is published we can’t change it and can’t remove it. As soon as the new API will be available it will be marked as deprecated but surely we need to support it till 5.0 If there are regressions in the old API please open a bug report and I’ll take care of it.