Bug 114470 - Would like to do "find and replace" on hyperlink targets
Summary: Would like to do "find and replace" on hyperlink targets
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
Depends on:
Reported: 2017-12-14 16:35 UTC by Peter
Modified: 2017-12-25 11:03 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:
Regression By:


Note You need to log in before you can comment on or make changes to this bug.
Description Peter 2017-12-14 16:35:12 UTC
I have Draw documents with many text boxes containing hyperlinks, such as

I would like to change them all to eg

At the moment, I see no way to do this other than selecting each one individually and editing it. It would be much quicker if I could do a find-and-replace. Let the computer do the work!

Steps to Reproduce:
1. Create a Draw document
2. Add some text and insert hyperlink
3. Repeat step 2 many times
4. Now change all the hyperlinks - a slow process!

Actual Results:  
Changed hyperlinks one-by-one

Expected Results:
Hyperlinks are changed, but it takes a long time

Reproducible: Always

User Profile Reset: No

Additional Info:
"Find" should have a checkbox for "hyperlink target", so a global edit of them can be done.

User-Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:57.0) Gecko/20100101 Firefox/57.0
Comment 1 Buovjaga 2017-12-25 11:03:26 UTC
I think this is something better served by a macro. I mean, if we start thinking holistically, we would have to add a way to find and replace all the other hyperlink attributes as well.

If you don't want to get into macro programming, you could unzip the .odg file (it is a .zip in disguise), open the content.xml in your favourite plain text editor and do a find and replace there for the link.

I see you already got a helpful reply with an example macro: https://ask.libreoffice.org/en/question/140427/can-i-do-a-find-and-replace-on-the-targets-of-hyperlinks-in-a-draw-document/