Bug 91175 - macro GoRight for calc jumps over hidden columns
Summary: macro GoRight for calc jumps over hidden columns
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.4.2.2 release
Hardware: x86 (IA32) All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-08 18:34 UTC by S.Andreason
Modified: 2015-08-20 03:43 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 S.Andreason 2015-05-08 18:34:45 UTC
A macro that was written long ago, and works correctly in 3.6 and 4.0, no longer works correctly on a spreadsheet with columns hidden.
The BASIC command

 dispatcher.executeDispatch(document, ".uno:GoRight", "", 0, args2())

in a counting loop, now skips over hidden columns, which can have drastic consequences when it selects the wrong cells to act upon.
In my case, counting 52 columns to select by moving right, now highlights A:BS instead of A:BA

I'm running:
Version: 4.4.2.2
Build ID: c4c7d32d0d49397cad38d62472b0bc8acff48dd6
Locale: C_
Linux x86

Existing attachment demonstrates this bug:
https://bugs.documentfoundation.org/attachment.cgi?id=115459
Comment 1 Buovjaga 2015-05-15 13:48:02 UTC
Reproduced.

If I first selected everything and right-clicked a column - show, BA:BS did not get an empty row of cells.

Win 7 Pro 64-bit, Version: 4.4.3.2
Build ID: 88805f81e9fe61362df02b9941de8e38a9b5fd16
Locale: fi_FI
Comment 2 Matthew Francis 2015-08-20 03:43:18 UTC
This is caused by

commit 93d22efb334ad85fd02deb83ec1baf538cf0cba3
Author: Markus Mohrhard <markus.mohrhard@googlemail.com>
Date:   Fri Sep 27 17:28:47 2013 +0200

    ignore hidden row/columns when navigating, fdo#45020
    
    Change-Id: I597d7dbef07479f66894c7fce5ee21f340b43120


The problem here is that you're calling the desktop commands which are executed for keyboard actions and expecting them not to ignore hidden columns (which correctly should be ignored when navigating using the keyboard)

Instead of this, you should use the API to manipulate cell data by explicit cell / range names