From adff2373c512b8bd0d7dcd1688d0f19616b95c3e Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Fri, 8 Nov 2019 11:49:55 +0100 Subject: jsdialog: apply .uno:XLineColor in Impress MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I02bd0ce5d3b71e6acf28f56aead41abc76b42465 Reviewed-on: https://gerrit.libreoffice.org/82280 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos Reviewed-on: https://gerrit.libreoffice.org/82300 Tested-by: Jenkins --- sd/source/ui/view/drviews2.cxx | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'sd') 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 #include #include +#include #include @@ -541,6 +542,8 @@ namespace { void lcl_convertStringArguments(std::unique_ptr& 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(pItem)->GetValue(); + + if (sColor == "transparent") + aColor = COL_TRANSPARENT; + else + aColor = Color(sColor.toInt32(16)); + + XLineColorItem aLineColorItem(OUString(), aColor); + pArgs->Put(aLineColorItem); + } } } -- cgit