Bug 147457 - Basic 'Me' keyword not implemented
Summary: Basic 'Me' keyword not implemented
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Whiteboard: QA:needsComment
Depends on:
Blocks: Macro-VBA 114263 Macro-StarBasic
  Show dependency treegraph
Reported: 2022-02-16 10:04 UTC by Alain Romedenne
Modified: 2022-03-03 03:41 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:

'Me' Basic keyword example of use (15.91 KB, application/vnd.oasis.opendocument.text)
2022-02-16 10:08 UTC, Alain Romedenne

Note You need to log in before you can comment on or make changes to this bug.
Description Alain Romedenne 2022-02-16 10:04:52 UTC
When scripting ClassModule Basic modules, one cannot use 'Me.' prefix in order to refer to ClassModule object current instance.

Steps to Reproduce:
A 'Me' keyword macro example is available in the attached file.

Actual Results:
'Me' is not supported as a keyword in Basic ClassModules.

Expected Results:
A background implicit assignment of 'Me' object instance variable should occur when instantiating 'New' objects with Basic.

New operator:

Let/Set statements:

Reproducible: Always

User Profile Reset: No

Additional Info:
This should be supported when using 'Option Compatible' or 'Option VBASupport 1' Basic compiler options.

VBA 'Me' keyword:

Note: It is possible to circumvent 'Me' lack of support, but this requires to hack around LibreOffice Basic. See the attached file for an example of such hack.
Comment 1 Alain Romedenne 2022-02-16 10:08:27 UTC
Created attachment 178301 [details]
'Me' Basic keyword example of use