Bug 114470 - Would like to do "find and replace" on hyperlink targets
Summary: Would like to do "find and replace" on hyperlink targets
Status: RESOLVED WONTFIX
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Draw (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
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:


Attachments

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
Description:
I have Draw documents with many text boxes containing hyperlinks, such as
http://example.com/whatever/file.html

I would like to change them all to eg
http://new.web.site/file.html

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/