summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-08 13:29:13 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-08 15:01:38 +0100
commit506d2abdd6f68a9f6d895d3aadb06b40b05624c5 (patch)
tree5852561c938fbef0e20e96764ac9d648fadf2f70 /sc
parent5086d318b4c737814086e8a28ebe8311f1d08eee (diff)
jsdialogs: apply .uno:FillColor in Calc
Change-Id: I7cbd447c8a66f9240d6a093c9ab24a7c2dbb2024 Reviewed-on: https://gerrit.libreoffice.org/82293 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sc')
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx23
1 files changed, 19 insertions, 4 deletions
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index 8f0a955940b2..c8a17511143c 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -62,12 +62,13 @@
#include <svx/xlnwtit.hxx>
#include <svx/chrtitem.hxx>
#include <svx/xlnclit.hxx>
+#include <svx/xflclit.hxx>
SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)
namespace
{
- void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs)
+ void lcl_convertStringArguments(sal_uInt16 nSlot, std::unique_ptr<SfxItemSet>& pArgs)
{
Color aColor;
OUString sColor;
@@ -92,8 +93,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;
+ }
+ }
}
}
}
@@ -244,7 +259,7 @@ void ScDrawShell::ExecDrawAttr( SfxRequest& rReq )
if( pView->AreObjectsMarked() )
{
std::unique_ptr<SfxItemSet> pNewArgs = rReq.GetArgs()->Clone();
- lcl_convertStringArguments( pNewArgs );
+ lcl_convertStringArguments( rReq.GetSlot(), pNewArgs );
pView->SetAttrToMarked( *pNewArgs, false );
}
else