19#ifndef INCLUDED_SW_SOURCE_UIBASE_INC_PRCNTFLD_HXX
20#define INCLUDED_SW_SOURCE_UIBASE_INC_PRCNTFLD_HXX
28 std::unique_ptr<weld::MetricSpinButton>
m_pField;
42 SAL_DLLPRIVATE
static int ImpPower10(sal_uInt16 n);
52 void show() { m_pField->show(); }
53 bool has_focus()
const {
return m_pField->has_focus(); }
56 void set_text(
const OUString& rStr) { m_pField->set_text(rStr); }
60 void SetMetricFieldRange(sal_Int64 nNewMin, sal_Int64 nNewMax) { m_pField->set_range(nNewMin, nNewMax, FieldUnit::NONE); }
61 void GetMetricFieldRange(sal_Int64 &rOldMin, sal_Int64& rOldMax)
const { m_pField->get_range(rOldMin, rOldMax, FieldUnit::NONE); }
63 void set_value(sal_Int64 nNewValue,
FieldUnit eInUnit = FieldUnit::NONE);
64 sal_Int64 get_value(
FieldUnit eOutUnit = FieldUnit::NONE);
66 void set_min(sal_Int64 nNewMin,
FieldUnit eInUnit);
67 void set_max(sal_Int64 nNewMax,
FieldUnit eInUnit);
69 sal_Int64
get_min(
FieldUnit eOutUnit = FieldUnit::NONE)
const {
return m_pField->get_min(eOutUnit); }
71 sal_Int64 NormalizePercent(sal_Int64 nValue);
72 sal_Int64 DenormalizePercent(sal_Int64 nValue);
74 void SetRefValue(sal_Int64 nValue);
75 sal_Int64 GetRealValue(
FieldUnit eOutUnit);
79 void ShowPercent(
bool bPercent);
void set_text(const OUString &rStr)
const weld::MetricSpinButton * get() const
void SetMetric(FieldUnit eUnit)
void SetMetricFieldMax(sal_Int64 nNewMax)
sal_Int64 get_min(FieldUnit eOutUnit=FieldUnit::NONE) const
void LockAutoCalculation(bool bLock)
void SetMetricFieldRange(sal_Int64 nNewMin, sal_Int64 nNewMax)
void connect_value_changed(const Link< weld::MetricSpinButton &, void > &rLink)
void SetMetricFieldMin(sal_Int64 nNewMin)
void set_sensitive(bool bEnable)
void set_accessible_name(const OUString &rStr)
std::unique_ptr< weld::MetricSpinButton > m_pField
bool m_bLockAutoCalculation
weld::MetricSpinButton * get()
void GetMetricFieldRange(sal_Int64 &rOldMin, sal_Int64 &rOldMax) const
bool get_value_changed_from_saved() const