Bug 90580 - Cannot delete "VBA context"
Summary: Cannot delete "VBA context"
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: Other All
: medium minor
Assignee: Not Assigned
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
Reported: 2015-04-12 19:39 UTC by Andreas Säger
Modified: 2021-04-21 03:52 UTC (History)
5 users (show)

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

ODF spreadsheet with working StarBasic macro. (27.69 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-04-12 19:39 UTC, Andreas Säger
ODF spreadsheet with failing StarBasic code in VBA context (28.67 KB, application/x-vnd.oasis.opendocument.spreadsheet)
2015-04-12 19:41 UTC, Andreas Säger

Note You need to log in before you can comment on or make changes to this bug.
Description Andreas Säger 2015-04-12 19:39:41 UTC
Created attachment 114749 [details]
ODF spreadsheet with working StarBasic macro.

When a document used to be a Microsoft document with macros in a former life, all Basic macros are stored as VBA macros with the respective warning on top and with the useless hierarchy of class modules etc.

1. There seems to be no way to get rid of this annoying "VBA context".
2. Deleting all Basic code (to get rid of security warnings) is possible with AOO but not with LO.
3. I wrote valid StarBasic code which fails to do its job properly in VBA context.

> https://forum.openoffice.org/en/forum/viewtopic.php?f=101&t=76503

I'll attach 2 macro spreadsheets. One with failing VBA code and a newly created with copied content and code which works.
Comment 1 Andreas Säger 2015-04-12 19:41:58 UTC
Created attachment 114750 [details]
ODF spreadsheet with failing StarBasic code in VBA context
Comment 2 raal 2015-04-13 17:42:28 UTC
Build ID: b024e36ddb3b53163d7a01f6f7b5aadb7a858cd9
TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2015-03-31_09:12:20

I can confirm 1. and 2. At point 2 I didn't tested AOO.

point 3 / both buttons do the same in both files on my LO. How do I recognize error "fails to do its job properly in VBA context."? Thank you
Comment 3 Andreas Säger 2015-04-13 18:59:14 UTC
I'm baffled. Yesterday when I created the StarBasic variant, I used nothing but LibreOffice and the macro worked as intended.

So the failing macro might be another issue.
Comment 4 Andreas Säger 2015-04-13 19:12:28 UTC
OK, I opened the VBA version and created a new document from scratch:

-- Copy the sheets to a new document
-- Create a library LibFilter and copy the modules into this library.
-- Create a database range "List" and a named range Todays_Weekday pointing to Criteria.A1:A2
-- The filter macro works as intended
-- The filter macro fails after reloading the new document
Comment 5 raal 2015-04-13 19:45:10 UTC
Thank you, but point 3 is basically another issue, isn't it?
Point 1 and two are about deleting in structure of macro. Point 2, the warning,  is probably because the rest of macro structure exist and LO checks it on start (if I remember correctly such bug exist, but I can not find it - when exist empty macro structure, Lo trigger warning)

Setting to new for point 1 and 2. Please for point 3 create new bug if it's another issue. Thank you
Comment 6 Andreas Säger 2015-04-13 22:31:26 UTC
Filed issue https://bugs.documentfoundation.org/show_bug.cgi?id=90500
Comment 7 Andreas Säger 2015-04-13 22:32:12 UTC
Sorry for the typo- it is https://bugs.documentfoundation.org/show_bug.cgi?id=90600
Comment 8 QA Administrators 2016-09-20 10:13:59 UTC Comment hidden (obsolete)
Comment 9 Andreas Säger 2016-09-20 10:30:45 UTC
Still the same bug in 5.1.4
Comment 10 Xisco Faulí 2016-09-20 11:56:15 UTC
Adding keyword 'bibisectRequest'
Comment 11 Xisco Faulí 2017-09-29 08:49:44 UTC Comment hidden (obsolete)
Comment 12 Buovjaga 2018-05-25 10:59:54 UTC
I confirm the stuff under Standard cannot be deleted in the Organizer. However, I don't see this that is mentioned in the forum topic "On top of each module the editor show a yellow warning "You are editing a VBA macro. Changes can only be saved in Open Document Format.""

Moreover, in the forum topic another user says "Conclusion: both Apache OpenOffice and LibreOffice lack a means to really delete indications of VBA. This has no consequence in Apache OpenOffice, but it complexifies the usage of LibreOffice."

Thus, what exactly is the regression here?
Comment 13 Buovjaga 2018-07-11 13:14:12 UTC
No reply, removing keywords and setting version to inherited.
Comment 14 Andreas Säger 2019-04-21 17:14:09 UTC
OK, this issue is about a macro which fails to apply a filter to a database range.
The issue with VBA context is #90600
Comment 15 Andreas Säger 2019-04-21 17:42:00 UTC
(In reply to Andreas Säger from comment #14)
> OK, this issue is about a macro which fails to apply a filter to a database
> range.
> The issue with VBA context is #90600

Forget my above comment. This one is about VBA context and 90600 is about the failing StarBasic macro.

I agree to close this one. The extra hierarchy level is somewhat annoying but it seems to be harmless as far as I can see.
Comment 16 Buovjaga 2019-04-21 17:56:10 UTC
(In reply to Andreas Säger from comment #15)
> I agree to close this one. The extra hierarchy level is somewhat annoying
> but it seems to be harmless as far as I can see.

I think we should keep this open. An annoyance is an annoyance.
Comment 17 QA Administrators 2021-04-21 03:52:20 UTC
Dear Andreas Säger,

To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year.

There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present.

If you have time, please do the following:

Test to see if the bug is still present with the latest version of LibreOffice from https://www.libreoffice.org/download/

If the bug is present, please leave a comment that includes the information from Help - About LibreOffice.
If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a comment that includes the information from Help - About LibreOffice.

Please DO NOT

Update the version field
Reply via email (please reply directly on the bug tracker)
Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not 
appropriate in this case)

If you want to do more to help you can test to see if your issue is a REGRESSION. To do so:
1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) from https://downloadarchive.documentfoundation.org/libreoffice/old/

2. Test your bug
3. Leave a comment with your results.
4a. If the bug was present with 3.3 - set version to 'inherited from OOo';
4b. If the bug was not present in 3.3 - add 'regression' to keyword

Feel free to come ask questions or to say hello in our QA chat: https://kiwiirc.com/nextclient/irc.freenode.net/#libreoffice-qa

Thank you for helping us make LibreOffice even better for everyone!

Warm Regards,
QA Team