diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-10-28 13:38:15 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-01 09:10:01 +0100 |
commit | ce3c1615ffc29ae4c0ebf8b05e198070460fae0a (patch) | |
tree | 9dd91f83db7ee1a82a4bf4c190a4fbec9bcc08e0 /sw | |
parent | e5a9832fc0f437ed48bafb9e897fd88820211ff7 (diff) |
jsdialogs: fix .uno:BackColor command
Change-Id: I628067afa4c3a8d28c5c3635c4e5e46f9febdf94
Reviewed-on: https://gerrit.libreoffice.org/81602
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/81607
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/textsh1.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx index 46868deff1be..525b808fb2d0 100644 --- a/sw/source/uibase/shells/textsh1.cxx +++ b/sw/source/uibase/shells/textsh1.cxx @@ -1205,15 +1205,15 @@ void SwTextShell::Execute(SfxRequest &rReq) OUString sColor; const SfxPoolItem* pColorStringItem = nullptr; - if (pItem) - { - aSet = pItem ? static_cast<const SvxColorItem*>(pItem)->GetValue() : COL_TRANSPARENT; - } - else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem)) + if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem)) { sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue(); aSet = Color(sColor.toInt32(16)); } + else if (pItem) + aSet = static_cast<const SvxColorItem*>(pItem)->GetValue(); + else + aSet = COL_TRANSPARENT; SwEditWin& rEdtWin = GetView().GetEditWin(); if (nSlot != SID_ATTR_CHAR_COLOR_EXT) |