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 ...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: Other All
: medium enhancement
Assignee: Siddhant Chaudhary
URL:
Whiteboard: BSA target:7.5.0 inReleaseNotes:7.5
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
: 150620 (view as bug list)
Depends on:
Blocks: Paste-Special
  Show dependency treegraph
 
Reported: 2013-09-24 10:02 UTC by Blaz Modic
Modified: 2022-12-12 17:31 UTC (History)
7 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 Blaz Modic 2013-09-24 10:02:18 UTC
Hello!

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), 
Enter. 
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), 
Enter. 
NOTE that this is done only the first time during a session.
Thereafter the procedure is simply: 
Ctl-Shift-v, 
Enter, 
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 (obsolete)
Comment 10 Commit Notification 2022-06-21 13:03:04 UTC
Siddhant Chaudhary committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/9d0ca8ee3f0c2a4e6c0bebec6ef1523cd04e849a

tdf#69750 Preserve last used Paste Special options for next session.

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 11 Commit Notification 2022-06-22 15:24:21 UTC
Xisco Fauli committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/575cfa6aebbea714f08e303a3e78d1ac8d99a7e0

tdf#69750: sc: Add UItest

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 12 Heiko Tietze 2022-09-01 07:20:04 UTC
*** Bug 150620 has been marked as a duplicate of this bug. ***
Comment 13 Stéphane Guillou (stragu) 2022-12-12 17:31:50 UTC
Verified as fixed:

Version: 7.5.0.0.alpha1+ (X86_64) / LibreOffice Community
Build ID: ad085990b8073a122ac5222e5220f8f1d6826dcf
CPU threads: 8; OS: Linux 5.15; UI render: default; VCL: gtk3
Locale: en-AU (en_AU.UTF-8); UI: en-US
Calc: threaded

Added to release notes:

https://wiki.documentfoundation.org/index.php?title=ReleaseNotes%2F7.5&type=revision&diff=593791&oldid=593750

Thank you Siddhant!