summaryrefslogtreecommitdiff
path: root/sw
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-10-31 11:49:22 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-10-31 14:27:03 +0100
commitb7eeb8b03035dd0be715fa90bcbd8b151bc99871 (patch)
tree0a16fc2a4135ba82bea70e487c32ad384ad77f2e /sw
parentcaa3c5308237faec2635fafc2345d0b0438dd857 (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>
Diffstat (limited to 'sw')
-rw-r--r--sw/source/uibase/shells/drawdlg.cxx23
1 files changed, 19 insertions, 4 deletions
diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx
index 2c5a923e5983..a16ac67c016b 100644
--- a/sw/source/uibase/shells/drawdlg.cxx
+++ b/sw/source/uibase/shells/drawdlg.cxx
@@ -36,6 +36,7 @@
#include <memory>
#include <svl/stritem.hxx>
#include <svx/xlnclit.hxx>
+#include <svx/xflclit.hxx>
void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
{
@@ -204,7 +205,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;
@@ -219,8 +220,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;
+ }
+ }
}
}
}
@@ -240,7 +255,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