Bug 107791 - Add Find and Replace dialog ability to work with graphic objects
Summary: Add Find and Replace dialog ability to work with graphic objects
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
5.3.3.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords: needsUXEval
Depends on:
Blocks: Find&Replace-Dialog
  Show dependency treegraph
 
Reported: 2017-05-12 09:20 UTC by Daniel Grigoras
Modified: 2017-10-17 23:29 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 Daniel Grigoras 2017-05-12 09:20:49 UTC
Description:
It would be very helpful if an option were provided to replace all graphics with a graphic copied in the clipboard.
I'm looking forward to this.

Actual Results:  
-

Expected Results:
-


Reproducible: Always

User Profile Reset: No

Additional Info:
-


User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:53.0) Gecko/20100101 Firefox/53.0
Comment 1 Buovjaga 2017-05-12 18:00:34 UTC
Sorry, but this is more the job for a macro or an extension.
You can try recording a macro of replacing an image, inspect the code and try to make it a loop that replaces all the images in the document.

Closing as WONTFIX.
Comment 2 Daniel Grigoras 2017-05-15 08:56:59 UTC
But this is possible in MS Word (see: https://wordribbon.tips.net/T013276_Searching_and_Replacing_Graphics).
How does LibreOffice want to compete with MS Office if it doesn't provide such basic features?
Comment 3 Buovjaga 2017-05-15 09:04:02 UTC
Fine, let's ask UX about our competing ambitions.
Comment 4 V Stuart Foote 2017-05-15 13:48:19 UTC
For OP, for clarification you are asking for capability to use a single graphic (held on clipboard)--but I would assume by selection as well--to replace all graphics/frames on document canvas?

And, you'd like interface via the "Find & Replace" dialog.

Seems feasible. But the existing Find can not target an image directly at the moment. Something is already in works for LibreOffice with bug 100672 to add a Special category, that could be extended to include "graphic" objects--icons, bitmaps, vector images, etc.. 

Otherwise this has been fertile ground for Extension with the like of "Alt Search" and "Change Picture" both able to target an image for replacement. 

But the search logic for the graphics would have to be figured out for consistent use in the core Find & Replace dialog.
Comment 5 Daniel Grigoras 2017-05-15 14:38:56 UTC
I have been working on batch replacing graphics with AltSearch, but the results were poor as not all graphics were replaced and the first one was misplaced and its frame and caption removed. I got in touch with the developer of Alt Search about this. As for "Change picture", this extension is able to change only one picture at a time, the one that you have selected.
Comment 6 Heiko Tietze 2017-05-17 14:32:52 UTC
I'm missing the use case here. Of course it's _possible_, but when you want to exchange one company logo by another, for instance, that's a job for the template/field etc. Different images in a document likely hold different content. 

So a clear WONTFIX from my side as Buovjaga said in comment 1.
Comment 7 Daniel Grigoras 2017-05-17 14:37:06 UTC
(In reply to Heiko Tietze from comment #6)

The use case that urged me to find a solution to this is the need to anonymize thousands of pages of content. It's relatively easy to anonymize words and numbers with the help of regular expressions, but I couldn't find a way to batch replace all images.
Comment 8 Heiko Tietze 2017-05-17 15:17:08 UTC
(In reply to Darius Daniel Grigoras from comment #7)
> The use case that urged me to find a solution to this is the need to
> anonymize thousands of pages of content.

In that case the image should retain its dimensions. Definitely an extension task. Do you feel comfortable with Basic/Python/Java/Rust...?
Comment 9 V Stuart Foote 2017-05-17 16:36:02 UTC
(In reply to Heiko Tietze from comment #8)
> (In reply to Darius Daniel Grigoras from comment #7)
> > The use case that urged me to find a solution to this is the need to
> > anonymize thousands of pages of content.
> 
> In that case the image should retain its dimensions. Definitely an extension
> task. Do you feel comfortable with Basic/Python/Java/Rust...?

No, I would agree this is a reasonable capability to include for work needed implementing a _Special_ panel function for Find and Replace.

The missing piece now is _exposing_ a graphic object to the Find and Replace actions.  MS Office provides matching for a graphic object with the "^g" wildcard on both the Find and the Replace tabs.

During implementation for LibreOffice, specifics of the capability might need to consider scaling/clipping to fit the replacement into the document (to retain formatting) or just replace.
Comment 10 Heiko Tietze 2017-05-17 19:07:43 UTC Comment hidden (off-topic)
Comment 11 V Stuart Foote 2017-05-17 22:02:59 UTC Comment hidden (off-topic)