diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-08 13:19:38 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-08 14:27:45 +0100 |
commit | 5086d318b4c737814086e8a28ebe8311f1d08eee (patch) | |
tree | 723a3cc83d5d4ea71b249780ed09b04839ee25b8 | |
parent | 4d8315200f2157b47af4a780c69985b28321b703 (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>
-rw-r--r-- | sd/source/ui/view/drviews2.cxx | 24 |
1 files changed, 19 insertions, 5 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx index 77f63e1894b5..5b10ea013a04 100644 --- a/sd/source/ui/view/drviews2.cxx +++ b/sd/source/ui/view/drviews2.cxx @@ -547,7 +547,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; @@ -563,7 +563,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(); @@ -572,8 +572,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; + } + } } } } @@ -664,7 +678,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(); } |