Download it now!
Bug 88475 - Form: Tablecontrol navigation to last row often impossible
Summary: Form: Tablecontrol navigation to last row often impossible
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Base (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: Other Linux (All)
: medium normal
Assignee: Lionel Elie Mamane
URL:
Whiteboard: target:4.5.0 target:4.4.1 target:4.3...
Keywords: regression
Depends on:
Blocks:
 
Reported: 2015-01-15 20:59 UTC by Robert Großkopf
Modified: 2015-01-23 20:29 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments
Navigate with arrowkeys up and down to the form - have a look at navigationbar of tablecontrol (11.01 KB, application/vnd.oasis.opendocument.base)
2015-01-15 20:59 UTC, Robert Großkopf
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Großkopf 2015-01-15 20:59:46 UTC
Created attachment 112316 [details]
Navigate with arrowkeys up and down to the form - have a look at navigationbar of tablecontrol

Open the form in the attached database.
Set the cursor in the first row.
Switch with the arrow-keys down to last row, the up to the first row.
Have a look at the navigationbar of the control.
Sometimes the navigation to last rows is set inactive - but last row isn't the active row.
Comment 1 Robert Großkopf 2015-01-15 21:15:08 UTC
The buggy behavior first appears with this version:
Version 4.0.0.0.beta2 (Build ID: 4104d660979c57e1160b5135634f732918460a0)
beta1 of LO 4.0.0.0 works right. I have set the version to 4.0.0.3 release, because beta2 isn't listed.
When I open beta2 and set the cursor to the last field of the tablecontrol in last row 4 (Name: Angela) and go up with the arrow-key to Name:Barack the navigation to last row would be inactive in row 3.

It is the same behavior up to LO 4.4.0.2 here with OpenSUSE 12.3 64bit rpm Linux.
Comment 2 raal 2015-01-16 07:31:01 UTC
I can not confirm with LO 4.3.5.2, win7
Comment 3 Alex Thurgood 2015-01-16 11:20:48 UTC
Confirming on OSX 10.10.1

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

OK, so the problem is one of incorrect activation/higlighting (or inactivation) of the record navigation arrow in the record navigation toolbar when navigating the records in a grid control with the up/down keys of the keyboard.

1) Open the form of the attached ODB.

2) Click in the first cell of the first row of grid control

3) Now move down through each record with the keyboard "down arrow" key.

4) When you reach record 4, notice how the "end of record" button in the record navigation toolbar gets greyed out. So far, this is the correct behaviour.

5) Moving the down arrow key once again moves the cursor to a new record, this is also correct.

6) Now, move back up through the records with the "up arrow" key, until you reach record 1. Notice how the record navigation toolbar still gives the impression that it is possible to continue navigating back through previous records as this is still highlighted, whereas it should be greyed out. Also notice how the "move back to first record" button in the record navigation toolbar is also still active, whereas it too, should also be greyed out.

Confirming.

My guess is that some of the IDs are no longer correctly bound since the toolbar UI rework was done.
Comment 4 Commit Notification 2015-01-16 16:12:53 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=e60b589952985edff12b1a28392ce6fa0ca8d9be

fdo#88475 BrowseBox/grid: reposition data cursor to current row after paint

It will be available in 4.5.0.

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 5 Lionel Elie Mamane 2015-01-16 16:23:17 UTC
(In reply to Alex Thurgood from comment #3)
> My guess is that some of the IDs are no longer correctly bound since the
> toolbar UI rework was done.

That was a good and reasonable guess, but it turns out it this is not the problem. The problem is that, as is logical, the "move to previous" button is enabled/disabled based on the "am I on the first row" test. That test is done on the grid control's internal *data* cursor, not on the current row of the grid.

Now, in general, the grid keeps its notion of current current row of the grid and the position of the data cursor synchronised. *But* when the grid is repainted, the data cursor is "obviously" moved the refetch the data of the rows that are to be painted. And it was not moved back to the current row afterwards. The fix is to do that.

(Why it was working before I have no clue. Maybe by pure accident that the "test if the button should be enabled" happened before the "repaint".)
Comment 6 Julien Nabet 2015-01-16 16:53:40 UTC
Lionel: sorry for this certainly dumb question but "OSL_ENSURE" does something when debugging, isn't it? (see http://opengrok.libreoffice.org/xref/core/include/osl/diagnose.h#99)
If yes, how http://cgit.freedesktop.org/libreoffice/core/commit/?id=e60b589952985edff12b1a28392ce6fa0ca8d9be can work on release mode?
Comment 7 Commit Notification 2015-01-19 16:26:32 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

fdo#88475 BrowseBox/grid: reposition data cursor to current row after paint

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 8 Commit Notification 2015-01-19 16:28:15 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5a17dd94ed0aca6cefbe1d44cd0a9aed74d1ff21&h=libreoffice-4-3

fdo#88475 BrowseBox/grid: reposition data cursor to current row after paint

It will be available in 4.3.7.

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 9 Lionel Elie Mamane 2015-01-19 18:14:47 UTC
(In reply to Julien Nabet from comment #6)
> Lionel: sorry for this certainly dumb question but "OSL_ENSURE" does
> something when debugging, isn't it? (see
> http://opengrok.libreoffice.org/xref/core/include/osl/diagnose.h#99)
> If yes, how
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=e60b589952985edff12b1a28392ce6fa0ca8d9be can work on release mode?

Yes, you are right.
Comment 10 Commit Notification 2015-01-20 12:21:46 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fixup previous commit for fdo#88475

It will be available in 4.3.7.

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 11 Commit Notification 2015-01-20 13:45:28 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3-6":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=ec9603a1b3ffbdf82875bce7328712a786a8cc8d&h=libreoffice-4-3-6

fdo#88475 BrowseBox/grid: reposition data cursor to current row after paint

It will be available in 4.3.6.

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 12 Commit Notification 2015-01-20 13:57:52 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-0":

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

fdo#88475 BrowseBox/grid: reposition data cursor to current row after paint

It will be available in 4.4.0.

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 13 Commit Notification 2015-01-22 12:20:51 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=d7c9a1d9d65fe8b1a56c5c280d2ca6640a549d2f

fdo#88475 RowSetBase: reposition cache before interrogating it

It will be available in 4.5.0.

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 14 Commit Notification 2015-01-22 12:36:41 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=c6a02b40aa57bc63dc3a11b72f52dda80449843e

Revert "fdo#88475 BrowseBox/grid: reposition data cursor to current row after paint"

It will be available in 4.5.0.

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 15 Lionel Elie Mamane 2015-01-22 13:03:12 UTC
(In reply to Commit Notification from comment #14)
> Lionel Elie Mamane committed a patch related to this issue.
> It has been pushed to "master":
> 
> http://cgit.freedesktop.org/libreoffice/core/commit/
> ?id=c6a02b40aa57bc63dc3a11b72f52dda80449843e
> 
> Revert "fdo#88475 BrowseBox/grid: reposition data cursor to current row
> after paint"

Since I reverted the original fix (which was not the right fix), and committed another fix, 't would be nice if reporter  / QA / ... retested this in master, new enough snapshot to have new fix and have old fix reverted. Thanks.

Also be on the lookout for regressions in master that are not in 4.4.0/4.4.1 :)
Comment 16 Commit Notification 2015-01-22 20:03:26 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-4-0":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=89b9eb07c8b8b8abc728f3ed1e719ddd27898006&h=libreoffice-4-4-0

fdo#88475 RowSetBase: reposition cache before interrogating it

It will be available in 4.4.0.

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 Commit Notification 2015-01-22 22:55:18 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=5d47b83cef0b2d0486162989722b23e53eb0cdb1

fdo#88475 add UnitTest

It will be available in 4.5.0.

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 18 Alex Thurgood 2015-01-23 17:46:16 UTC
Confirming fixed in master
Version: 4.5.0.0.alpha0+
Build ID: a4f97070bdb6172c684ec175c3e6e2a550eb9630
Locale: fr_

Nice.
Comment 19 Commit Notification 2015-01-23 20:29:39 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-3":

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

fdo#88475 RowSetBase: reposition cache before interrogating it

It will be available in 4.3.7.

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 20 Commit Notification 2015-01-23 20:29:42 UTC
Lionel Elie Mamane committed a patch related to this issue.
It has been pushed to "libreoffice-4-4":

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

fdo#88475 RowSetBase: reposition cache before interrogating it

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.