[Libreoffice-bugs] [Bug 128263] New: Using trailing "_" with If statement breaks line positioning when debugging
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sun Oct 20 08:34:26 UTC 2019
https://bugs.documentfoundation.org/show_bug.cgi?id=128263
Bug ID: 128263
Summary: Using trailing "_" with If statement breaks line
positioning when debugging
Product: LibreOffice
Version: Inherited From OOo
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: medium
Component: BASIC
Assignee: libreoffice-bugs at lists.freedesktop.org
Reporter: mikekaganski at hotmail.com
In a new Basic module, replace all boilerplate with this code:
Function Foo()
If 0 Then print 1
If 0 Then _
print 1
If 0 Then _
print 1
End Function
Sub Bar
print "Bar"
End Sub
Note that all If statements there are using single-line syntax without EndIf,
and last two of them are written in two lines each, with "_" to break the line
into two.
Now try to put cursor into Bar, on the line with "print 1", and press F5 to run
it. Instead of executing it, it will open LibreOffice Basic Macros dialog, as
if you had put cursor outside of any macro.
The same result would be when you put cursor to the last line of Bar (with "End
Sub"), but Bar would run if you put cursor to "Sub Bar", *or to the line just
above*, or even *if you put cursor to the last line of Foo (with "End
Function")*! This shows that IDE treats lines incorrectly, shifting by 2 lines.
If you replace any of the two-lined Ifs into a single-lined If (to look like
the first If), then the shift will become 1 line; and replacing both 2-lined
Ifs with 1-lined variant makes it all OK.
Also the same problem is with putting breakpoints.
Tested with Version: 6.3.3.1 (x64)
Build ID: f41f4c7f9507aeca13cb9df51f34d80e8ba30a99
CPU threads: 12; OS: Windows 10.0; UI render: GL; VCL: win;
Locale: ru-RU (ru_RU); UI-Language: en-US
Calc: threaded
and also with OpenOffice.org 3.2.0 OOO320m12 (Build:9483) - in that old
version, only Main is run when you press F5, so the problem is only visible as
breakpoint displacement.
--
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/20191020/556962a6/attachment.html>
More information about the Libreoffice-bugs
mailing list