Bug 144464 - same argument name used twice in SID_ATTR_CHAR_COLOR
Summary: same argument name used twice in SID_ATTR_CHAR_COLOR
Status: UNCONFIRMED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: framework (show other bugs)
Version:
(earliest affected)
7.3.0.0 alpha0+
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-13 09:18 UTC by Caolán McNamara
Modified: 2021-09-18 09:53 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 Caolán McNamara 2021-09-13 09:18:28 UTC
Description:
In a dbgutil build selecting a color from the font color dropdown in writer outputs...

warn:legacy.osl:4094209:4094209:svl/source/items/custritm.cxx:70: CntUnencodedStringItem::PutValue(): Wrong type
warn:sfx:4094209:4094209:sfx2/source/appl/appuno.cxx:310: Property not convertible: Color

to stderr

Steps to Reproduce:
1. in writer use font color dropdown
2. get above error message
3. the highlight color dropdown doesn't give the same type of error

Actual Results:
warning

Expected Results:
no warning


Reproducible: Always


User Profile Reset: No



Additional Info:
I think a problem here is that there are duplicate names for arguments listed in svx/sdi/svx.sdi

SvxColorItem Color SID_ATTR_CHAR_COLOR
(SfxStringItem Color SID_ATTR_COLOR_STR, SvxColorItem Color SID_ATTR_CHAR_COLOR)

I think here that the two arguments are both named "Color" and "Color"

Maybe since:

commit 780d83771af89e6b27b3618d9c033c3fb29ba803
Date:   Mon Nov 4 17:17:58 2019 +0100

    jsdialogs: .uno:Color with string argument
Comment 1 Caolán McNamara 2021-09-13 09:26:44 UTC
I'm not entirely sure what the right thing to do here should be. The color dropdown will pass an arg of "Color" with a long. I can see that if I change...

(SfxStringItem Color SID_ATTR_COLOR_STR, SvxColorItem Color SID_ATTR_CHAR_COLOR)

to, e.g.

(SfxStringItem ColorString SID_ATTR_COLOR_STR, SvxColorItem Color SID_ATTR_CHAR_COLOR)

then the warning goes away and the dropdown works as usual. If I changed the other arg to e.g.


(SfxStringItem Color SID_ATTR_COLOR_STR, SvxColorItem FontColor SID_ATTR_CHAR_COLOR)

then the dropdown will launch the "format character" dialog instead of changing the color
Comment 2 Szymon Kłos 2021-09-13 11:08:11 UTC
I think SfxStringItem was introduced for online / LOK.
I think now it is not needed after some updates. I will check.
But in general:
"SvxColorItem Color SID_ATTR_CHAR_COLOR" should be not changed as it is the original parameter I think.