Bug 137214 - Add "Color Replacer" to Writer (currently it only exists in Draw/Impress)
Summary: Add "Color Replacer" to Writer (currently it only exists in Draw/Impress)
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
7.0.1.2 release
Hardware: All All
: medium enhancement
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Writer-Images Writer-Enhancements
  Show dependency treegraph
 
Reported: 2020-10-02 21:20 UTC by Rafael Lima
Modified: 2022-06-20 23:07 UTC (History)
5 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 Rafael Lima 2020-10-02 21:20:18 UTC
LibreOffice Impress and Draw allow the user to replace colors in images by using "Tools - Color Replacer". Below is a link to the feature I'm talking about:

https://wiki.documentfoundation.org/Faq/Draw/005

This functionality would be very helpful in LO Writer, because often users need to set transparent colors for images that float in the text (e.g. signatures).

Therefore, I would like to suggest this feature be enabled in LO Writer as well.
Comment 1 Heiko Tietze 2020-10-05 08:59:34 UTC
Would prefer to keep Writer clean of rarely needed functions. If you need to modify images external tools or Draw are just better suited.
Comment 2 Rafael Lima 2020-10-05 11:19:49 UTC
(In reply to Heiko Tietze from comment #1)
> Would prefer to keep Writer clean of rarely needed functions. If you need to
> modify images external tools or Draw are just better suited.

Hi! I would like to respectfully disagree with your opinion.

I understand that "Replacing Colors" is not a functionality that is frequently used in text documents, but "Setting a Transparent Color" in images is something that users often need to do.

When one downloads an image from the internet, it often comes with a background color that the user wants to set as transparent. It happens to me very frequently and what I do is exactly what you said: I open Gimp and edit the image externally.

The problem with this approach is twofold:
1) It adds a long second step to setting the transparent color of an image, requiring the user to keep additional files in his/her computer;
2) Using an external tool to set transparent colors require a certain level of technological knowledge of how images work that most people simply do not have. For example, my mom knows how to set a transparent color in Word, but she has no idea what an alpha channel is. She can't even name an external image editor that can perform such a task.

So, my suggestion to add this tool to Writer seeks to (i) improve convenience while editing documents, making it much faster to do a simple task and (ii) give less tech-savvy users the ability to set a transparent color in images.

Moreover, I don't think the Color Replacer would bloat LO Writer. It could be placed in the "Image -> Filter" drop-down list (I am using the Tabbed interface). Or it could be added to the Image Properties sidebar, below the Color Mode.

Another alternative would be to implement a single button in the Image Properties sidebar where the user can set the transparent color. Hence it would be a simpler implementation of the Color Replacer Tool.
Comment 3 V Stuart Foote 2020-10-05 13:49:38 UTC
The .uno:bmpmask command controlling the 'Color Replacer' dialog (dockingcolorreplace.ui) from SVX does not seem to be unique sd draw/impress source and could be linked to the other modules.

If it does not require extensive modification to apply to inserted images in sw/sc then seems a reasonable control to add to the respective Tools menus adjacent to 'Image Map', and to expose to toolbar/context menu customization for the other modules as well.
Comment 4 Heiko Tietze 2020-10-09 08:40:09 UTC
We discussed the topic in the design meeting. Rafael made his workflow very much clear; it's reasonable to add the color replacer to other modules too. Ideally it would be realized as extension (and removed from core) but as of today it might be an easyhack to make it available per customization. To keep the UI clean I suggest to not show it in the UI by default.

Easyhack, for code pointer see c3, medium difficulty since it might has additional effort.
Comment 5 Mike Kaganski 2021-01-22 12:22:13 UTC
So this seems to not be an easy hack after all? Where are the code pointers for implementing the functionality? How was it decided to be easy (even if medium)?
Comment 6 V Stuart Foote 2021-01-22 14:58:22 UTC
(In reply to Mike Kaganski from comment #5)
> So this seems to not be an easy hack after all? Where are the code pointers
> for implementing the functionality? How was it decided to be easy (even if
> medium)?

Yes, not sure my read of things in comment 3 exactly qualifies as code pointer supporting an easy hack ;-)
Comment 7 Heiko Tietze 2021-01-26 13:28:34 UTC
Apparently not so simple as suggested in https://gerrit.libreoffice.org/c/core/+/106475
Comment 8 Rafael Lima 2021-12-06 23:52:59 UTC
I am setting this to NEW.