Bug 69750 - Feature request: Preserve last used Paste special options selection for next session (after restarting LibreOffice)
Summary: Feature request: Preserve last used Paste special options selection for next ...
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected)
Hardware: Other All
: medium enhancement
Assignee: Siddhant Chaudhary
Whiteboard: BSA
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
Depends on:
Blocks: Paste-Special
  Show dependency treegraph
Reported: 2013-09-24 10:02 UTC by Blaz Modic
Modified: 2022-04-21 09:54 UTC (History)
6 users (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Blaz Modic 2013-09-24 10:02:18 UTC

In my work with LibreOffice Calc, I use Paste special option a lot. Most of the time I want to use the same "Selection" settings (not default settings). Selecting these settings every is very time consuming.

Would it be possible if LibreOffice would remember last selected settings in the next session too?

Thank you and kind regards.

Blaž Modic
Operating System: Windows 7
Version: unspecified
Comment 1 tommy27 2013-09-25 19:23:15 UTC
feature request
Comment 2 Jean-Baptiste Faure 2014-10-04 20:45:43 UTC
It has always been the case in Calc.

Closing as WorksForMe. Please feel free to reopen if it does not work for you.
Before to reopen, please do that:
1/ upgrade your installation to the current version.
2/ try with a clean fresh user profile: https://wiki.documentfoundation.org/UserProfile. Do not forget to set your user data in Tools > Options > LibreOffice.

Best regards. JBF
Comment 3 Jill Miller 2014-10-23 22:55:09 UTC
I was going to post this as a new Feature Request until I found that Bug 69750 is very similar.

Yes. "Calc has always been this way". That is why we are asking for a change; an option to retain a set of preferred settings for the user.

Here's my original draft post explaining my usage and possible change:

Problem description: Default for Paste Special specifically excludes Number option. Most of my copies are either number-without-copying-the-format or value-from-formula to number. For both I must uncheck EVERY (or every-less-one) option right down the line and I must do this every time I am working on a newly-opened spreadsheet. I do a lot of this kind of copy and it gets old fast.

Steps to reproduce:
1. In three cells insert a number in the first two. In the third, sum the first two numbers.
2. Copy the third cell.
3. Paste Special into the first cell, setting for Number.

Current behavior: Requires resetting all or most of the Selection options (only first time after opening Calc).

Preferred behavior: Allow user to specify default Paste Special settings or retain Paste Special settings after closing Calc.

FWIW, Excel allows this paste operation to be done with four key strokes, (assuming the contents are already in the clipboard): 
Alt-e (Edit), 
s (pasteSpecial), 
v (Value), 
In Calc, (but only the first time a spreadsheet is used) the same procedure requires: 
Ctl-Shift-v (PasteSpecial), 
p (turn off Paste-all), 
x (turn off teXt), 
n (turn on Number), 
d (turn off Date/time), 
f (turn off Formulas), 
c (turn off Comments), 
m (turn off forMats), 
o (turn off Objects), 
NOTE that this is done only the first time during a session.
Thereafter the procedure is simply: 
THEREAFTER one has to check each time to make sure the PasteAll is not checked and think about what to do rather than letting muscle memory take over. 
If the PasteAll is turned on accidentally, then no further keystrokes register. 
Those of us who are touch typists and who do repetitive tasks find that it creates the possibilty of excess errors as well as being annoying.

BTW, Jean-Baptiste Faure, I checked your 2/ link and searched my user settings but most of the folders are empty and there is none labeled "registry". I could find nothing which might allow me to reset the Paste Special defaults.
Comment 4 Jean-Baptiste Faure 2014-10-24 04:36:13 UTC
Sorry, it seems I overlooked the part "in the next session too" in the problem description. I closed the bug as WorksForMe because LibreOffice works as expected in the current session and "It has always been the case in Calc".

Set status to NEW because it is a valid enhancement.

Best regards. JBF
Comment 5 Thomas Lendo 2019-08-11 15:29:01 UTC
Adding needsUXEvalto clarify how and where can this setting be stored and changed.
Comment 6 Heiko Tietze 2021-05-20 12:36:00 UTC
The dialog was reworked for bug 134802 and we list some presets left-hand now. Would be simple to add there another option: "user-defined". But it would be much easier to just remember the last settings. 

Storing data at the registry is easy hackable with medium difficulty. The dialog is at sc/uiconfig/scalc/ui/pastespecial.ui
Comment 7 Siddhant Chaudhary 2022-04-20 21:15:29 UTC
Hi. I would like to work on this issue. 

Can someone point me out to how the Paste Special user settings can be stored? Is there any other dialog that implements this kind of saved user settings thing that I could look at?

Also, just to confirm, the code implementing this dialog is in sc/source/ui/miscdlgs/inscodlg.cxx, right?
Comment 8 Heiko Tietze 2022-04-21 08:48:07 UTC
(In reply to Siddhant Chaudhary from comment #7)
> Can someone point me out to how the Paste Special user settings can be
> stored?

Look for officecfg::Office, for example printoptions.cxx. The exact implementation is up to you, meaning whether you read/write every flag individually or save one combined string.

> Also, just to confirm, the code implementing this dialog is in
> sc/source/ui/miscdlgs/inscodlg.cxx, right?

Yes, that's correct (no other file accesses pastespecial.ui).
Comment 9 Buovjaga 2022-04-21 09:54:27 UTC Comment hidden (off-topic)