Bug 88578 - Paste Special 'Values Only' button should not be highlighted by default
Summary: Paste Special 'Values Only' button should not be highlighted by default
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
4.4.0.1 rc
Hardware: x86-64 (AMD64) macOS (All)
: high major
Assignee: Thomas Viehmann
URL:
Whiteboard: target:5.0.0 target:4.4.1
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-01-19 10:48 UTC by Peter Johnson
Modified: 2015-05-02 13:31 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Add can_default to OK button of calc's paste special (636 bytes, patch)
2015-01-20 09:55 UTC, Thomas Viehmann
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Peter Johnson 2015-01-19 10:48:34 UTC
When opening the Paste Special dialog the button for 'Values Only' is highlighted. If I want to paste something else e.g. formats I need to check the Formats box (and maybe uncheck some others) and press return or click OK.

If I want to repeat the operation on another cell, the Paste Special dialog opens with 'Formats' pre-checked (as in 4.3 and earlier) but if I press return, the value is pasted without the format. This is because the 'Values Only' is again highlighted when the dialog opens. To clear the condition, I have to uncheck and then re-check the required option(s) first in order to remove the focus from the 'Values Only' button.

This is confusing, time-wasting, and regressive. For me, the fact that LO Calc remembers the paste options and allows them to be repeated with two keystrokes any number of times is a real plus. This functionality has now gone.

Please remove the focus from 'Values Only' when opening the Paste Special dialog if other options have previously been selected.
Comment 1 Alex Thurgood 2015-01-19 13:45:24 UTC
It would be helpful if you had an example Calc sheet that you could walk us through with detailed step-by-step instructions on what you copy and paste via the Paste special menu, unless the behaviour is applicable to any copied object which is then pasted via Paste Special

Setting to NEEDINFO pending requested information.

Please set back to unconfirmed once you have done so.
Comment 2 Peter Johnson 2015-01-19 14:19:51 UTC
The behaviour applies to any operation where a cell or cells are copied and the user selects Paste Special. It does not apply to e.g. copying an image object.

Example:
1. Close and restart Libreoffice (drops previously saved paste options) and create a new spreadsheet.
2. Fill a cell or cells with a value or formula and give them a non-default format e.g. Currency
3. Populate a range of cells with values / formulae in a different format e.g. default or General
4. Copy the cell(s) in 2.
5. Highlight the cells in 3 and select Paste Special
6. Check 'Formats' and uncheck all other options.
7. Click OK or press Return.

Outcome: as expected. The Currency formats only is pasted over the selected values.

8. Repeat steps 3 to 5. The Paste Special dialog shows the previous choice of 'Formats' checked, but the new 'Values Only' button has focus.
9a. Click OK.
9b. Press Return.
9c. Uncheck and check the Formats checkbox.  Press Return.

Outcomes:
9a - as expected. Using the mouse correctly submits the OK button and the required paste option.
9b - incorrect. The values only are pasted.
9c - as expected. Clicking the checkbox moves focus to the OK button.

My first report did not completely describe this - apologies for that. Presumably what happens is that pressing return submits the button with focus and in case 9b this is 'Values Only'.  Expected behaviour where previous choices are checked on the dialog should be to submit the OK button which will apply those choices. This is important for users who use the keyboard for these operations: Shift+Cmd+V then Return is highly efficient for repeated special pasting. The new behaviour means a couple of extra mouse clicks for every paste and breaks the assumption that pressing return always submits 'OK'.

So it seems to me the solution is for the OK button always to have focus when the dialog opens.
Comment 3 Alex Thurgood 2015-01-19 14:35:07 UTC
Hmm, thanks, this rings a bell as similar to an existing report, will have to hunt around a bit.
Comment 4 Alex Thurgood 2015-01-19 14:42:01 UTC
Unfortunately, I can not reproduce on LO 4352 on Mac OSX 10.10.1

When I attempt the second or third copy action, only the Format button is selected, and OK is highlighted. If I just press enter, only the format gets applied.
Comment 5 Alex Thurgood 2015-01-19 14:42:29 UTC
Ah, I see you're using 440, let me try a recent master build instead
Comment 6 Alex Thurgood 2015-01-19 14:46:55 UTC
Can not reproduce on 

Version: 4.5.0.0.alpha0+
Build ID: a3e51e2706f37f4a7a3a3276d96fd4bcad7f5f7c
Locale: fr_

either. This is my own master build from Saturday.
Comment 7 Alex Thurgood 2015-01-19 14:49:57 UTC
Ooops, sorry, I CAN confirm,. When I tested the first time in my master build I used the mouse to validate the format selection, and didn't just press the enter key. The OK key is indeed not highlighted either.

CONFIRMING
Comment 8 Alex Thurgood 2015-01-19 14:50:22 UTC
This is also a regression over LO 4352
Comment 9 Alex Thurgood 2015-01-19 14:50:37 UTC
Upping priority
Comment 10 Alex Thurgood 2015-01-19 15:07:37 UTC
@Thomas : I see you worked on implementing the top 3 buttons - any idea ?
Comment 11 Thomas Viehmann 2015-01-20 09:55:13 UTC
Created attachment 112526 [details]
Add can_default to OK button of calc's paste special

Hi.

Thank you, alex, for putting me in the CC list!
I would suspect that something is up with the dialog definition in
sc/uiconfig/scalc/ui/pastespecial.ui
I will try to test the attached patch.

Best regards

Thomas
Comment 12 Thomas Viehmann 2015-01-20 10:30:24 UTC
Comment on attachment 112526 [details]
Add can_default to OK button of calc's paste special

No, that is not it...
Comment 13 Thomas Viehmann 2015-01-20 18:59:45 UTC
Hello Peter, Alex,

first off, thank you peter for finding the bug and taking the time to report it and provide information.

If I am not mistaken, previously, the first checkbox had the focus when the dialog started.
In my opinion, it might be better to actually give the focus to the OK button precisely for the usecase of wanting to paste several things with the same paste options.
Does that make sense to you?

Best regards

Thomas
Comment 14 Peter Johnson 2015-01-20 23:03:49 UTC
No problem - glad to help.

I don't recall where the focus initially is in 4.3.5, but since OK is the only button with an action, I guess pressing return always triggers it, even if the focus is on a checkbox.

Since there are now multiple buttons with actions, I think your suggestion is right.  The new options at the top of the Paste Special dialog are convenient short cuts and OK should be the default and have focus when the dialog opens.  If the user selects other checkboxes, the focus will stay with or move to OK, as already implemented.

Kind regards.

Peter
Comment 16 Commit Notification 2015-01-21 16:10:07 UTC
Thomas Viehmann committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=7b39d4071a090829f40b61bc831e8069d6a9d493&h=libreoffice-4-4

fdo#88578: Focus on first checkbox when showing calc paste special dialog

It will be available in 4.4.1.

The patch should be included in the daily builds available at
http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
http://wiki.documentfoundation.org/Testing_Daily_Builds
Affected users are encouraged to test the fix and report feedback.
Comment 17 Cor Nouws 2015-01-21 19:47:54 UTC
Hi all,

As far as I know this is not for MacOS only ;)


(In reply to Peter Johnson from comment #0)
> When opening the Paste Special dialog the button for 'Values Only' is
> highlighted. If I want to paste something else e.g. formats I need to check
> the Formats box (and maybe uncheck some others) and press return or click OK.

Yes. That is the way how the old dialog worked.

> If I want to repeat the operation on another cell, the Paste Special dialog
> opens with 'Formats' pre-checked (as in 4.3 and earlier) but if I press
> return, the value is pasted without the format.

Why not Alt+O,Enter or Ctrl+Enter to use the OK button?
Also clicking directly on the OK button uses all the options set.
In any case for me on 4.4.0.2 on Ubuntu...

> ... This is because the 'Values
> Only' is again highlighted when the dialog opens. To clear the condition, I
> have to uncheck and then re-check the required option(s) first in order to
> remove the focus from the 'Values Only' button.
> This is confusing, time-wasting, and regressive. For me, the fact that LO
> Calc remembers the paste options and allows them to be repeated with two
> keystrokes any number of times is a real plus. This functionality has now
> gone.

As far as I see, the work flow I described just works.

> Please remove the focus from 'Values Only' when opening the Paste Special
> dialog if other options have previously been selected.

That would be smart too.
But the patch, with which this issue is set fixed, does not do that.

And the behaviour as was, allowed to Tab to 2nd, 3rd button and Enter for much used functions...
With focus on OK, one can do Shft+Tab twice or three times ;) so who cares, but I describe the function as it IMO was designed..
It's not at all unique that you have to use Ctrl+Enter for OK in dialogs.
Comment 18 Peter Johnson 2015-01-21 20:57:08 UTC
(In reply to Cor Nouws from comment #17)

Thanks for coming in.

> Hi all,
> 
> As far as I know this is not for MacOS only ;)
> 
> 
> (In reply to Peter Johnson from comment #0)
> > When opening the Paste Special dialog the button for 'Values Only' is
> > highlighted. If I want to paste something else e.g. formats I need to check
> > the Formats box (and maybe uncheck some others) and press return or click OK.
> 
> Yes. That is the way how the old dialog worked.
> 
> > If I want to repeat the operation on another cell, the Paste Special dialog
> > opens with 'Formats' pre-checked (as in 4.3 and earlier) but if I press
> > return, the value is pasted without the format.
> 
> Why not Alt+O,Enter or Ctrl+Enter to use the OK button?
> Also clicking directly on the OK button uses all the options set.
> In any case for me on 4.4.0.2 on Ubuntu...
Yes, that works, but whilst I'm a relatively advanced user, I don't know these key strokes - this is not likely to be an obvious solution for most users.

> 
> > ... This is because the 'Values
> > Only' is again highlighted when the dialog opens. To clear the condition, I
> > have to uncheck and then re-check the required option(s) first in order to
> > remove the focus from the 'Values Only' button.
> > This is confusing, time-wasting, and regressive. For me, the fact that LO
> > Calc remembers the paste options and allows them to be repeated with two
> > keystrokes any number of times is a real plus. This functionality has now
> > gone.
> 
> As far as I see, the work flow I described just works.
> 
> > Please remove the focus from 'Values Only' when opening the Paste Special
> > dialog if other options have previously been selected.
> 
> That would be smart too.
> But the patch, with which this issue is set fixed, does not do that.
> 
> And the behaviour as was, allowed to Tab to 2nd, 3rd button and Enter for
> much used functions...
> With focus on OK, one can do Shft+Tab twice or three times ;) so who cares,
> but I describe the function as it IMO was designed..
Fair, enough, but in my view the expected behaviour should be the easiest - pressing Return to paste values only (the first button with focus on the dialog, it could have been any other) and requiring tabs or more complex keystrokes for the more likely requirements e.g. do what I just did is counterintuitive.

Thanks!


> It's not at all unique that you have to use Ctrl+Enter for OK in dialogs.