Bug 145414 - UNO for Paste Special of sc cell format attributes
Summary: UNO for Paste Special of sc cell format attributes
Status: RESOLVED WONTFIX
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: needsUXEval
Depends on:
Blocks: UNO-Command-New
  Show dependency treegraph
 
Reported: 2021-10-30 18:48 UTC by Carl Pearson
Modified: 2022-08-08 07:57 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments
Paste Special dialog (147.28 KB, image/png)
2022-07-27 07:29 UTC, Heiko Tietze
Details
Paste Special Context Menu (289.96 KB, image/png)
2022-07-27 13:40 UTC, Carl Pearson
Details
Tools -> Customize context menus for sc Cell - Paste; Format attributes not available (25.84 KB, image/png)
2022-07-27 16:39 UTC, V Stuart Foote
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Carl Pearson 2021-10-30 18:48:19 UTC
Add "Paste Only Formats" to Tools/Customize so it could be made a keyboard shortcut, or used to alter the default "Paste Special" context menu.  Adding "Formats" as a  top-level choice for the context menu would also be good.  It's a fairly routine operation.

Add "Paste Column Widths" to the main "Paste Special" menu, and also add "Paste Only Column Widths" to Tools/Customize along with "Paste Only Formats".

As a feature new to Calc, "Paste Column Widths" would be especially handy, even if it was only added to "Paste Special" and not to Tools/Customize.  It has long been part of another spreadsheet app, and makes the tedious job of syncing the look of multiple sheets much easier.

("Paste Row Heights" would also be very handy, but that feature does not even exist in the other app.)

Alternatively, instead of adding "Paste Column Widths" and/or "Paste Row Heights", make "Paste Formats" aware of the width and height of the copied cell(s).
Comment 1 Roman Kuznetsov 2022-07-23 18:07:55 UTC
So many suggestions in one report

UX-team what do you think about it all?
Comment 2 Heiko Tietze 2022-07-25 13:31:29 UTC
Have you checked out the new paste special dialog? It offers some handy shortcuts and based on this we may consider improvements to your workflow. What exactly is it?
Comment 3 Carl Pearson 2022-07-26 18:11:26 UTC
Hi, Heiko, thanks for reaching out.  Yes, I have looked at Paste Special.  Looks like Transpose has recently been added.  One Windows machine I use has 7.1.2.2, and it's not there.  My Mac machine has 7.3.5.2, and Transpose is present.

In any event, in the original submission I'd really made just two suggestions: One regarding easier ways to get at the various options in the context menu's "Paste Special" section; the other, adding "Paste Column Widths" as a new choice.

On the first suggestion, there are two issues:  Not all "Paste Special" operations are available in Tools/Customize; also, it does not appear possible to set a sub-menu item.

(Currently only "Paste Special" and "Styles" have sub-menus.  If one can modify those sub-menu choices, I haven't seen how.  There is an arrow in Tools/Customize presumably indicating the existence of the sub-menu, but no apparent way to see or modify what that sub-menu does.  The sub-choices themselves appear to be hard-coded, and the only way to actually see them is to use the context menu.)

At least so far as pasting goes, the first issue could be resolved by adding all of the "missing" Paste Special choices into Tools/Customize (Formats, Objects, etc.).  Even if the second issue was not addressed, keyboard-centric folk could just make a shortcut, while those preferring the mouse would be able to add one of the currently missing choices as a top-level option to the context menu, though of course being able to modify the sub-menu would be the ideal solution.

On the second suggestion, pasting column widths has been possible for many years in another spreadsheet app, and is very handy for copying the look & feel of one tab to another (that's why I also threw row heights in there, which to my knowledge does not exist in the other app).  Either way, making the regular "Paste" command width-aware, or adding a specific "Paste Widths" choice, would work.

If you need any other info, please let me know!
Comment 4 Heiko Tietze 2022-07-27 07:29:06 UTC
Created attachment 181431 [details]
Paste Special dialog

Talking about this dialog

Version: 7.3.2.2 / LibreOffice Community
Build ID: 49f2b1bff42cfccbd8f788c8dc32c1c309559be0
CPU threads: 8; OS: Mac OS X 10.16; UI render: default; VCL: osx
Locale: de-DE (en_DE.UTF-8); UI: en-US
Calc: threaded
Comment 5 Carl Pearson 2022-07-27 13:40:16 UTC
Created attachment 181439 [details]
Paste Special Context Menu

Sorry, perhaps I wasn't clear.

The image you provided is the full Paste Special menu.

I was talking about the context menu.

Either via Edit or the context menu, you have to click Paste Special again to get to the full menu.

From the previous post, in this image the choices Text, Number and Formula would be the customizable options should that possibility be considered.

Or, just add Formats, Objects, etc. from the full menu to Customize so one has a way to access them via a shortcut.

I know, it's only one extra click, but paste special is used so often that click adds up.  Either way, would be nice to see the "missing" paste special options in Customize.
Comment 6 V Stuart Foote 2022-07-27 16:39:34 UTC
Created attachment 181449 [details]
Tools -> Customize context menus for sc Cell - Paste; Format attributes not available

OK, so there are two asks here.

1. an UNO command to make the InsAttrs action [1] of the sc Paste Special dialog's 'Formats _Only' preset available via Tools -> Customize. For use as an UNO availble to add to context menus, toolbars or menu customization.

2. new source to make column width an attribute available to paste

1 is reasonable; 2 is not.

=-ref-=
[1] https://opengrok.libreoffice.org/xref/core/sc/source/ui/inc/inscodlg.hxx?r=9d0ca8ee&fi=mxBtnInsAttrs#65
Comment 7 Heiko Tietze 2022-07-28 09:08:06 UTC
We resolved bug 128274 as wontfix. It's a can of worms to pick more or less random combinations of options and make them available as a function. I'm open to ponder over improvements to the paste special dialog, however. Carl, what do you think in respect to these arguments (and what was commented on the other ticket)?
Comment 8 Carl Pearson 2022-08-05 19:28:24 UTC
Hi, Heiko,

Hopefully I have explained the rationale for the two feature requests properly.

Have written a fair amount of code, but never really dug into the internals of Uno, so to me it's not clear why it would be a "can of worms" to at least add another choice to the top-level Paste Special context menu.  However, I defer to your greater knowledge.

(My programming hat says it sounds like the problem might be that the context menu is the equivelant of a Star Office object, something compiled, so you can only call it, rather than having access to the source code so you could actually change it; then again, would have to dig further into the LO source to see if I'm barking up the wrong tree.)

However, given that it's off the table to add anything to the top-level "Paste Special" portion of the context menu, to add the "missing" paste special options to Customize so one could make shortcuts of them (as exists with the three existing "Paste Only" choices), or to add the brand-new Paste Column Widths functionality, I guess there's not really anything else to be considered.

In any event, thanks for taking the time to examine these two feature requests!
Comment 9 Heiko Tietze 2022-08-08 07:57:35 UTC
(In reply to Carl Pearson from comment #8)
> Have written a fair amount of code, but never really dug into the internals
> of Uno, so to me it's not clear why it would be a "can of worms" to at least
> add another choice to the top-level Paste Special context menu.  However, I
> defer to your greater knowledge.

New UNO commands are medium sized patches a bit above the beginner level, learn more at https://dev.blog.documentfoundation.org/2022/02/23/adding-a-new-uno-command/. The worms come from the fact that your combination of options is probably not what other users need. So we end up in adding UNO commands for many more or less random combinations. The effort could be the same with a macro - or with some kind of user-defined/last used "preset" in the existing dialog.