Bug 46889

Summary: imported vba fails if unmatched Sub Foo or End Sub statements exist
Product: LibreOffice Reporter: Noel Power <nopower>
Component: BASICAssignee: Noel Power <nopower>
Status: RESOLVED FIXED    
Severity: normal    
Priority: medium    
Version: 3.5.0 release   
Hardware: Other   
OS: All   
Whiteboard: target:3.6.0 target:3.5.4
Crash report or crash signature: Regression By:
Attachments: a test document with some examples

Description Noel Power 2012-03-02 04:50:06 UTC
Created attachment 57916 [details]
a test document with some examples

MSO VBA can contain unmatched Sub or End Sub statements, these don't cause a clever compiler any problems if those procedures involved are never referenced or called. Unfortunately the Libreoffice basic compiler is quite dumb and it falls over any imported vba containing such strays.
Comment 1 Noel Power 2012-03-02 05:07:58 UTC
fixed
Comment 2 Not Assigned 2012-03-02 05:12:30 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=24b402d67eb9acc7ff1f0afeee7237f6b3b14644

weed out unmatched Sub/End Sub statements when importing VBA fdo#46889
Comment 3 Not Assigned 2012-05-11 08:50:18 UTC
Noel Power committed a patch related to this issue.
It has been pushed to "libreoffice-3-5":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=2edf8cba49e8ba72fa7b0e02d24a38cab45c697c&g=libreoffice-3-5

weed out unmatched Sub/End Sub statements when importing VBA fdo#46889


It will be available in LibreOffice 3.5.4.