https://bugs.freedesktop.org/show_bug.cgi?id=67254

          Priority: medium
            Bug ID: 67254
          Assignee: [email protected]
           Summary: Macros: Apostrophe (comment indicator) does not cancel
                    underscore (split line) at the end of the line
          Severity: normal
    Classification: Unclassified
                OS: Windows (All)
          Reporter: [email protected]
          Hardware: Other
        Whiteboard: BSA
            Status: UNCONFIRMED
           Version: 4.0.4.2 release
         Component: BASIC
           Product: LibreOffice

Problem description: 
When macro is executed, it is being executed line-by-line.
Line normally is fully executable or fully commented.

However, it is possible to include line such:
(note: this is actual line I got in .xls file):

 ActiveWindow.SelectedSheets.PrintOut Copies:=1 ', Collate:= _
End Sub

Now, after 'Copies:=1' the apostrophe means: "ignore the following text till
end_of_the_line.

The funny thing is that at the end of the line is an underscore, and actually
it is BEING INTERPRETED.

So in my situation:
 ...
 ActiveWindow.SelectedSheets.PrintOut Copies:=1 ', Collate:= _
End Sub

Sub Print_with_grey_background()
...


The following error pop-up appears:
basic syntax error : sub not allowed within a procedure

However, it is enough to duplicate 'End Sub', or delete underscore sign, and
everything is fine.


Steps to reproduce:
1. Description above should be enough
2. ....
3. ....

Current behavior:
When part of the line is commented out with single apostrophe sign, the
'underscore' sign at the end of the line is being parsed 'as designed'

Expected behavior:
When part of the line is commented out with single apostrophe sign, the
'underscore' sign at the end of the line should not be parsed

Operating System: Windows 7
Version: 4.0.4.2 release

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to