diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-10-31 11:49:22 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-08 13:58:35 +0100 |
commit | 4d8315200f2157b47af4a780c69985b28321b703 (patch) | |
tree | 281496a594d8104b331663eaafedcecb4d0b37f6 /sw/source | |
parent | 4bc42437cabf22a1351f485578e43f8fc0d21de3 (diff) |
jsdialogs: .uno:XFillColor with string argument
Change-Id: I7f078fc66cecacccd4473495f96e4e2dbfd89d14
Reviewed-on: https://gerrit.libreoffice.org/81832
Tested-by: Jenkins
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Reviewed-on: https://gerrit.libreoffice.org/82291
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Diffstat (limited to 'sw/source')
-rw-r--r-- | sw/source/uibase/shells/drawdlg.cxx | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx index 5de7f6d0dbbf..6b4462f952f2 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -37,6 +37,7 @@ #include <svx/xlnclit.hxx> #include <svx/chrtitem.hxx> #include <svx/xlnwtit.hxx> +#include <svx/xflclit.hxx> void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) { @@ -203,7 +204,7 @@ void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) namespace { - void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs) + void lcl_convertStringArguments(sal_uInt16 nSlot, std::unique_ptr<SfxItemSet>& pArgs) { Color aColor; OUString sColor; @@ -218,8 +219,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; + } + } } else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem)) { @@ -249,7 +264,7 @@ void SwDrawShell::ExecDrawAttrArgs(SfxRequest const & rReq) if(pView->AreObjectsMarked()) { std::unique_ptr<SfxItemSet> pNewArgs = pArgs->Clone(); - lcl_convertStringArguments(pNewArgs); + lcl_convertStringArguments(rReq.GetSlot(), pNewArgs); pView->SetAttrToMarked(*pNewArgs, false); } else |