Onmouseover: How was it done? How to get the source?

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
linuxyz
Posts: 10
Joined: Sat Mar 03, 2018 10:53 am

Onmouseover: How was it done? How to get the source?

Post by linuxyz »

Hi all! ;)

In this old thread (viewtopic.php?uid=49494&f=45&t=47888&start=0), @F3K Total managed to use the "onmouseover" function inside the macro apparently (see the file attached).

I don't see how he did this... :?:

And last question, is it possible to eventually get the source of the hyperlink, as he was asking? (Maybe we can get now that since the thread dates back from 2012)

Thanks a lot for your help! ;)
Attachments
Hyperlink_OnMouseOverEN.odt
(12.53 KiB) Downloaded 175 times
openoffice 4.1.14 on Arch Linux (Cinnamon desktop)
UnklDonald418
Volunteer
Posts: 1546
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Onmouseover: How was it done? How to get the source?

Post by UnklDonald418 »

I don't see how he did this
Right click on the word hyperlink in the first line.
Select Edit Hyperlink... to open the Hyperlink dialog.
In the Further settings area select the Folder icon to the right of Form: Text to open the Assign macro dialog.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
linuxyz
Posts: 10
Joined: Sat Mar 03, 2018 10:53 am

Re: Onmouseover: How was it done? How to get the source?

Post by linuxyz »

Thanks a lot! It's perfect :D
Do you have any idea for the second part of the question (how to get the source)?
openoffice 4.1.14 on Arch Linux (Cinnamon desktop)
UnklDonald418
Volunteer
Posts: 1546
Joined: Wed Jun 24, 2015 12:56 am
Location: Colorado, USA

Re: Onmouseover: How was it done? How to get the source?

Post by UnklDonald418 »

I tried to capture the event with

Code: Select all

Sub MyMacro(oEvent as object)
but a run time exception "wrong number of parameters" is generated, so the event object is not being passed along like usual.
Using the MRI tool I inspected

Code: Select all

ThisComponent.CurrentController.ViewCursor.HyperLinkURL
but it retrieves a Null string and

Code: Select all

ThisComponent.Links.getByName("Bookmarks").getByName("bookmark")
found nothing useful there either.
If your problem has been solved, please edit this topic's initial post and add "[Solved]" to the beginning of the subject line
Apache OpenOffice 4.1.14 & LibreOffice 7.6.2.1 (x86_64) - Windows 10 Professional- Windows 11
Post Reply