Bug 85592 - Font and highlight colour toolbar buttons dont work in comments
Summary: Font and highlight colour toolbar buttons dont work in comments
Status: VERIFIED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium minor
Assignee: Justin L
URL:
Whiteboard: target:7.6.0
Keywords:
: 139748 (view as bug list)
Depends on:
Blocks: Writer-Comments Split-Group-Buttons-Color
  Show dependency treegraph
 
Reported: 2014-10-29 10:50 UTC by peter josvai
Modified: 2023-06-01 08:22 UTC (History)
10 users (show)

See Also:
Crash report or crash signature:


Attachments
a simple illustration (screenshot) (195.85 KB, image/png)
2014-10-29 10:50 UTC, peter josvai
Details

Note You need to log in before you can comment on or make changes to this bug.
Description peter josvai 2014-10-29 10:50:03 UTC
Created attachment 108617 [details]
a simple illustration (screenshot)

if you have a comment inserted in the document, and if you want to change the font color, the button from the toolbar does NOT work ... 
so, you have to go: menu/format/character ... 
and then you can change the color ...


NOTE #1: it's of minor annoyance, I didn't even realize so far that you can actually change the font color in the notes ... but now that I know, I'd be happy to use this and I guess other people might think like that too .)
cause it's a nice way to emphasize some part of the note...

NOTE #2:
highlighting could be considered to made active too :)
Comment 1 Buovjaga 2014-11-15 12:32:44 UTC
Repro -> NEW enhancement.

Win 7 64-bit Version: 4.4.0.0.alpha2+
Build ID: b021b5983c62e266b82d9f0c5c6d8d8900553827
TinderBox: Win-x86@39, Branch:master, Time: 2014-11-12_01:10:08

Ubuntu 14.10 64-bit Version: 4.4.0.0.alpha2+
Build ID: 5bff4b016c4b44f4123e0e6a4fd4c0c4dc0cfa2d
TinderBox: Linux-rpm_deb-x86_64@46-TDF-dbg, Branch:master, Time: 2014-11-13_00:14:29
Comment 2 Dieter 2017-04-26 08:19:46 UTC
I confirm it with LO 5.3.2. Personally I think it's a bug and not an enhancement, because if you use the sitebar, you can customise "Font Colour" as well as "Highlight Colour".

=> changed description of th bug to be more precise
=> changed to minor bug, because a workaround exists
Comment 3 Yousuf Philips (jay) (retired) 2017-10-30 10:44:08 UTC
Tested 6.0 and font color in the toolbar does work. Highlight color is disabled in toolbar and enabled in sidebar, so its likely using a different uno command. Maxim: thoughts?

Version: 6.0.0.0.alpha1+
Build ID: 43d6b11a5c1dda0cc2c1e06c768eece25051a56c
CPU threads: 2; OS: Linux 4.4; UI render: default; VCL: gtk2; 
Locale: en-US (en_US.UTF-8); Calc: group
Comment 4 Heiko Tietze 2018-02-21 09:29:02 UTC
I wonder if font attributes are allowed in comments. Regina?
Comment 5 Regina Henschel 2018-02-21 11:36:45 UTC
Comments are <office:annotation> elements. Allowed content is <text:list> and <text:p> and the meta data <dc:creator>, <dc:date> and <meta:date-string>. So from file format there would be no problem to use all styling that are possible for lists and paragraphs.
Comments are handled as callout shapes internally (AFAIK), so all restrictions known for them (e.g. bug 96706) hold here too.
Comment 6 QA Administrators 2019-06-01 02:49:39 UTC Comment hidden (obsolete)
Comment 7 Telesto 2021-01-19 09:13:05 UTC
*** Bug 139748 has been marked as a duplicate of this bug. ***
Comment 8 Telesto 2021-01-19 09:16:32 UTC Comment hidden (no-value)
Comment 9 Lucas 2021-01-19 14:58:09 UTC
(In reply to Telesto from comment #8)
> Not totally getting what the hold-up here is..
> menu/format/character does work. 
> 
> Makes sense to add character to the right click context menu of a comment,
> IMHO.
> And working toolbar button might help too..
> 
> 
> Biggest issue is DOCX ex and/or importer not handling highlighting inside
> comment box.. So it will vanish. Obviously not great either.. but no reason
> for the current state, IMHO.

I tested it on my version of Writer now (7.0.4.2 x64), and the bug remains.

Like others said, font color in the toolbar work; highlight color is disabled in toolbar and enabled in sidebar.

Really the function of importing the highlighted comments from DOCX is not working, I tested it here too.

What did you mean by it will vanish?
Comment 10 Telesto 2021-01-19 15:12:40 UTC
(In reply to Lucas from comment #9)
I might have misunderstood.

I read you're bug as : highlight color is disabled in toolbar and enabled in sidebar. If you where talking about DOCX/DOC import (and export) then you're right. It doesn't function. Kind of created bug 139759 for that.. but if you're attached having you're own report.. I'm happy to revive that one
Comment 11 Lucas 2021-01-19 16:02:35 UTC Comment hidden (no-value)
Comment 12 Telesto 2021-01-19 17:59:31 UTC Comment hidden (no-value)
Comment 13 Justin L 2022-07-13 00:51:38 UTC
Hmm - I wonder how it is being disabled. It is NOT via rSet.disableItem.
Comment 14 Justin L 2022-07-13 13:30:05 UTC
The sidebar is basically being replaced by a different set of options when switching to comments. (Some paragraph stuff disappears, and the Character Highlighting Color visibly changes position when moving between body text and comment.)

Comments also disable other paragraph items like numbering on the toolbar. There are two Character Highlighting Color objects: .uno:BackColor (works with comments) and .uno:CharBackColor (works with body text). Likely there is no (easy) solution for the disabled toolbar button.
Comment 15 Justin L 2022-07-16 18:13:18 UTC
(In reply to Justin L from comment #14)
> There are two Character Highlighting Color objects: .uno:BackColor (works
> with comments) and .uno:CharBackColor (works with body text).
I got this completely backwards:
.uno:BackColor is enabled with body text. It is associated with SvxBrushItem and SID_ATTR_BRUSH_CHAR.
.uno:CharBackColor is enabled with comments / textboxes / draw-stuff and associated with SvxColorItem and SID_ATTR_CHAR_BACK_COLOR.

I changed EVERY reference of .uno:CharBackColor to .uno:BackColor and that STILL did not "fix" the toolbar disabling when in a comment/textbox. HELP!
Comment 16 Telesto 2022-07-17 09:24:39 UTC Comment hidden (no-value)
Comment 17 Justin L 2022-07-18 16:14:06 UTC
(In reply to Justin L from comment #15)
> .uno:BackColor is enabled with body text. It is associated with SvxBrushItem
> and SID_ATTR_BRUSH_CHAR.
That's not 100% accurate either. From sw/sdi/swriter.sdi:

SvxColorItem BackColor SID_ATTR_CHAR_COLOR_BACKGROUND

but in the code this is typically changed to SvxBrushItem and associated with Writer's RES_CHRATR_BACKGROUND. 

> .uno:CharBackColor is enabled with comments / textboxes / draw-stuff and
> associated with SvxColorItem and SID_ATTR_CHAR_BACK_COLOR.
SvxColorItem CharBackColor SID_ATTR_CHAR_BACK_COLOR

which in the code is keep as a ColorItem and pretty much is exclusively associated with editeng's EE_CHAR_BKGCOLOR.


In sw UNO, PROP_NAME_CHAR_BACK_COLOR maps to RES_CHRATR_BACKGROUND.
Comment 18 Justin L 2022-07-21 18:18:05 UTC
Exploratory proposal at http://gerrit.libreoffice.org/c/core/+/137334

(In reply to Justin L from comment #15)
> Nothing "fixed" the toolbar disabling when in a comment/textbox. HELP!
The key to this is defining CharBackColor in the .sdi files.
Comment 19 Commit Notification 2022-08-23 23:08:12 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/e93b7f6a5c5f9ee86546d95d7fe70ecc26b71b91

NFC related tdf#85592: simplify SID_ATTR_CHAR_COLOR_BACKGROUND_EXT

It will be available in 7.5.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 20 Commit Notification 2022-12-16 02:35:36 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/ba8eb90925aa31be4029b5486a6f5dcd2e9573fd

[API CHANGE] related tdf#85592: drop duplicate use of .uno:CharBackgroundExt

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 21 Commit Notification 2022-12-19 17:57:28 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/be3d34b5d6b97c3eb12ab3f84ce2da2ef965a928

[API CHANGE] tdf#85592: deprecate .uno:BackColor, use .uno:CharBackColor

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 22 Commit Notification 2022-12-20 00:16:03 UTC
Justin Luth committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/commit/70d9e7eadb1069b5e7a1909c671b9348b740cca1

tdf#85592 android: .uno:BackColor deprecated, use .uno:CharBackColor

It will be available in 7.6.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 23 Justin L 2022-12-20 00:17:47 UTC
Documented API CHANGE in 7.6 release notes.
Comment 24 Dieter 2023-01-25 19:04:16 UTC
Font color works, but not character highlighting

Tested with

Version: 7.5.0.2 (X86_64) / LibreOffice Community
Build ID: c0dd1bc3f1a385d110b88e26ece634da94921f58
CPU threads: 4; OS: Windows 10.0 Build 19044; UI render: Skia/Raster; VCL: win
Locale: de-DE (de_DE); UI: en-GB
Calc: CL threaded
Comment 25 Justin L 2023-01-25 19:40:02 UTC
(In reply to Dieter from comment #24)
> Font color works, but not character highlighting
> Version: 7.5.0.2 (X86_64) / LibreOffice Community

It only works in 7.6, where it was documented in the release notes.
Comment 26 Dieter 2023-01-26 07:27:35 UTC
(In reply to Justin L from comment #25)
> It only works in 7.6, where it was documented in the release notes.

I only looked at information in "Whiteboard". But you're right, fixed in

Version: 7.6.0.0.alpha0+ (X86_64) / LibreOffice Community
Build ID: 1c638b7ac46d8077994c8483e6becc4a33efd12b
CPU threads: 4; OS: Windows 10.0 Build 19045; UI render: Skia/Raster; VCL: win
Locale: en-US (de_DE); UI: en-GB
Calc: CL threaded

Thank you, Justin!