Download it now!
Bug 100846 - Macros Calc Execution
Summary: Macros Calc Execution
Status: RESOLVED DUPLICATE of bug 97193
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
(earliest affected) release
Hardware: x86 (IA32) Windows (All)
: medium normal
Assignee: Not Assigned
Depends on:
Reported: 2016-07-11 09:59 UTC by Enrique Fernandez
Modified: 2016-07-23 16:26 UTC (History)
2 users (show)

See Also:
Crash report or crash signature:

Calc File with macros (42.66 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-07-11 09:59 UTC, Enrique Fernandez
Explanation of error in the macro (51.24 KB, application/pdf)
2016-07-22 09:45 UTC, Enrique Fernandez

Note You need to log in before you can comment on or make changes to this bug.
Description Enrique Fernandez 2016-07-11 09:59:14 UTC
Created attachment 126159 [details]
Calc File with macros

After updating LibreOffice to 5.1 versión, the macros in Calc insert columns without the code in the macro.
Enclosed you have a spreadsheet where personal data have been deleted, and you can check how the macros work perfectly with version 5.0 and insert columns without the code with all versions 5.1. For example, you can try macro IPCPisoDag as simple.
Comment 1 Buovjaga 2016-07-18 11:40:50 UTC
I don't understand the problem. Please describe it so I can understand.

Change back to UNCONFIRMED after you have provided a more clear explanation.
Comment 2 Enrique Fernandez 2016-07-18 13:41:11 UTC
The spreadsheet sent have some macros which work perfectly in version 5.0 but when are executed them in version 5.1 they insert columns without the code for this command in the text as you can check in BASIC in the file
Between the macros you can try this: IPCPisoDag
When you execute this macro in version 5.0 doesn´t insert columns but in version 5.1 it does.
To see it better you can open the file I enclosed and select the sheet PISO DAGANZO and press the buttom Regularizar Renta wich has the macro asigned. In version 5.0 the macro doesn´t insert columns and in version 5.1 it does.
I am using the Spanish version of LibreOffice.
Sorry by incomplete explanation but my language is Spanish and I have difficulties with English.
Comment 3 Aron Budea 2016-07-22 09:17:24 UTC
Enrique, could you please provide a minimal example? What I mean is, remove the code apart from the lines that unexpectedly insert the column.

Now there are dialogs in Spanish, and a browser window is opened, and while I can see that a new column is somehow inserted during execution, the whole behavior is confusing.

Setting status to NEEDINFO, return to UNCONFIRMED once you provided the requested example. Thanks!
Comment 4 Enrique Fernandez 2016-07-22 09:45:23 UTC
Created attachment 126357 [details]
Explanation of error in the macro
Comment 5 Enrique Fernandez 2016-07-22 09:46:38 UTC
Enclosed you have pdf with the explanation of the macro.
Kind regards.
Comment 6 Aron Budea 2016-07-23 02:54:05 UTC
Thank you! Actually, this has been reported before as bug 97193. As a workaround, you can change parameter MoveMode to 6, which will work in 5.1 as 4 did in 5.0.

*** This bug has been marked as a duplicate of bug 97193 ***
Comment 7 Aron Budea 2016-07-23 02:55:02 UTC
To be precise, I meant parameter MoveMode of call .uno:InsertContents.
Comment 8 Enrique Fernandez 2016-07-23 14:29:27 UTC
If I have understood well, I must change all my macros as you say in comments 6 and 7 to resolve the problem because versions from 5.1 won't work with MoveMode 4. Is it right?
Thanks in advance.
Comment 9 Aron Budea 2016-07-23 16:26:57 UTC
I wouldn't say it doesn't work, it just means something else currently, because of the change described in this comment:

MoveMode 4 in 5.0 = MoveMode 6 in 5.1 (INS_NONE in enum InsCellCmd).

*** This bug has been marked as a duplicate of bug 97193 ***