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@lists.freedesktop.org
          Reporter: tomaspa...@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.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to