jsdialogs: make possible to set .uno:FontColor
Change-Id: I5ece252d3b7e9dca7c97395c70be6ea4863d7545 Reviewed-on: https://gerrit.libreoffice.org/81498 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
This commit is contained in:
parent
0615f3bc12
commit
d73871584f
3 changed files with 19 additions and 1 deletions
|
@ -565,6 +565,7 @@ class SvxSearchItem;
|
|||
#define SID_ATTR_CHAR_COLOR_BACKGROUND (SID_SVX_START + 489)
|
||||
#define SID_ATTR_CHAR_COLOR_BACKGROUND_EXT (SID_SVX_START + 490)
|
||||
#define SID_ATTR_CHAR_COLOR2 (SID_SVX_START + 537)
|
||||
#define SID_ATTR_CHAR_COLOR2_STR (SID_SVX_START + 540)
|
||||
#define SID_COMP_BIBLIOGRAPHY (SID_SVX_START + 880)
|
||||
#define SID_ADDRESS_DATA_SOURCE (SID_SVX_START + 934)
|
||||
#define SID_OPEN_SMARTTAGOPTIONS (SID_SVX_START + 1062)
|
||||
|
|
|
@ -1280,6 +1280,7 @@ SfxBoolItem Fields FN_VIEW_FIELDS
|
|||
]
|
||||
|
||||
SvxColorItem FontColor SID_ATTR_CHAR_COLOR2
|
||||
(SfxStringItem Color SID_ATTR_CHAR_COLOR2_STR, SvxColorItem FontColor SID_ATTR_CHAR_COLOR2)
|
||||
|
||||
[
|
||||
AutoUpdate = TRUE,
|
||||
|
|
|
@ -1174,9 +1174,25 @@ void SwTextShell::Execute(SfxRequest &rReq)
|
|||
|
||||
case SID_ATTR_CHAR_COLOR2:
|
||||
{
|
||||
Color aSet;
|
||||
OUString sColor;
|
||||
const SfxPoolItem* pColorStringItem = nullptr;
|
||||
bool bHasItem = false;
|
||||
|
||||
if(pItem)
|
||||
{
|
||||
Color aSet = static_cast<const SvxColorItem*>(pItem)->GetValue();
|
||||
aSet = static_cast<const SvxColorItem*>(pItem)->GetValue();
|
||||
bHasItem = true;
|
||||
}
|
||||
else if(SfxItemState::SET == pArgs->GetItemState(SID_ATTR_CHAR_COLOR2_STR, false, &pColorStringItem))
|
||||
{
|
||||
sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
|
||||
aSet = Color(sColor.toInt32(16));
|
||||
bHasItem = true;
|
||||
}
|
||||
|
||||
if (bHasItem)
|
||||
{
|
||||
SwEditWin& rEditWin = GetView().GetEditWin();
|
||||
rEditWin.SetWaterCanTextColor(aSet);
|
||||
SwApplyTemplate* pApply = rEditWin.GetApplyTemplate();
|
||||
|
|
Loading…
Reference in a new issue