Bug 117266 - FILESAVE: xlsm- VBA broken by export - missing userforms (comment 18)
Summary: FILESAVE: xlsm- VBA broken by export - missing userforms (comment 18)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: BASIC (show other bugs)
Version:
(earliest affected)
4.0.0.3 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard: target:7.6.0
Keywords:
Depends on:
Blocks: XLSX Macro-VBA
  Show dependency treegraph
 
Reported: 2018-04-27 06:19 UTC by georg.weickelt
Modified: 2024-02-27 10:13 UTC (History)
8 users (show)

See Also:
Crash report or crash signature:


Attachments
excel- file with macros (forms) (50.56 KB, application/zip)
2018-04-27 06:20 UTC, georg.weickelt
Details
NachtragVBA.xlsm: password stripped from vbaproject.bin (54.23 KB, application/vnd.ms-excel.sheet.macroEnabled.12)
2023-01-21 16:05 UTC, Justin L
Details

Note You need to log in before you can comment on or make changes to this bug.
Description georg.weickelt 2018-04-27 06:19:28 UTC
Description:
After saving a file with embedded macros it is no longer working.




Steps to Reproduce:
1. open attached file, activate macros
2. klick the buttons (Typ I) - a form opens, you can choose a answer
3. save as with a new name1, as xlsm- file
4. save as with a new name2, als ods
5. open name1: Buttons are no longer visible
6. open name2: buttons visible, but after klick a basic- error pops up

Actual Results:  
Excel- macros not working after saving files

Expected Results:
buttons should be visible and working


Reproducible: Always


User Profile Reset: No


OpenGL enabled: Yes

Additional Info:
In Options/VBA "save original basic-code" is ticked


User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:59.0) Gecko/20100101 Firefox/59.0
Comment 1 georg.weickelt 2018-04-27 06:20:48 UTC
Created attachment 141667 [details]
excel- file with macros (forms)
Comment 2 raal 2018-04-28 15:25:58 UTC
I can confirm with Version: 6.1.0.0.alpha0+
Build ID: 930a3cbaeeaf6bca594f8651c4d5dffc1e5391d4
CPU threads: 4; OS: Linux 4.4; UI render: default; VCL: gtk3;
Comment 3 QA Administrators 2019-04-30 02:41:44 UTC Comment hidden (noise)
Comment 4 georg.weickelt 2019-05-02 08:56:25 UTC
Problem still exists.
Version: 6.2.3.2 (x64)
Build-ID: aecc05fe267cc68dde00352a451aa867b3b546ac
CPU-Threads: 8; BS: Windows 10.0; UI-Render: Standard; VCL: win; 
Gebietsschema: de-DE (de_DE); UI-Sprache: de-DE
Calc: CL
Comment 5 QA Administrators 2021-05-02 03:50:06 UTC Comment hidden (noise)
Comment 6 johnks 2021-05-04 14:00:42 UTC
yes. confirmed with my software. I downloaded the file, opened it, the buttons showed up and clicking them showed a blank window.
save.
close.
open again.

buttons are gone.


Version: 7.1.2.2 / LibreOffice Community
Build ID: 8a45595d069ef5570103caea1b71cc9d82b2aae4
CPU threads: 4; OS: Linux 5.4; UI render: default; VCL: gtk3
Locale: en-IN (en_IN); UI: en-US
Flatpak
Calc: threaded
Comment 7 Timur 2021-09-22 10:58:41 UTC
*** Bug 120374 has been marked as a duplicate of this bug. ***
Comment 8 Timur 2022-03-21 15:31:28 UTC Comment hidden (obsolete)
Comment 9 Timur 2022-03-21 15:31:43 UTC
*** Bug 146083 has been marked as a duplicate of this bug. ***
Comment 10 Justin L 2022-09-23 23:08:27 UTC
We have bug 124203 that focuses on the macro link being lost. Lets focus this one more on the lost buttons.
Comment 11 Justin L 2023-01-10 02:31:01 UTC
This has always been this way.

Import of these buttons didn't work until LO 4.0, somewhere in the 1-month range https://cgit.freedesktop.org/libreoffice/core/log/?qt=range&q=699e7d9e4081942bb0ad73e9be73f90a26d0c2f7..2a360b68475d6fff5b6618feddb0b52f3a4a2373

Most likely, the import started working with
author	Noel Power on 2012-05-30 14:31:40 +0100
commit dbb385df0fc83c36cfc91b82979fabea868592c2
    fix missing form control, partial fix for tdf#49430
Comment 12 Justin L 2023-01-10 02:48:26 UTC
Way back in LO 4.0, the exported file could not be really be imported by MS Excel. When LO 7.6 exports the file, MS Excel does import (unlabelled) buttons that are connected to macros (even though it isn't working properly).

So that suggests that export is partially OK, but import is completely broken.
Comment 13 Commit Notification 2023-01-14 15:47:27 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/73714e30d144a0d01bc2550ca7a6884a0a92af22

tdf#117266 sc oox: export vml button with a correct label

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 14 Commit Notification 2023-01-14 18:36:41 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/516a3382a774565d4708766ec796c54196563f5a

tdf#117266 sc oox: import local macro without reference id

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 15 Commit Notification 2023-01-15 02:09:13 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/d50eca2a30bdabdc1735c590d6ec1913c6dd22fd

tdf#117266 sc oox: export vml button with a correct name

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 16 Commit Notification 2023-01-15 04:15:23 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/5b92a7f211adb229a45c7dedf1ce63e15fcfe5d9

tdf#117266 sc oox: macro button unit test

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 17 Justin L 2023-01-21 15:59:04 UTC
The buttons are now functional. Tested round-tripped file in LO and Word 2010. (In Word the buttons are not properly sized or labelled, but they do make a VBA call.)
Comment 18 Justin L 2023-01-21 16:05:00 UTC
Created attachment 184822 [details]
NachtragVBA.xlsm: password stripped from vbaproject.bin

The VBA part is still completely broken however. Unfortunately it is view-locked by a password. I used hexedit to search for DPB= and replaced it with DPx=, which allowed the password to be bypassed.

So lets re-focus this bug report to be on the lost userforms during VBA round-trip.
Comment 19 Commit Notification 2023-01-24 02:10:50 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/245912dc42bfc13cbf0db3f04f2411f3dede9615

tdf#117266 tdf#120374 sc oox: export correct vml button name #2

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.