<html>
<head>
<base href="https://bugs.documentfoundation.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_UNCONFIRMED "
title="UNCONFIRMED - Macros: thisComponent.getCurrentController.getViewCursor.goUp() never returns false"
href="https://bugs.documentfoundation.org/show_bug.cgi?id=131990">131990</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Macros: thisComponent.getCurrentController.getViewCursor.goUp() never returns false
</td>
</tr>
<tr>
<th>Product</th>
<td>LibreOffice
</td>
</tr>
<tr>
<th>Version</th>
<td>7.0.0.0.alpha0+ Master
</td>
</tr>
<tr>
<th>Hardware</th>
<td>x86-64 (AMD64)
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux (All)
</td>
</tr>
<tr>
<th>Status</th>
<td>UNCONFIRMED
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>medium
</td>
</tr>
<tr>
<th>Component</th>
<td>Writer
</td>
</tr>
<tr>
<th>Assignee</th>
<td>libreoffice-bugs@lists.freedesktop.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>tomaspartl@centrum.cz
</td>
</tr></table>
<p>
<div>
<pre>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</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>