Sort containing column labels in protected cells


I have a sheet like this :

| LABEL 1 | LABEL 2 | LABEL 3 | ← 3 protected cells

| data 1 | data 2 | data 3 |
| data 4 | data 5 | data 6 |
| data 7 | data 8 | data 9 |

I need to protect first row containing column labels.

But when I try to sort data using a macro or using Sort menu, selecting LABEL 1 as Sort Key 1 and specifying in Options that range contains colum labels, operation fails due to cell protection even if protected cells (labels) do not have to be modified.

Is it a bug ?

Is there a workaround ?

Thanks in advance


Quoting @Ed38: “Is it a bug?”
To qualify the behaviour as a bug would require to know a specifiaction assessing it otherwise.
Since there also may not be a published specification to the experienced effect the behaviour could be changed. You may file an enhancement request to (using severity = enhancement).

Quoting @Ed38: “Is there a workaround?”
I only can offer the obvious one: Don’t select the protected label for sorting. You then need to choose the sort key using the column name instead of the label in the UI. When customising a SortDescriptor by user code the respective field is identified by a column index anyway (if I remember correctly).

OP has filed tdf#119804 since then; and that is confirmed as an easy hack. I would be glad to help any novice to try and fix this.