Bug 85592 - Font and highlight colour toolbar buttons dont work in comments
Summary: Font and highlight colour toolbar buttons dont work in comments
Status: NEW
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Writer (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium minor
Assignee: Not Assigned
URL:
Whiteboard:
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: 2022-07-21 18:18 UTC (History)
10 users (show)

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


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.