Bug 161192 - EDITING - allow for default change to cut/copy cell content without affecting source or target formatting
Summary: EDITING - allow for default change to cut/copy cell content without affecting...
Status: RESOLVED DUPLICATE of bug 64028
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.3 all versions
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL: https://ask.libreoffice.org/t/how-to-...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-05-20 23:37 UTC by Dominik Lenné
Modified: 2024-06-06 04:35 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 Dominik Lenné 2024-05-20 23:37:15 UTC
Description:
This is a feature request
Add CALC settings option to switch off formatting changes when copying, cutting or pasting:

action:
cut out a cell with ctrl+c
paste cell

current result:
formatting is deleted in source cell and added to target cell

result suggested:
formatting remains untouched in both source and target cells

This can currently be achieved with some more complex actions, like context menu or keyboard shortcuts, but it would save a lot of work and worry, if copying, deleting and pasting of formatting could be switched off completely in the settings, with more complex keyboard/contextmenu actions to be used when wanting to transport the formatting as well. 

Steps to Reproduce:
1.cut out a cell with ctrl+c
2.paste content to other cell


Actual Results:
formatting is deleted in source cell and written to target cell

Expected Results:
no formatting is deleted or written at all


Reproducible: Always


User Profile Reset: No

Additional Info:
Request is for a settings option to toggle current behaviour and formatting-remains-untouched behaviour for all cut/coopy/paste operation using ctr+c, ctr+x or ctr+v.
Comment 1 ady 2024-05-21 07:57:08 UTC
In Calc, just go to menu Tools > Customize > Keyboard. In the "Functions" field, type in "Paste" (without quotation marks) and see the list of results.

From there, you can assign keyboard shortcuts to any of those.

It is true that there is no such actions/functions as "paste everything except...".

I'm not sure that adding settings for clipboard actions is the best choice. Maybe adding (several UNO?) functions such as:
* paste everything except (cell) format
* paste everything except values
* paste everything except formula

and so on might help, so custom keyboard shortcuts would be available for them.

Whether this is worth the effort, or whether it would be broadly used, IDK.
Comment 2 Stéphane Guillou (stragu) 2024-06-05 06:09:08 UTC
The Paste Special dialog (Ctrl + Shift + V) remembers the latest settings, so it is possible to set the options as needed there once ("Values only"), and then do:
1. Select source
2. Copy
3. Delete (removes the contents but not the formatting)
4. Move to target
5. Ctrl + Shift + V, then Enter (which reuses the latest settings)

Is that not sufficient?

But Ask.LO questions show that there is significant demand for such a feature. See for example:
- https://ask.libreoffice.org/t/calc-how-do-i-drag-and-drop-contents-only-while-preserving-formatting-in-the-original-cell/2978
- https://ask.libreoffice.org/t/how-to-prevent-cell-formatting-being-removed-when-values-are-cut/53102
- https://ask.libreoffice.org/t/calc-can-i-cut-paste-the-contents-of-multiple-cells-at-once-without-affecting-references-and-formats/13971
- https://ask.libreoffice.org/t/preserve-formatting-during-drag-and-drop/44121

Very much related to bug 64028, although that one only asks about not removing the format of cut cells, not a "formatless cut/copy/paste setting" per se.

UX/Design team, what do you think?
Comment 3 Heiko Tietze 2024-06-05 09:08:07 UTC
Customization and Paste Special are sufficient. Agree with WF.

There is bug 158724 - Option to suppress overwriting of a cells conditional formatting on paste, without the use of paste special - being in implementation, and bug 129387 - Keyboard Shortcut to Paste Format Only (resolved WFM) among many others. Feel free to reopen with further arguments, Dominik, or comment on one of the other requests.
Comment 4 Stéphane Guillou (stragu) 2024-06-05 12:30:49 UTC
Thanks Heiko.
Dominik, maybe you'd rather see this report marked as duplicate of bug 64028, as that feature would be a step in the direction of what you're hoping for? (At least, reducing the number of steps required.)
Comment 5 Dominik Lenné 2024-06-05 18:50:22 UTC
bug 158724 deals with the insertion part of moving something, this is a special case of my suggestion to leave alone any formatting whatsoever.

same with bug 64028, afaics, which deals with the cutting part of moving a cell.
 
Stéphane, what you wrote certainly works, but as what I tried to describe is my default action, I'd like to make default easy and the exception more complex.
(Imagine parts of the sheet with borders to enhance recognizability and then transferring a cell: you get a missing piece in the border and an unrelated piece of border somewhere else.)

@ady

Concerning keyboard shortcut adaptation via - tools - customize - keyboard:

* ctr+x: there is only the option 'cut out' - not the option 'cut values only' or 'cut values and formulas only, no formatting' or the like.
ctr+c, then del works, but is a two click solution.

* ctr-v: typing in "paste" (resp. the german equivalent "einfügen") I see the list - (thx for the great tip, btw!). If I choose "paste content", the keyboard shortcut will open the menu window, which kind of content i want to paste. So it works, but it is also a two click solution. 

As both cutting and pasting are involved, this is maybe actually two suggestions in one. 

I m v the simplest thing to do would be to add the respective options 
* "cut, but leave source cell formatting as it is" and 
* "paste, but leave target cell formatting as it is" 
to the keyboard shortcut adaptation system.
Comment 6 Stéphane Guillou (stragu) 2024-06-06 04:35:20 UTC
(In reply to Dominik Lenné from comment #5)
> As both cutting and pasting are involved, this is maybe actually two
> suggestions in one. 
> 
> I m v the simplest thing to do would be to add the respective options 
> * "cut, but leave source cell formatting as it is" and 
> * "paste, but leave target cell formatting as it is" 
> to the keyboard shortcut adaptation system.
So that would be requesting two new UNO commands. Given that the second part is less likely to be implemented, given that we already have a Paste Special dialog that remembers the latest setting, I am marking as duplicate of bug 64028. I'll comment there that there is interest in having a UNO command tied to this action so a shortcut can be assigned.
Thanks!

*** This bug has been marked as a duplicate of bug 64028 ***