summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-08 11:45:26 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-08 15:17:12 +0100
commit145672243d16a827dfd14a7b4e5cc0b7dd6f8751 (patch)
tree8c6e357eb406384c447eb58df8f86203ff60400a
parentca92ab3fbe78e9f2f8f127106a17fe61e16f2ba1 (diff)
jsdialog: apply .uno:XLineColor in Calc
Change-Id: I6951241444a3dec4f81bcd121b5c2917895456a3 Reviewed-on: https://gerrit.libreoffice.org/82279 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/82289 Tested-by: Szymon Kłos <szymon.klos@collabora.com>
-rw-r--r--sc/source/ui/drawfunc/drawsh.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sc/source/ui/drawfunc/drawsh.cxx b/sc/source/ui/drawfunc/drawsh.cxx
index decc6798466f..9e20ab1ced56 100644
--- a/sc/source/ui/drawfunc/drawsh.cxx
+++ b/sc/source/ui/drawfunc/drawsh.cxx
@@ -55,6 +55,7 @@
#include <memory>
#include <svx/xlnwtit.hxx>
#include <svx/chrtitem.hxx>
+#include <svx/xlnclit.hxx>
SFX_IMPL_INTERFACE(ScDrawShell, SfxShell)
@@ -62,6 +63,8 @@ namespace
{
void lcl_convertStringArguments(std::unique_ptr<SfxItemSet>& pArgs)
{
+ Color aColor;
+ OUString sColor;
const SfxPoolItem* pItem = nullptr;
if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem))
@@ -74,6 +77,18 @@ namespace
XLineWidthItem aItem(nValue);
pArgs->Put(aItem);
}
+ else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem))
+ {
+ sColor = static_cast<const SfxStringItem*>(pItem)->GetValue();
+
+ if (sColor == "transparent")
+ aColor = COL_TRANSPARENT;
+ else
+ aColor = Color(sColor.toInt32(16));
+
+ XLineColorItem aLineColorItem(OUString(), aColor);
+ pArgs->Put(aLineColorItem);
+ }
}
}