[Libreoffice-bugs] [Bug 131990] New: Macros: thisComponent.getCurrentController.getViewCursor.goUp() never returns false
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Wed Apr 8 22:49:35 UTC 2020
https://bugs.documentfoundation.org/show_bug.cgi?id=131990
Bug ID: 131990
Summary: Macros:
thisComponent.getCurrentController.getViewCursor.goUp(
) never returns false
Product: LibreOffice
Version: 7.0.0.0.alpha0+ Master
Hardware: x86-64 (AMD64)
OS: Linux (All)
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: Writer
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: tomaspartl at centrum.cz
Description:
When writing macros in LO Basic, the method
thisComponent.getCurrentController.getViewCursor.goUp() used to return false
when it reached the top of the document.
Now it always returns true, which makes it impossible to use its return value
to detect when you get to the start of the document.
In effect, it breaks macros that used to work in LO 6.4.
Steps to Reproduce:
1. open the attached file with macros enabled
2. go to the macro editor and run the main macro
3. watch what happens
Actual Results:
the loop never ends
Expected Results:
the loop should end once the cursor gets to the top of the document
Reproducible: Always
User Profile Reset: Yes
Additional Info:
The macro in the attachment looks like this:
Sub Main
Dim canMove
Dim oCurs
Dim oDoc
oDoc = ThisComponent
oCur = oDoc.getCurrentController.getViewCursor()
canMove = oCur.goUp(1,false)
While canMove
canMove = oCur.goUp(1,false)
Wend
End Sub
--
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20200408/f2f4b313/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list