summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-10-28 13:38:15 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-10-28 14:32:35 +0100
commite70ccc06094bec12d1947328b98ea040b46d08fc (patch)
tree4fbfc4d09207fc333110e92de2beb6f839efb615 /sw
parent1144712bb99cfb699e73b473ee44351c50a35613 (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>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/shells/textsh1.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index 173805a5ae85..7ff0435665d3 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1216,15 +1216,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)