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> Reviewed-on: https://gerrit.libreoffice.org/82234 Tested-by: Jenkins
This commit is contained in:
@@ -326,6 +326,7 @@ class SvxSetItem;
|
|||||||
#define SID_DIALOG_TESTMODE ( SID_SVX_START + 200 )
|
#define SID_DIALOG_TESTMODE ( SID_SVX_START + 200 )
|
||||||
#define SID_FRAME_LINESTYLE TypedWhichId<SvxLineItem>( SID_SVX_START + 201 )
|
#define SID_FRAME_LINESTYLE TypedWhichId<SvxLineItem>( SID_SVX_START + 201 )
|
||||||
#define SID_FRAME_LINECOLOR TypedWhichId<SvxColorItem>( SID_SVX_START + 202 )
|
#define SID_FRAME_LINECOLOR TypedWhichId<SvxColorItem>( SID_SVX_START + 202 )
|
||||||
|
#define SID_ATTR_LINE_WIDTH_ARG ( SID_SVX_START + 203 )
|
||||||
#define SID_SEARCHDLG_SEARCHSTRINGS ( SID_SVX_START + 215 )
|
#define SID_SEARCHDLG_SEARCHSTRINGS ( SID_SVX_START + 215 )
|
||||||
#define SID_SEARCHDLG_REPLACESTRINGS ( SID_SVX_START + 216 )
|
#define SID_SEARCHDLG_REPLACESTRINGS ( SID_SVX_START + 216 )
|
||||||
#define SID_ATTR_TABLE ( SID_SVX_START + 217 )
|
#define SID_ATTR_TABLE ( SID_SVX_START + 217 )
|
||||||
|
@@ -5633,7 +5633,7 @@ SvxLineItem LineStyle SID_FRAME_LINESTYLE
|
|||||||
|
|
||||||
|
|
||||||
XLineWidthItem LineWidth SID_ATTR_LINE_WIDTH
|
XLineWidthItem LineWidth SID_ATTR_LINE_WIDTH
|
||||||
|
(SvxDoubleItem Width SID_ATTR_LINE_WIDTH_ARG, XLineWidthItem LineWidth SID_ATTR_LINE_WIDTH)
|
||||||
[
|
[
|
||||||
AutoUpdate = TRUE,
|
AutoUpdate = TRUE,
|
||||||
FastCall = FALSE,
|
FastCall = FALSE,
|
||||||
|
@@ -37,6 +37,8 @@
|
|||||||
#include <svl/stritem.hxx>
|
#include <svl/stritem.hxx>
|
||||||
#include <svx/xlnclit.hxx>
|
#include <svx/xlnclit.hxx>
|
||||||
#include <svx/xflclit.hxx>
|
#include <svx/xflclit.hxx>
|
||||||
|
#include <svx/chrtitem.hxx>
|
||||||
|
#include <svx/xlnwtit.hxx>
|
||||||
|
|
||||||
void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
|
void SwDrawShell::ExecDrawDlg(SfxRequest& rReq)
|
||||||
{
|
{
|
||||||
@@ -209,11 +211,11 @@ namespace
|
|||||||
{
|
{
|
||||||
Color aColor;
|
Color aColor;
|
||||||
OUString sColor;
|
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")
|
if (sColor == "transparent")
|
||||||
aColor = COL_TRANSPARENT;
|
aColor = COL_TRANSPARENT;
|
||||||
@@ -237,6 +239,16 @@ namespace
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user