summaryrefslogtreecommitdiff
path: root/sc
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-12-09 14:47:09 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-12-10 11:07:52 +0100
commit570834b55ff7303ca977f0e6d6a03f2d8cb4ee68 (patch)
tree482ccca8a0020a4a8f00b6c0dca9dd9636f306e1 /sc
parente7a38270abd5c16af2a28055688d9998e958b127 (diff)
jsdialog: apply FillGradient with JSON arg
Change-Id: I0ca53a53ff53e66d2f25ad4eb13305edbc3aaa12 Reviewed-on: https://gerrit.libreoffice.org/84749 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.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index c8a17511143c..70623818ef29 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -63,6 +63,7 @@
#include <svx/chrtitem.hxx>
#include <svx/xlnclit.hxx>
#include <svx/xflclit.hxx>
+#include <svx/xflgrit.hxx>
SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)
@@ -110,6 +111,16 @@ namespace
}
}
}
+ if (SfxItemState::SET == pArgs->GetItemState(SID_FILL_GRADIENT_JSON, false, &pItem))
+ {
+ const SfxStringItem* pJSON = static_cast<const SfxStringItem*>(pItem);
+ if (pJSON)
+ {
+ XGradient aGradient = XGradient::fromJSON(pJSON->GetValue());
+ XFillGradientItem aItem(aGradient);
+ pArgs->Put(aItem);
+ }
+ }
}
}