How does gotoOffset work in LO Basic/Calc? [closed]

asked 2014-03-04 16:49:53 +0200

kumiponi gravatar image

updated 2015-09-11 21:46:33 +0200

Alex Kemp gravatar image

Hi, I'm not sure if this is a bug so I'll ask here first. Sample code:

Sub PrintCursorLocation (cursor As Object)
    print cursor.getRangeAddress.StartColumn & ", " & cursor.getRangeAddress.StartRow
End Sub

Sub CursorTest
    Dim cursor As Object
    cursor = ThisComponent.CurrentController.ActiveSheet.createCursor()
    cursor.gotoOffset(2, 2)
End Sub

GotoOffset doesn't seem to be doing anything. There is no error message either. According to the Open Office developer manual, it should move the cursor to the expected cell (C3 in this case) relative to it's current location. GotoNext and others do move it. Am I doing something wrong?

I'm using LibreOffice release version on Windows Vista.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by Alex Kemp
close date 2016-02-19 17:10:50.884659


Did anyone ever find a solution to this?? I'm having the same issue

Using LO Basic on Windows 8

macroman gravatar imagemacroman ( 2015-12-04 01:43:21 +0200 )edit

it works if you call cursor.gotoStart() right after createcursor().

librebel gravatar imagelibrebel ( 2017-09-03 12:12:32 +0200 )edit