Bug 154271 - Adjust view port on auto scroll to maximize the visible area
Summary: Adjust view port on auto scroll to maximize the visible area
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
7.1.0.0.alpha0+
Hardware: All All
: medium enhancement
Assignee: Hossein
URL:
Whiteboard: target:24.2.0
Keywords: difficultyMedium, easyHack, skillCpp, topicUI
Depends on:
Blocks: Calc-UX
  Show dependency treegraph
 
Reported: 2023-03-19 10:08 UTC by maison
Modified: 2023-09-06 14:36 UTC (History)
2 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 maison 2023-03-19 10:08:36 UTC
Description:
Here is a inconsistency when you press the Ctrl End keys in a worksheet. It obviously applies to derived jumps, like Ctrl Shift End.

Steps to Reproduce:
1. Preparation: Fill a new spreadsheet A so that it is a bit longer than the height of your screen. Fill the a new spreadsheet B so that it is a bit shorter than the height of your screen.
2. In spreadsheet B, press Ctrl End.
3. In spreadsheet A, press Ctrl End.

Actual Results:
Spreadsheet B is still shown in its entirety and the cursor went to almost the bottom of the screen (i.e. the bottom of your data).

Spreadsheet A is only shown on half of the screen and the other half is empty, useless. To see the second‐to‐the‐last half screen of your data, you have to scroll back, thus interrupt your workflow.

Expected Results:
Like in Excel, the last cell of spreadsheet A should be at the bottom of the screen, thus maximizing the amount of data you visualise.

(If Calc was consistent in the wrong way, it would hide a part of spreadsheet B and only show you the last half screen. But it doesn’t, so at least it’s consistent on spreadsheet B.)


Reproducible: Always


User Profile Reset: No

Additional Info:
Empty space is not what the user needs.
Comment 1 ady 2023-03-19 12:06:03 UTC
Repro. I'm not sure whether this belongs to UX. Let's find out.
Comment 2 maison 2023-03-19 21:38:02 UTC
And if your document has columns that extend over the limit of the screen, Ctrl+End will jump in such a way that will only fill a top left *quarter* of your screen!
Comment 3 Heiko Tietze 2023-03-21 16:02:14 UTC
Not repro. Visible area A1:K27, a) filled to M28 => ctrl+end jumps to M28 (and marks with shift), b) filled to G15 => ctrl+end jumps to G15.

Version: 7.5.1.2 (X86_64) / LibreOffice Community
Build ID: 50(Build:2)
CPU threads: 8; OS: Linux 6.2; UI render: default; VCL: kf5 (cairo+xcb)
Locale: de-DE (en_US.UTF-8); UI: en-US
7.5.1-1
Calc: threaded
Comment 4 ady 2023-03-21 16:56:09 UTC
(In reply to Heiko Tietze from comment #3)
> Not repro. Visible area A1:K27, a) filled to M28 => ctrl+end jumps to M28
> (and marks with shift), b) filled to G15 => ctrl+end jumps to G15.

It is not that ctrl+end fails, but rather that the relevant cell is shown "in the middle" of the screen, leaving either half or even a quarter of the main area with non-blank cells, and up to 3/4 of the main area showing blank cells. Hence, not a very efficient use of the screen.

If your normal visible area is A1:K27, then go to Z60, introduce "A" [ENTER], [CTRL]+[HOME], [CTRL]+[END]. Where the cell Z60 is shown on your screen? How much of your screen is showing blank/empty cells (i.e. beyond the last-used cell, Z60)?

At any rate, cases such as freeze panes and split window should also be considered / tested.
Comment 5 Heiko Tietze 2023-03-22 10:20:39 UTC
The same happens when you jump to the end of a row or column (ctrl+down/right). Minor issue, maybe not a big deal to fix.

Code pointer: 
The command for ctrl+end is uno:GoToEndOfData, SID_CURSORENDOFFILE, executing pTabViewShell->MoveCursorEnd() in sc/source/ui/view/tabview3.cxx
Comment 6 maison 2023-04-04 23:20:27 UTC
However, Calc does better than Excel when you go a few pages further than the last cell and press Ctrl Up: it puts the last full cell in the middle of the screen, whereas Excel puts it on the first line of the screen, leaving almost all of the screen empty. So in this case Calc at least shows something more (i.e. half of the screen).

The current behaviour of Calc jumping to a cell in the middle of the screen is more adapted to searches. It makes some sense that the search result appears mostly in the middle if Calc has to refresh the screen.
Comment 7 maison 2023-08-23 22:06:04 UTC
Any hope for a beautiful day?
Comment 8 Commit Notification 2023-09-06 14:27:36 UTC
Hossein committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/218b73d937453d5d813a050f1216840ba71f4fe7

tdf#154271 Fix automatic cursor/screen jump in Calc

It will be available in 24.2.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 9 Hossein 2023-09-06 14:28:27 UTC
(In reply to maison from comment #7)
> Any hope for a beautiful day?
Please test to see if the problem is resolved for you.
Have a beautiful day. :-)
Comment 10 maison 2023-09-06 14:36:51 UTC
Brilliant, thanks!
I will try as soon as it is available.