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

--- Comment #4 from Andreas Säger <ville...@t-online.de> ---
Indeed, the file contains a list of unused event hooks, corresponding to the
events in Tools>Customize, tab:Events. But none of the hooks is linked to any
macro and the macro does not contain any macro code at all.

This is how the office suite behaves since 19 years:

A brand new document (not from template) contains this empty tag:
<office:scripts/>
If I embed any Basic/Python/JavaScript macro within that document, this tag
does not change but I get a macro warning because there actually is a code
module embedded in this document.
---------------------------------
A document automatically calling some macro in the global scope contains this
entry:
<office:scripts>
<office:event-listeners>
<script:event-listener script:language="ooo:script"
script:event-name="office:start-app"
xlink:href="vnd.sun.star.script:Calc.Module2.InsertDateTime?language=Basic&location=application"
xlink:type="simple"/>
</office:event-listeners>
</office:scripts>
This does not trigger any macro warning because there is still no code in the
document. The above entry silently calls some installed macro under "My Macros"
or under "LibreOffice Macros" (&location=application)

LO 6.4 raises the macro warning because of this event hook pointing to an
already installed module which is not embedded in the document.
---------------------------------------
The following entry calls a macro that is embedded within the document
(&location=document). But only if the macro is actually there.
<office:scripts>
<office:event-listeners>
<script:event-listener script:language="ooo:script"
script:event-name="office:start-app"
xlink:href="vnd.sun.star.script:Standard.Module1.Main?language=Basic&location=document"
xlink:type="simple"/>
</office:event-listeners>
</office:scripts>
If I remove the code, this entry is still there and the assignment is still
visible under Tools>Customize but it does not raise any macro warning because
there is no macro embedded in the document. If I enable embedded macros for
this document, I get another warning about macro Standard.Module1.Main not
being found in this document.

LO 6.4 raises the macro warning because of this event hook pointing to a
non-existing embedded module.
---------------------------------------

The mere existance of an event hook should not raise any macro warning as long
as no code is embedded in the document, particularly if the hook is not linked
to any code. In my template all these entries do not point to any code embedded
or not.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to