21#include <com/sun/star/beans/NamedValue.hpp>
23#include <svx/strings.hrc>
30#include <bitmaps.hlst>
35 :
WeldToolbarPopup(nullptr, pParent,
"svx/ui/floatinglineproperty.ui",
"FloatingLineProperty")
43 , m_aIMGCusGray(
StockImage::
Yes, RID_SVXBMP_WIDTH_CUSTOM_GRAY)
44 , m_xMFWidth(m_xBuilder->weld_metric_spin_button(
"spin",
FieldUnit::
POINT))
46 , m_xVSWidthWin(new
weld::CustomWeld(*m_xBuilder,
"lineset", *m_xVSWidth))
63 for (
int i = 0;
i <= 7;
i++)
70 for (sal_uInt16
i = 1;
i <= 9; ++
i)
77 m_xVSWidth->SetItemData(1,
reinterpret_cast<void*
>(5));
78 m_xVSWidth->SetItemData(2,
reinterpret_cast<void*
>(8));
79 m_xVSWidth->SetItemData(3,
reinterpret_cast<void*
>(10));
80 m_xVSWidth->SetItemData(4,
reinterpret_cast<void*
>(15));
81 m_xVSWidth->SetItemData(5,
reinterpret_cast<void*
>(23));
82 m_xVSWidth->SetItemData(6,
reinterpret_cast<void*
>(30));
83 m_xVSWidth->SetItemData(7,
reinterpret_cast<void*
>(45));
84 m_xVSWidth->SetItemData(8,
reinterpret_cast<void*
>(60));
97 sal_uInt16 iPos = m_xVSWidth->GetSelectedItemId();
98 if (iPos >= 1 && iPos <= 8)
101 reinterpret_cast<sal_IntPtr
>(m_xVSWidth->GetItemData(iPos)), MapUnit::MapPoint,
103 nVal = m_xMFWidth->denormalize(nVal);
116 nVal = m_xMFWidth->denormalize(nVal);
123 m_xVSWidth->SetNoSelection();
124 m_xVSWidth->SetFormat();
125 m_xVSWidth->Invalidate();
130 if ((iPos >= 1 && iPos <= 8) || (iPos == 9 && m_bCustom))
138 if (m_xVSWidth->GetSelItem())
140 m_xVSWidth->SetSelItem(0);
141 m_xVSWidth->SetFormat();
142 m_xVSWidth->Invalidate();
146 sal_Int32 nNewWidth =
static_cast<short>(m_xMFWidth->denormalize(nVal));
156 SvtViewOptions aWinOpt(EViewType::Window,
"PopupPanel_LineWidth");
159 css::uno::Sequence<css::beans::NamedValue>
aSeq = aWinOpt.
GetUserData();
161 if (
aSeq.hasElements())
162 aSeq[0].Value >>= aTmp;
164 OUString aWinData(aTmp);
185 m_xMFWidth->set_value(nVal, FieldUnit::MM_100TH);
192 OUString strCurrValue =
m_xMFWidth->get_text();
static const AllSettings & GetSettings()
const OUString & getNumDecimalSep() const
SAL_WARN_UNUSED_RESULT Point LogicToLogic(const Point &rPtSource, const MapMode *pMapModeSource, const MapMode *pMapModeDest) const
css::uno::Sequence< css::beans::NamedValue > GetUserData() const
OUString SvxResId(TranslateId aId)
#define LINK(Instance, Class, Member)
Sequence< sal_Int8 > aSeq
const LocaleDataWrapper & GetLocaleDataWrapper(LanguageType nLang)
#define WB_NO_DIRECTSELECT