summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-08 13:19:38 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-08 16:45:14 +0100
commit76762b4c9899787a32d71bf5ed7695e22eccbc4c (patch)
tree88f11abe713e450f0a614437692c8f4fce6f3031 /sd
parentadff2373c512b8bd0d7dcd1688d0f19616b95c3e (diff)
jsdialogs: apply .uno:FillColor in Impress
Change-Id: Ic85233716998f3a88792501266c4d8214c4ab1a2 Reviewed-on: https://gerrit.libreoffice.org/82292 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/82303 Tested-by: Jenkins
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx24
1 files changed, 19 insertions, 5 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 74ec6a3801ee..ebed254a497b 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -540,7 +540,7 @@ public:
namespace
{
- void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs)
+ void lcl_convertStringArguments(sal_uInt16 nSlot, std::unique_ptr<SfxItemSet>& pArgs)
{
Color aColor;
OUString sColor;
@@ -556,7 +556,7 @@ namespace
XLineWidthItem aItem(nValue);
pArgs->Put(aItem);
}
- else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem))
+ if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem))
{
sColor = static_cast<const SfxStringItem*>(pItem)->GetValue();
@@ -565,8 +565,22 @@ namespace
else
aColor = Color(sColor.toInt32(16));
- XLineColorItem aLineColorItem(OUString(), aColor);
- pArgs->Put(aLineColorItem);
+ switch (nSlot)
+ {
+ case SID_ATTR_LINE_COLOR:
+ {
+ XLineColorItem aLineColorItem(OUString(), aColor);
+ pArgs->Put(aLineColorItem);
+ break;
+ }
+
+ case SID_ATTR_FILL_COLOR:
+ {
+ XFillColorItem aFillColorItem(OUString(), aColor);
+ pArgs->Put(aFillColorItem);
+ break;
+ }
+ }
}
}
}
@@ -657,7 +671,7 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( rReq.GetArgs() )
{
std::unique_ptr<SfxItemSet> pNewArgs = rReq.GetArgs()->Clone();
- lcl_convertStringArguments(pNewArgs);
+ lcl_convertStringArguments(rReq.GetSlot(), pNewArgs);
mpDrawView->SetAttributes(*pNewArgs);
rReq.Done();
}