https://bugs.documentfoundation.org/show_bug.cgi?id=172748

Neil Roberts <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[email protected]

--- Comment #4 from Neil Roberts <[email protected]> ---
(In reply to Dmitry.Kulikov from comment #3)

> As for saving macros, I consider this a genuine bug involving content loss,
> and the target format is irrelevant. Macros are lost in the LibreOffice ->
> xlsm -> LibreOffice cycle; Excel plays no role. The user saves their file,
> opens it again in LibreOffice, and the macro code is gone. I believe this is
> data loss within the product itself, regardless of whether someone opens the
> file in Excel. The goal of my patch is to protect user data, and the warning
> is too general.

I think it’s inevitable that there will be data loss when saving in an
non-native format, which is why LibreOffice warns about it. Even with the patch
there will still be a kind of data loss because saving in xlsm will force
VBA-compatibility mode. This can change the behaviour of the script so the user
will still not have the same macro they had before they saved the document.

Perhaps you could explain the intended use case for saving in xlsm? If the user
wants to give the document to someone using another piece of software then the
patch won’t help because the macro will be written against LibreOffice’s
dialect of BASIC so it won’t run. Otherwise if they are giving it to another
LibreOffice user then why wouldn’t they save it directly in ODT?

> As for saving macros in VBA-compatible mode, I don't think they interfere
> with each other; they complement each other rather than being alternatives.
> My patch fixes the immediate data loss, and VBA-compatible macros in a new
> document is a separate, useful improvement; I'm willing to file a separate
> bug for it. But this new fix alone will not fix the loss of macros when
> saving in a non-VBA-compatible mode.

I think providing a way to create VBA macros from scratch would fix the issue
in this bug of the behaviour being inconsistent. Then it is simple, VBA macros
are saved when using a document format where only VBA macros are usable, and
all other macros are discarded. If the user wants make a document that will be
usable in Microsoft Office then they have the option to create VBA macros.
Otherwise they save in the native LibreOffice format.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to