23 : m_xSpinButton(
std::move(pControl))
26 , bRelativeMode(false)
28 , bNegativeEnabled(false)
40 OUString
aStr = m_xSpinButton->get_text();
41 bool bNewMode = bRelative;
49 if( ( ( *pStr <
'0' ) || ( *pStr >
'9' ) ) &&
60 if (
aStr.indexOf(
"%" ) != -1 )
64 if ( bNewMode != bRelative )
65 SetRelative( bNewMode );
80 int nStartPos, nEndPos;
std::unique_ptr< weld::MetricSpinButton > m_xSpinButton
void EnableRelativeMode(sal_uInt16 nMin, sal_uInt16 nMax)
SvxRelativeField(std::unique_ptr< weld::MetricSpinButton > pControl)
void SetRelative(bool bRelative)
virtual void select_region(int nStartPos, int nEndPos)=0
virtual void set_text(const OUString &rText)=0
virtual void connect_changed(const Link< Entry &, void > &rLink)
virtual bool get_selection_bounds(int &rStartPos, int &rEndPos)=0
virtual OUString get_text() const=0
#define LINK(Instance, Class, Member)
IMPL_LINK_NOARG(SvxRelativeField, ModifyHdl, weld::Entry &, void)