summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSzymon Kłos <szymon.klos@collabora.com>2019-11-08 11:49:55 +0100
committerSzymon Kłos <szymon.klos@collabora.com>2019-11-08 16:09:21 +0100
commitadff2373c512b8bd0d7dcd1688d0f19616b95c3e (patch)
tree2efa4d35e98a7d1869e206e3d259910dc5c5eca6
parent256e2a3de8af34e751a3fb8329f49f2f362342d1 (diff)
jsdialog: apply .uno:XLineColor in Impress
Change-Id: I02bd0ce5d3b71e6acf28f56aead41abc76b42465 Reviewed-on: https://gerrit.libreoffice.org/82280 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/82300 Tested-by: Jenkins
-rw-r--r--sd/source/ui/view/drviews2.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index cb25ccad181d..74ec6a3801ee 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -87,6 +87,7 @@
#include <svx/xlnstwit.hxx>
#include <svx/xlnwtit.hxx>
#include <svx/chrtitem.hxx>
+#include <svx/xlnclit.hxx>
#include <tools/diagnose_ex.h>
@@ -541,6 +542,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))
@@ -553,6 +556,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);
+ }
}
}