Bug 130925 - Problem scrolling past lines 999 & 1000 in the LibreOffice Calc Macro editor, in either direction if View - Line Numbers enabled
Summary: Problem scrolling past lines 999 & 1000 in the LibreOffice Calc Macro editor,...
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.1 all versions
Hardware: All All
: medium normal
Assignee: Caolán McNamara
URL:
Whiteboard: target:7.0.0 target:6.4.2
Keywords:
: 116743 121444 (view as bug list)
Depends on:
Blocks:
 
Reported: 2020-02-25 11:10 UTC by Philip Russell
Modified: 2020-02-26 17:25 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
sample file (14.08 KB, application/vnd.oasis.opendocument.text)
2020-02-25 12:34 UTC, Xisco Faulí
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Philip Russell 2020-02-25 11:10:33 UTC
Description:
In the LibreOffice Calc Macro Editor when trying to scroll down past lines 999 & 1000, using the scroll bar or mouse wheel, the display jumps back to some lines before line 1,000. The problem also occurs when scrolling the code in the other direction. I get around this by clicking into the code and use the pgdn & pgup keys as appropriate. Or by clicking into the code on the other side of line 999 and continuing the scroll. You can force it way beyond line 999 by dragging the "lift" on the scroll bar but if you resume paging without clicking into the code 
the display will revert back to somewhere where you started.

Steps to Reproduce:
1. Just try scrolling past line 999 multiple times. For me, it does not work by scrolling alone. I have to either click into the code (giving it focus I suppose) of select s sub/function on the otherside via the Object Catalog.
2.
3.

Actual Results:
Scrolling by mouse wheel or scroll bar is unreliable when working around line 999.

Expected Results:
Scrolling should work by mouse wheel or scroll bar


Reproducible: Always


User Profile Reset: Yes



Additional Info:
The fact that the right hand line bordering the line number has to change may be associated with the error. the change from line 99 to 100 is no problem and the bordering lines do not change there.
Comment 1 Xisco Faulí 2020-02-25 12:18:34 UTC
I can reproduce it in

Version: 7.0.0.0.alpha0+
Build ID: e6b9bc3f2ecf0fb7fde5b02f9d750ccbe022f4c1
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: x11; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

after some time scrolling, the view goes back to the original position
Comment 2 Xisco Faulí 2020-02-25 12:33:53 UTC
I can also reproduce it in

Version: 6.0.0.0.alpha1+
Build ID: 6eeac3539ea4cac32d126c5e24141f262eb5a4d9
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: x11; 
Locale: en-US (en_US.UTF-8); Calc: group threaded
Comment 3 Xisco Faulí 2020-02-25 12:34:07 UTC
Created attachment 158179 [details]
sample file
Comment 4 Xisco Faulí 2020-02-25 12:35:23 UTC
Steps to reproduce:
1. Open attached document
2. Edit the macro
3. Go to the bottom of the macro
4. scroll up. Around line 1000 the view goes back to the bottom
Comment 5 Xisco Faulí 2020-02-25 12:37:54 UTC
Same if scrolling down from line 1 to line 1000.
I think the problem is with the line numbers. it breaks when it adds/removes one more digit ( 999 to 1000 )
Comment 6 Xisco Faulí 2020-02-25 12:40:12 UTC
Also reproduced in

Version: 5.2.0.0.alpha0+
Build ID: 3ca42d8d51174010d5e8a32b96e9b4c0b3730a53
Threads 4; Ver: 4.19; Render: default;
Comment 7 Xisco Faulí 2020-02-25 12:41:21 UTC
Also reproduced in

Version 4.1.0.0.alpha0+ (Build ID: efca6f15609322f62a35619619a6d5fe5c9bd5a)
Comment 8 Xisco Faulí 2020-02-25 13:15:04 UTC
@Caolán, I thought you might be interested in this issue...
Comment 9 Caolán McNamara 2020-02-25 15:57:57 UTC
if we took the max line number of the full document, and not the max line number of the currently rendered range, the issue wouldn't arise, so I'll try that
Comment 10 Xisco Faulí 2020-02-25 16:20:42 UTC
*** Bug 121444 has been marked as a duplicate of this bug. ***
Comment 11 Xisco Faulí 2020-02-25 16:21:04 UTC
*** Bug 116743 has been marked as a duplicate of this bug. ***
Comment 12 Commit Notification 2020-02-26 08:52:17 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ca79c018f1e8bd0e1f42e3cef4b4f5893ef2e47f

tdf#130925 use the maximum document line number for the width calculation

It will be available in 7.0.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 13 Caolán McNamara 2020-02-26 09:01:25 UTC
I imagine that solves it, though testing appreciated
Comment 14 Xisco Faulí 2020-02-26 11:52:41 UTC
Verified in

Version: 7.0.0.0.alpha0+
Build ID: c8d764b3f27c2bb0712745891b70630e94436317
CPU threads: 4; OS: Linux 4.19; UI render: default; VCL: gtk3; 
Locale: en-US (en_US.UTF-8); UI-Language: en-US
Calc: threaded

@Caolán, thanks for fixing this issue!
Comment 15 Commit Notification 2020-02-26 17:25:09 UTC
Caolán McNamara committed a patch related to this issue.
It has been pushed to "libreoffice-6-4":

https://git.libreoffice.org/core/commit/c3143b5db45ca84267a4bc9c897fb4077e33d128

tdf#130925 use the maximum document line number for the width calculation

It will be available in 6.4.2.

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.