diff options
author | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-07 15:53:49 +0100 |
---|---|---|
committer | Szymon Kłos <szymon.klos@collabora.com> | 2019-11-07 16:48:29 +0100 |
commit | b7793572647f147278a2f8bf23ccd06f17c7e155 (patch) | |
tree | 0b6afd8f85d7450a036d451b778a45ba60a5abc4 /sw | |
parent | fb974bc968b3a1a95f8e621776076522ec719dc6 (diff) |
jsdialog: consume .uno:LineWidth double value
Change-Id: Iaf09dd11ae4fd6b3d9ebeabac790f0cfe73fec17
Reviewed-on: https://gerrit.libreoffice.org/82226
Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com>
Reviewed-by: Szymon Kłos <szymon.klos@collabora.com>
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/uibase/shells/drawdlg.cxx | 18 |
1 files changed, 15 insertions, 3 deletions
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 <memory> #include <svl/stritem.hxx> #include <svx/xlnclit.hxx> +#include <svx/chrtitem.hxx> +#include <svx/xlnwtit.hxx> 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<const SfxStringItem*>(pColorStringItem)->GetValue(); + sColor = static_cast<const SfxStringItem*>(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<const SvxDoubleItem*>(pItem)->GetValue(); + // FIXME: different units... + int nPow = 100; + int nValue = fValue * nPow; + + XLineWidthItem aItem(nValue); + pArgs->Put(aItem); + } } } |