Change default action on "Move or Copy Sheet..." to "Copy Sheet" instead of "Move"

How to change the default action in “Calc” program so that when I select “Move or Copy Sheet…” the default action to be “Copy”?

If I want to move the sheet position I simply drag it with the mouse.

A person will most likely right-click on a Sheet and select “Move or Copy Sheet…” if he wants to duplicate the Sheet, not to move it.

Some times, because of the default “Move” behaviour, I wrongly edit the current sheet, because I am thinking that this is a new copy.

How to change the default? Even if that requires for me to recompile the whole suite, wich file do I need to edit?

If it was availabile a separate “Copy Sheet…” action I would insert it in the menu, but no, they are only availabile combined (the “Move or Copy”).

2 Likes

Click and drag to move (as you already know). Hold down control key while you click and drag to copy!

4 Likes

The question should have been “How best copy a sheet within the same spreadsheet document?” and what @shantanuo posted as comment would have been the answer - including the advantage to be able to choose the target position with the drop functionality. NOT modifying the action with Ctrl+ is the natural “allele”. It’s done and distinguished the same way for cell ranges inside a sheet.
I would add: Only if you want to move or copy a sheet to a different (probably new) document or if you are handicapped concerning the usage of the Ctrl key it’s recommendable to open the context menu.

Change ScMoveTableDlg::Init in sc/source/ui/miscdlgs/mvtabdlg.cxx.

Every time one makes generalizations based on what they do most often, it looks odd. E.g., have you considered how often the move operation is used across documents, compared to copies, given the convenience of copy/move inside document, as explained by @shantanuo? :wink:

See also: tdf#89421.

And tdf#139464.

4 Likes

Thank you! With the help of your answer I installed “LibreOfficeDev_7.5.0.1.0_Win_x86-64” and now I have a new item in the Sheets bar context menu and in the Sheets menu. The new item is “Duplicate Sheet” :slight_smile:

So, I removed the item “Move Copy Sheet…” from the Menu and from the Context Menu and I will use the new “Duplicate Sheet” command availabile with this version of LibreOffice.

Another odd effect of “Move Copy Sheet…” was that the new sheet was created to the left while the “+” from the Sheets tab created a new sheet to the right.

The new “Duplicate Sheet” create the sheet to the right, so it is consistent with the action of the “+” from the Sheets bar. This is another reason of why I removed the “Move Copy Sheet” command completely out of my sight from the menus.

The keyboard shortcut sugestion is good (thank you too!) but I only use LibreOffice Calc weekly and I am sure that I will not remember to use the shortcut. For an intensive user I am confident that this is very useful.

For me the problem is solved. Thank you!

Exceptional knowledgeable peoples here!

For me this was a very big deal because I use LibreOffice Calc to keep track of all my expenses for the company I work to, so I can get my moneys back later from them, so a mistake is best to be avoided.

It’s a very good point, but isn’t it exactly this kind of assumption that underpins the original question: the app has a baked in assumption about user needs that isn’t always true.

I have the same issue highlighted by raduv (with similar use case consequences) and—if these two quite distinct functionalities have to by lumped together—think it’s pretty reasonable to have the ability to select default behaviour rather than be constrained by someone’s assumption of what “most people” will need.

I would still be happy for an answer to the post’s question (although for sure, shantanuo’s tip is a big help; thanks!).

I’d love a dedicated “Duplicate Sheet” option, but alas it doesn’t seem to be available on the latest Ubuntu version :cry:

Not if you use a LTS Ubuntu, but you can install LibreOffice from PPA, e.g. LibreOffice Fresh : “LibreOffice Packaging” team or LibreOffice Still : “LibreOffice Packaging” team.

2 Likes