diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-10-25 11:46:18 +0200 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-10-28 09:01:52 +0100 |
commit | 6b604833df4295b965a499b999b9bba3ed73ef73 (patch) | |
tree | 0c88f57e2b1925d43f976bb761d814e0d67cbd97 /sw/source | |
parent | de3d5c9d394bd8ed10670800a3814edb3db3c31d (diff) |
jsdialogs: make possible to set .uno:FontColor
Change-Id: I5ece252d3b7e9dca7c97395c70be6ea4863d7545
Reviewed-on: https://gerrit.libreoffice.org/81516
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 830a04d86471..d27f414c4c97 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1163,9 +1163,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(); |