From b7793572647f147278a2f8bf23ccd06f17c7e155 Mon Sep 17 00:00:00 2001 From: Szymon Kłos Date: Thu, 7 Nov 2019 15:53:49 +0100 Subject: jsdialog: consume .uno:LineWidth double value MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: Iaf09dd11ae4fd6b3d9ebeabac790f0cfe73fec17 Reviewed-on: https://gerrit.libreoffice.org/82226 Tested-by: Jenkins CollaboraOffice Reviewed-by: Szymon Kłos --- sw/source/uibase/shells/drawdlg.cxx | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) (limited to 'sw') diff --git a/sw/source/uibase/shells/drawdlg.cxx b/sw/source/uibase/shells/drawdlg.cxx index 5a9bebc85659..5de7f6d0dbbf 100644 --- a/sw/source/uibase/shells/drawdlg.cxx +++ b/sw/source/uibase/shells/drawdlg.cxx @@ -35,6 +35,8 @@ #include #include #include +#include +#include void SwDrawShell::ExecDrawDlg(SfxRequest& rReq) { @@ -205,11 +207,11 @@ namespace { Color aColor; OUString sColor; - const SfxPoolItem* pColorStringItem = nullptr; + const SfxPoolItem* pItem = nullptr; - if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pColorStringItem)) + if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_COLOR_STR, false, &pItem)) { - sColor = static_cast(pColorStringItem)->GetValue(); + sColor = static_cast(pItem)->GetValue(); if (sColor == "transparent") aColor = COL_TRANSPARENT; @@ -219,6 +221,16 @@ namespace XLineColorItem aLineColorItem(OUString(), aColor); pArgs->Put(aLineColorItem); } + else if (SfxItemState::SET == pArgs->GetItemState(SID_ATTR_LINE_WIDTH_ARG, false, &pItem)) + { + double fValue = static_cast(pItem)->GetValue(); + // FIXME: different units... + int nPow = 100; + int nValue = fValue * nPow; + + XLineWidthItem aItem(nValue); + pArgs->Put(aItem); + } } } -- cgit