Bug 150306 - Conversion from conditional formatting to regular or static formatting
Summary: Conversion from conditional formatting to regular or static formatting
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Conditional-Formatting
  Show dependency treegraph
 
Reported: 2022-08-09 00:32 UTC by Matías Benzo
Modified: 2024-01-18 15:41 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Matías Benzo 2022-08-09 00:32:49 UTC
Description:
It would be great if there was a way to convert, for a selection of cells, conditional formatting to static or regular formatting. A kind of special paste.

It would be like the equivalent of "Paste values" to remove the formulas and leave only the results (fixed values), but for the formatting. That is, the formatting will no longer depend on any condition/formula but will be fixed and can be edited/copied to other cells.

I suppose this should be possible using macros, but this is not within the reach of most users.

Once I wanted to use one of the colors derived from a conditional formatting, color scale, let's say, one of the intermediate colors of the whole range of greens created and I could not find a way to do it.

Steps to Reproduce:
Select a range of cells that have conditional formatting and convert the formatting of that selection to static formatting.

Actual Results:
There is no simple way to do this.

Expected Results:
There is a tool that does the desired conversion.


Reproducible: Always


User Profile Reset: No



Additional Info:
For Excel, there is an extension that does exactly this, see here:
https://www.asap-utilities.com/asap-utilities-excel-tools-tip.php?tip=276&utilities=117&lang=en_us
Comment 1 Roman Kuznetsov 2022-08-26 18:43:49 UTC
I'm not sure, may be it can be done by extension too...

UX-team?
Comment 2 Heiko Tietze 2022-08-29 09:39:45 UTC
The question boils down to whether Paste Special > Formats should take the conditional formatting or the actual cell style. Or if we should/can have another option here like "[x] Conditional formatting", disabled when "[ ] Formats" is unchecked.
Comment 3 Eike Rathke 2022-08-29 13:36:23 UTC
If, then the latter. But that wasn't the original RFE, which is rather to apply the currently effective conditional formatting style as cell style.
Comment 4 Heiko Tietze 2022-08-30 07:50:54 UTC
So let's add the option to the Paste Special dialog

[ ] All
[x] Number
[x] Text
[x] Date & Time
[x] Formats
    [x] As conditional formatting
[ ] Comments
...
(preset "Values & Formats")

and disable in case the formatting is not copied like

[ ] All
[x] Number
[x] Text
[x] Date & Time
[ ] Formats
    -[ ] As conditional formatting-
[ ] Comments
...
(preset "Values")

The new function comes into play if "Formats" is checked and "As conditional formatting" unchecked. It should copy the cell style but not the CF.
Comment 5 Eike Rathke 2022-08-30 09:37:23 UTC
(In reply to Heiko Tietze from comment #4)
> [ ] Formats
>     -[ ] As conditional formatting-
> 
> The new function comes into play if "Formats" is checked and "As conditional
> formatting" unchecked. It should copy the cell style but not the CF.
That's not what was asked for. The request was to convert the currently applied conditional formatting style to a permanently applied cell style (and probably remove the conditional on that cell).

Furthermore, the wording "As conditional formatting" makes no sense in that dialog because you don't want to apply formats as conditional formatting, au contraire.
Comment 6 Heiko Tietze 2022-08-30 09:48:14 UTC
(In reply to Eike Rathke from comment #5)
> (In reply to Heiko Tietze from comment #4)
> > [ ] Formats
> >     -[ ] As conditional formatting-

> That's not what was asked for. The request was to convert the currently
> applied conditional formatting style to a permanently applied cell style
> (and probably remove the conditional on that cell).

It's exactly what I am talking about. From my user PoV the CF "dynamically" applies a cell styles and when I copy without "As CF" the pure cell style remains.

> Furthermore, the wording "As conditional formatting" makes no sense in that
> dialog because you don't want to apply formats as conditional formatting, au
> contraire.

Hm... maybe mixing all types of formats is not a good idea, as well in regards of the previous considerations. So without "As" but still indented to formats to keep things simple. Not sure if others share my mental picture. What do you think, Roman?
Comment 7 Roman Kuznetsov 2022-08-31 07:33:14 UTC
(In reply to Heiko Tietze from comment #6)

> Hm... maybe mixing all types of formats is not a good idea, as well in
> regards of the previous considerations. So without "As" but still indented
> to formats to keep things simple. Not sure if others share my mental
> picture. What do you think, Roman?

We have "Data -> Calculate -> Formula to value" excellent feature. I think Matías wants the same just for format. 

So I can only suggest don't touch current Special Paste dialog, because Matías wants just select some cell range and just convert current conditional formatting to manual formatting by one action, without any copy/paste.

And would be good just have the command in main menu like "Format -> Conditional -> Conditional to manual", that should delete the condition rule(s) for selected cells but should save the formatting/

And there is another thing: in one cell can be conditional rule and manual formatting at the same time. How should work the feature in that case? Just save only current conditional formatting with current manual formatting as only manual?
Comment 8 Heiko Tietze 2022-08-31 07:55:09 UTC
I dislike the idea of a dedicated UNO command / function. In this case I'd prefer WF in favor of a macro.

(In reply to Roman Kuznetsov from comment #7)
> And there is another thing: in one cell can be conditional rule and manual
> formatting at the same time.

It's all about cell style and I'm not aware that you can have one CS applied manually and another via CF. But tested now and in fact it's possible to have "Accent 1" (bold font) set directly as CS and "Good" (green background) set per CF active at the same time.


So in the end I recommend to resolve WF. Conditional formatting is a specialized function and we better keep it simple. Please reopen if you disagree.

Btw, it's just one way to apply a style, you can also do something like =Style("Good"). See also https://help.libreoffice.org/latest/en-US/text/scalc/01/04060109.html?DbPAR=CALC#bm_id3149425
Comment 9 Matías Benzo 2022-08-31 09:30:52 UTC
Hello dears, nice to see your discussion about my feature request. Thank you very much for that.

(In reply to Roman Kuznetsov from comment #7)

> And would be good just have the command in main menu like "Format ->
> Conditional -> Conditional to manual", that should delete the condition
> rule(s) for selected cells but should save the formatting/
Roman, what you say totally covers my needs. With that I would be happy.
Comment 10 Roman Kuznetsov 2022-08-31 10:20:47 UTC
(In reply to Heiko Tietze from comment #8)
> I dislike the idea of a dedicated UNO command / function. In this case I'd
> prefer WF in favor of a macro.

I don't see the problem with a new UNO command and I still think it's a valid enhancement in general anyway and we just can wait when someone want to implement it (as we do for all those things anyway). I don't think it's impossibly
Comment 11 Heiko Tietze 2022-08-31 11:18:22 UTC
(In reply to Roman Kuznetsov from comment #10)
> I don't see the problem with a new UNO command and I still think it's a
> valid enhancement in general anyway...

Just reopen then.
Comment 12 Matías Benzo 2022-09-03 19:42:22 UTC
So what is the situation for this feature request?, has it already been defined as WONTFIX?
Comment 13 Roman Kuznetsov 2022-09-06 07:12:18 UTC
Let's set it to NEW

ps: Matías you should understand that should be some developer who will want implement it, today we have no interested one.
Comment 14 Matías Benzo 2022-09-06 13:23:13 UTC
Hello Roman, I understand, it will be done when someone is interested in doing it. It is logical.
Due to my little knowledge of how requests are handled, and more precisely of the precise meaning of WONTFIX, I assumed that my request was going to be rejected forever.
Thank you very much.
Matías