Edit emergent title text on generated Hyperlinks

Creating a macro - Writing a Script - Using the API (OpenOffice Basic, Python, BeanShell, JavaScript)
Post Reply
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Edit emergent title text on generated Hyperlinks

Post by arfgh »

I'm still looking for a way to edit the emergent title text that appears on mouse over generted hyperlinks via de uno api by this way...

Code: Select all

obj.HyperLinkURL = "vnd.sun.star.script:standard.module1.HyperlinkReport?language=Basic&location=document
It is very ugly to see the same uno api reference appearing as title text on mouse over... instead of some proper text...

i haven been looking in the uno api for a way to do it, without luck :(

some help ?
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
JeJe
Volunteer
Posts: 2778
Joined: Wed Mar 09, 2016 2:40 pm

Re: Edit emergent title text on generated Hyperlinks

Post by JeJe »

Use a transparent form control label over your text instead of a hyperlink and set its help text to whatever you want.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: Edit emergent title text on generated Hyperlinks

Post by arfgh »

JeJe, if that way works, great, but of course a property for the uno api reference will be the way to do that, if exists.
Anyways that trick solution of yours... do you have some working and simple example to understand it ? but see that these links are generated from macro into a report table.

thx in advance
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
JeJe
Volunteer
Posts: 2778
Joined: Wed Mar 09, 2016 2:40 pm

Re: Edit emergent title text on generated Hyperlinks

Post by JeJe »

Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: Edit emergent title text on generated Hyperlinks

Post by arfgh »

what i cant understand is the way the uno api has anything to set that title text on that kind of hyperlinks... cant understand that missing...
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Edit emergent title text on generated Hyperlinks

Post by Villeroy »

For the tooltip it makes absolute no sense to show anything but the hyperlink URL.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: Edit emergent title text on generated Hyperlinks

Post by arfgh »

it makes less sense to show this instead of a proper tooltip: "vnd.sun.star.script:standard.module1.HyperlinkReport?language=Basic&location=document"

yes... that makes more sense... clearly.
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
JeJe
Volunteer
Posts: 2778
Joined: Wed Mar 09, 2016 2:40 pm

Re: Edit emergent title text on generated Hyperlinks

Post by JeJe »

Puts label on blank Writer document... uses MRI...

Code: Select all

thiscomponent.drawpage.getbyindex(0).control.helptext = "blah"
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: Edit emergent title text on generated Hyperlinks

Post by arfgh »

JeJe good possible solution, using labels and its helptext, but i want to use this in a report document where i did add the hyperlinks via macro, i am unsure that i can add a label control into each cell of that report.... or yes ?
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
User avatar
Villeroy
Volunteer
Posts: 31279
Joined: Mon Oct 08, 2007 1:35 am
Location: Germany

Re: Edit emergent title text on generated Hyperlinks

Post by Villeroy »

JeJe wrote:Puts label on blank Writer document... uses MRI...

Code: Select all

thiscomponent.drawpage.getbyindex(0).control.helptext = "blah"
Nope. It gets the control of the first draw page element and adds the help text "blah".
The writer document is not blank and the first element on its draw page needs to be a form control.
Please, edit this topic's initial post and add "[Solved]" to the subject line if your problem has been solved.
Ubuntu 18.04 with LibreOffice 6.0, latest OpenOffice and LibreOffice
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: Edit emergent title text on generated Hyperlinks

Post by arfgh »

^^ of course i meant programmatically.... maybe it is possible to programmatically add a label control into each cell...
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
JeJe
Volunteer
Posts: 2778
Joined: Wed Mar 09, 2016 2:40 pm

Re: Edit emergent title text on generated Hyperlinks

Post by JeJe »

Save the report as a writer document. Modify this code to add labels and anchor to the cell text .

viewtopic.php?f=45&t=27424
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
arfgh
Posts: 566
Joined: Tue Mar 05, 2013 6:44 pm

Re: Edit emergent title text on generated Hyperlinks

Post by arfgh »

no way, no way, these reports are dynamic. The purpose of the added hyperlinks here is to have easy navigation jumps pointing to forms...
OpenOffice last version | Mageia Linux x64 | Ubuntu Linux | Windows 8.1 Enterprise x64 | Java last version
JeJe
Volunteer
Posts: 2778
Joined: Wed Mar 09, 2016 2:40 pm

Re: Edit emergent title text on generated Hyperlinks

Post by JeJe »

Become a developer, re-write the bit that adds the URL.
Windows 10, Openoffice 4.1.11, LibreOffice 7.4.0.3 (x64)
Post Reply