Bug 166686 - Add "Assign Macro" to Draw
Summary: Add "Assign Macro" to Draw
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
25.2.2.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Form-Controls
  Show dependency treegraph
 
Reported: 2025-05-22 09:30 UTC by TURBAN
Modified: 2025-05-26 08:35 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description TURBAN 2025-05-22 09:30:26 UTC
Description:
"La commande Interaction... est visible mais grisée dans Draw (et même parfois dans Impress selon les cas), alors qu’elle fonctionne pour les présentations. Y a-t-il une raison technique, ou est-ce une limitation qui pourrait évoluer ? Ce serait très utile notamment pour créer des interfaces plus riches dans Base via Draw."

Actual Results:
gris

Expected Results:
xxxx


Reproducible: Always


User Profile Reset: No

Additional Info:
possible dans BASE
Comment 1 V Stuart Foote 2025-05-22 18:27:30 UTC
Not seeing too much need for this. Hyperlinks can already be inserted to sd ODG canvas. And I think we still have the old style imagemap tools available.

Not clear of the use case where the Interactive... dialog becomes useful in a multipage Draw document.
Comment 2 V Stuart Foote 2025-05-22 18:55:32 UTC
The Interaction dialog events are all targeted on a shape by a mouse click as taken from the drop list of actions that can be performed.

Bug 105526 had requested 'mouse over'/'hover' in addition to 'mouse click' triggers for use in Impress presentations. That was a WF as use case could be handled via macros for use in the Presentation.

Still not clear to me how the interactive controls become useful to a Draw edit/view session. Only if the interactions had use with an exported/save-as output.
Comment 3 V Stuart Foote 2025-05-22 19:09:45 UTC
(In reply to V Stuart Foote from comment #2)
> ...all targeted "on a shape" by a mouse click

actually targeted "on a sd draw object" by a mouse click. 

Not just sd shape objects. Can interact in Impress (Format -> Interaction... menu) with any selected sd object, ie. an sd textbox or sd FontWork.
Comment 4 Regina Henschel 2025-05-22 19:17:21 UTC
But there is still bug 156159, thus it might look to the user as if hyperlinks do not work. And bug 88918 is neither fixed.

TURBAN, is there a use case that cannot be solved with hyperlink, media and OLE-object? Impress needs a special "Interaction" tool because it has to work during presentation mode. Draw has no presentation mode.
Comment 5 Heiko Tietze 2025-05-23 07:12:10 UTC
Pardon my French but what command are we talking about exactly?
Comment 6 V Stuart Foote 2025-05-23 08:30:45 UTC
(In reply to Heiko Tietze from comment #5)
> Pardon my French but what command are we talking about exactly?

Currently sd Impress only. With an sd object selected on a slide--main menu Format -> Interaction... dialog.  Provides a drop list of actions to perform on mouse click on the object during a presentation.
Comment 7 TURBAN 2025-05-23 08:37:33 UTC
Bonjour, Merci à tous de vos réponses.
SVP pouvez vous apportez une modification sur les boutons autres que les boutons rectangulaires ou carrés   >> par exple rond, losange,triangle ou toute autres forme dans base ou autres
Comment 8 TURBAN 2025-05-23 08:39:10 UTC
Merci A tous et félicitations pour LO 
Dominique TURBAN
Comment 9 Heiko Tietze 2025-05-23 08:49:10 UTC
TURBAN, please provide a use case. Why do you need the interaction in Draw? And please translate to English.
Comment 10 TURBAN 2025-05-23 09:07:38 UTC
Hello,
 I needed to make round diamond triangle buttons and attach them to a macro for "LO base"
Comment 11 TURBAN 2025-05-23 09:11:15 UTC
(In reply to Heiko Tietze from comment #9)
> TURBAN, please provide a use case. Why do you need the interaction in Draw?
> And please translate to English.


Hello,
 I needed to make round diamond triangle buttons and attach them to a macro for "LO base"
Comment 12 V Stuart Foote 2025-05-23 17:21:09 UTC
(In reply to TURBAN from comment #11)
> (In reply to Heiko Tietze from comment #9)
> > TURBAN, please provide a use case. Why do you need the interaction in Draw?
> > And please translate to English.
> 
> 
> Hello,
>  I needed to make round diamond triangle buttons and attach them to a macro
> for "LO base"

Hmm, if I translate comment 7:
"Hello, Thank you all for your replies.
Please, could you make a change to buttons other than rectangular or square buttons? For example, round, diamond, triangle, or any other shape in the base or other." (as gloss from Google translate).

So I can not determine if the request actually is for assigning actions to a sd Draw object? And use while in Draw.

But I suspect the request is really to establish 'Form controls' against button formats other than rectangular?  And use Draw to design the button layout?

If the later, can confirm that Form controls are laid out as rectangles only, and at present require use of 'Control Properties...' dialog to assign a graphic (e.g. PNG or BMP) as an overlay for some other shape.  With no means to use other than rectangular buttons.
Comment 13 Regina Henschel 2025-05-23 19:31:48 UTC
(In reply to TURBAN from comment #11)
> Hello,
>  I needed to make round diamond triangle buttons and attach them to a macro
> for "LO base".

That is a valid use case. But I would not compare it with "Interaction" for presentation. The requested feature is available in Calc. It is neither available in Writer nor Draw.

A shape in Calc has the UI option "Assign Macro". That UI item performs command "uno:AssignMarcro". It generates an element <office:event-listeners> (10.3.19, ODF 1.3) with child element <script:event-listener> (14.5.2, ODF 13) in file markup. That is the same markup as for the Interaction "Run macro" in Impress. 

The needed element <office:event-listeners> is not only available for form objects but for all other kinds of shapes as well. So ODF already provides such feature, but LibreOffice has it not implemented for Writer and Draw, but only for Calc.

My take, implement the feature "Assign Macro" in Draw and Writer.
Comment 14 Heiko Tietze 2025-05-26 08:35:50 UTC
"Assign Macro..." (.uno:AssignMacro) is not the same as "Interaction" (.uno:AnimationEffects)- but the interaction dialog has an item "Run macro". It should be not be a big deal to add this to Draw as well.

Updating the summary since the other 'interactions' do not apply in Draw.

(In reply to Regina Henschel from comment #13)
> My take, implement the feature "Assign Macro" in Draw and Writer.
I don't see the use case for Writer, though. Please file another ticket with a scenario where draw objects in a text document should have a certain behavior that cannot be accomplished by other means.