summaryrefslogtreecommitdiff
path: root/sw/source/uibase/shells
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-10-28 09:51:32 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-10-31 20:23:53 +0100
commit5219cb0ca6ebade6521db3f2c625e9641085a3b4 (patch)
tree2b84132142e95d8772bc639e08ee68998bac1a46 /sw/source/uibase/shells
parent5ebf83e24554b3a5a6c2398209d10f72d720c6d4 (diff)
jsdialogs: make possible to set .uno:BackColor
Change-Id: I2fd9a70b54f211dbfe9bb58102e17afd38516d5d Reviewed-on: https://gerrit.libreoffice.org/81587 Tested-by: Jenkins Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/81593 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sw/source/uibase/shells')
-rw-r--r--sw/source/uibase/shells/textsh1.cxx17
1 files changed, 15 insertions, 2 deletions
diff --git a/sw/source/uibase/shells/textsh1.cxx b/sw/source/uibase/shells/textsh1.cxx
index d27f414c4c97..46868deff1be 100644
--- a/sw/source/uibase/shells/textsh1.cxx
+++ b/sw/source/uibase/shells/textsh1.cxx
@@ -1173,7 +1173,7 @@ void SwTextShell::Execute(SfxRequest &rReq)
aSet = static_cast<const SvxColorItem*>(pItem)->GetValue();
bHasItem = true;
}
- else if(SfxItemState::SET == pArgs->GetItemState(SID_ATTR_CHAR_COLOR2_STR, false, &pColorStringItem))
+ else if(SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem))
{
sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
aSet = Color(sColor.toInt32(16));
@@ -1201,7 +1201,20 @@ void SwTextShell::Execute(SfxRequest &rReq)
case SID_ATTR_CHAR_COLOR_BACKGROUND_EXT:
case SID_ATTR_CHAR_COLOR_EXT:
{
- Color aSet = pItem ? static_cast<const SvxColorItem*>(pItem)->GetValue() : COL_TRANSPARENT;
+ Color aSet;
+ 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))
+ {
+ sColor = static_cast<const SfxStringItem*>(pColorStringItem)->GetValue();
+ aSet = Color(sColor.toInt32(16));
+ }
+
SwEditWin& rEdtWin = GetView().GetEditWin();
if (nSlot != SID_ATTR_CHAR_COLOR_EXT)
rEdtWin.SetWaterCanTextBackColor(aSet);