Bug 125338 - Saving DOC(M) as DOCX doesn't get rid of macro
Summary: Saving DOC(M) as DOCX doesn't get rid of macro
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: filters and storage (show other bugs)
Version:
(earliest affected)
5.4 all versions
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: filter:docx, implementationError
: 129216 (view as bug list)
Depends on:
Blocks: DOCX-Corrupted Macro-VBA
  Show dependency treegraph
 
Reported: 2019-05-17 12:20 UTC by Aron Budea
Modified: 2019-12-06 02:02 UTC (History)
4 users (show)

See Also:
Crash report or crash signature:


Attachments
Sample DOC w macro (33.50 KB, application/msword)
2019-12-06 01:58 UTC, Aron Budea
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Aron Budea 2019-05-17 12:20:42 UTC
After the fix of bug 108269 the macros in DOCM files are roundtripped.
However, when saving a DOCM as DOCX, the macros should be removed, which does not happen currently.

Eg. after saving attachment 133753 [details] (a DOCM with a macro) as DOCX and reloading it, the usual macro dialog will show. Word fails to open such a DOCX.

Observed using LO 6.3.0.0.alpha0+ (d6e8e41c22023bc15cc4c9659b33c1cc3d6edb75), 5.4.0.3 / Windows 7.
Versions before 5.4 would be fine, because macros got discarded during save.
Comment 1 Aron Budea 2019-05-17 12:23:01 UTC
Btw, saving the file as ODT, then reloading and saving it as DOCX is a workaround.
Comment 2 raal 2019-05-20 16:13:11 UTC
Confirm with Version: 6.3.0.0.alpha0+
Build ID: 630db80d17616d635cf2e5f1d5a0852428b794a3
CPU threads: 4; OS: Linux 4.15; UI render: default; VCL: x11;
Comment 4 himajin100000 2019-09-07 09:42:45 UTC
oops,the last line was a typo.

https://opengrok.libreoffice.org/xref/core/sc/source/filter/excel/xestream.cxx?r=09cd0e36#1082
Comment 5 Aron Budea 2019-12-06 01:58:41 UTC
Created attachment 156343 [details]
Sample DOC w macro

Same thing happens if the source is a DOC with macro. Attaching attachment 133753 [details] converted to DOC in Word as a sample for that.
When converted to DOCX in LO, the macro persists.
Comment 6 Aron Budea 2019-12-06 02:02:20 UTC
*** Bug 129216 has been marked as a duplicate of this bug. ***