Bug 118224 - FILEOPEN XLSX Basic code to Enable Control does not work with Application.OnKey "^x" and Application.CellDragAndDrop
Summary: FILEOPEN XLSX Basic code to Enable Control does not work with Application.OnK...
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
6.0.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:xlsx
Depends on:
Blocks: Macro-VBA
  Show dependency treegraph
 
Reported: 2018-06-18 12:21 UTC by Gabor Kelemen (allotropia)
Modified: 2021-03-24 05:55 UTC (History)
3 users (show)

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


Attachments
Example file from Excel (20.75 KB, application/vnd.ms-excel.sheet.macroEnabled.12)
2018-06-18 12:21 UTC, Gabor Kelemen (allotropia)
Details
Example file saved by Calc 6.0 (16.12 KB, application/vnd.ms-excel.sheet.macroEnabled.12)
2018-06-18 12:28 UTC, Gabor Kelemen (allotropia)
Details
Error message upon file opening (196.74 KB, image/png)
2018-06-18 12:29 UTC, Gabor Kelemen (allotropia)
Details
Error message upon file closing (137.66 KB, image/png)
2018-06-18 12:29 UTC, Gabor Kelemen (allotropia)
Details
Screenshot of the problem (39.04 KB, image/png)
2018-06-18 12:38 UTC, Gabor Kelemen (allotropia)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gabor Kelemen (allotropia) 2018-06-18 12:21:51 UTC
Created attachment 142856 [details]
Example file from Excel

If we open the attached file (which contains a macro) with LibreOffice Calc we get an Error message: “BASIC runtime error. ‘51’ Internal Error”. The Enable Controls (Application.OnKey "^x" and the others) function does not work. When we close the file we get another Error message: “BASIC runtime error. ‘423’ CellDragAndDrop”.

Steps to reproduce:
1. Create a new spreadsheet with Microsoft Excel 2016/2013
2. Add a value to a cell.
3. Open the Visual Basic window
4. Create a new module and copy the basic code which is in the attached file.
5. Try to copy a cell or drag a cell and drop. (It will work well)
6. Save the file as *.XLSM
7. Open in LibreOffice Calc. (You will got an error message). Here is a code snippet:
Sub EnableControl(Id As Integer, Enabled As Boolean)
Dim CB As CommandBar
Dim C As CommandBarControl
On Error Resume Next
For Each CB In Application.CommandBars
    Set C = CB.FindControl(Id:=Id, recursive:=True)
    If Not C Is Nothing Then C.Enabled = Enabled
Next
End Sub

8. Try to copy a cell or drag a cell and drop. (It will work wrong)
9. Save as the file and open with Microsoft Excel.
10. Try to copy a cell or drag a cell and drop. (It will work well)

Actual results: We got two different error message (we should not) and the enable control function does not work well.

Expected results:
We should not get any error message and these simple enable controls should work well. 

Version: 5.4.3.2
Build ID: 92a7159f7e4af62137622921e809f8546db437e5
CPU threads: 4; OS: Windows 6.1; UI render: default; 
Locale: hu-HU (hu_HU); Calc: group

Version: 6.0.0.1.0+
Build ID: c678dc5309741097d9b0265f03dd279a8794d256
CPU threads: 4; OS: Windows 6.1; UI render: default; 
TinderBox: Win-x86@42, Branch:libreoffice-6-0, Time: 2017-12-28_04:21:33
Locale: hu-HU (hu_HU); Calc: group
Comment 1 Gabor Kelemen (allotropia) 2018-06-18 12:28:38 UTC
Created attachment 142857 [details]
Example file saved by Calc 6.0
Comment 2 Gabor Kelemen (allotropia) 2018-06-18 12:29:09 UTC
Created attachment 142858 [details]
Error message upon file opening
Comment 3 Gabor Kelemen (allotropia) 2018-06-18 12:29:36 UTC
Created attachment 142859 [details]
Error message upon file closing
Comment 4 Gabor Kelemen (allotropia) 2018-06-18 12:38:13 UTC
Created attachment 142860 [details]
Screenshot of the problem
Comment 5 Buovjaga 2018-06-24 17:56:34 UTC
Confirmed.

Arch Linux 64-bit
Version: 6.2.0.0.alpha0+
Build ID: 5b42a17dc99fba2ccf8dd8d0a8e0e4e836e30120
CPU threads: 8; OS: Linux 4.17; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group threaded
Built on June 22nd 2018

Arch Linux 64-bit
Version: 6.0.4.2
Build ID: 6.0.4-1
CPU threads: 8; OS: Linux 4.16; UI render: default; VCL: kde4; 
Locale: fi-FI (fi_FI.UTF-8); Calc: group
Comment 6 QA Administrators 2021-03-24 05:55:13 UTC
Dear Gabor Kelemen,

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

MassPing-UntouchedBug