LibreOffice Module vcl (master)
1
|
#include <field.hxx>
Public Member Functions | |
virtual | ~NumericFormatter () override |
virtual void | Reformat () override |
void | SetMin (sal_Int64 nNewMin) |
sal_Int64 | GetMin () const |
void | SetMax (sal_Int64 nNewMax) |
sal_Int64 | GetMax () const |
sal_Int64 | ClipAgainstMinMax (sal_Int64 nValue) const |
void | SetFirst (sal_Int64 nNewFirst) |
sal_Int64 | GetFirst () const |
void | SetLast (sal_Int64 nNewLast) |
sal_Int64 | GetLast () const |
void | SetSpinSize (sal_Int64 nNewSize) |
sal_Int64 | GetSpinSize () const |
void | SetDecimalDigits (sal_uInt16 nDigits) |
sal_uInt16 | GetDecimalDigits () const |
void | SetUseThousandSep (bool b) |
bool | IsUseThousandSep () const |
void | SetUserValue (sal_Int64 nNewValue) |
virtual void | SetValue (sal_Int64 nNewValue) |
sal_Int64 | GetValue () const |
virtual OUString | CreateFieldText (sal_Int64 nValue) const |
sal_Int64 | Normalize (sal_Int64 nValue) const |
sal_Int64 | Denormalize (sal_Int64 nValue) const |
OUString | GetValueString () const |
void | SetValueFromString (const OUString &rStr) |
![]() | |
FormatterBase (Edit *pField) | |
virtual | ~FormatterBase () |
const LocaleDataWrapper & | GetLocaleDataWrapper () const |
bool | MustBeReformatted () const |
void | MarkToBeReformatted (bool b) |
void | SetStrictFormat (bool bStrict) |
bool | IsStrictFormat () const |
virtual void | ReformatAll () |
const css::lang::Locale & | GetLocale () const |
const LanguageTag & | GetLanguageTag () const |
void | SetEmptyFieldValue () |
bool | IsEmptyFieldValue () const |
void | EnableEmptyFieldValue (bool bEnable) |
bool | IsEmptyFieldValueEnabled () const |
Protected Member Functions | |
NumericFormatter (Edit *pEdit) | |
void | FieldUp () |
void | FieldDown () |
void | FieldFirst () |
void | FieldLast () |
void | FormatValue (Selection const *pNewSelection=nullptr) |
SAL_DLLPRIVATE void | ImplNumericReformat () |
SAL_DLLPRIVATE void | ImplNewFieldValue (sal_Int64 nNewValue) |
SAL_DLLPRIVATE void | ImplSetUserValue (sal_Int64 nNewValue, Selection const *pNewSelection=nullptr) |
virtual sal_Int64 | GetValueFromString (const OUString &rStr) const |
![]() | |
SAL_DLLPRIVATE void | ImplSetText (const OUString &rText, Selection const *pNewSel=nullptr) |
SAL_DLLPRIVATE bool | ImplGetEmptyFieldValue () const |
void | SetEmptyFieldValueData (bool bValue) |
SAL_DLLPRIVATE LocaleDataWrapper & | ImplGetLocaleDataWrapper () const |
SAL_DLLPRIVATE void | ImplResetLocaleDataWrapper () const |
reset the LocaleDataWrapper when the language tag changes More... | |
Edit * | GetField () const |
void | ClearField () |
Protected Attributes | |
sal_Int64 | mnLastValue |
sal_Int64 | mnMin |
sal_Int64 | mnMax |
bool | mbFormatting |
sal_Int64 | mnSpinSize |
sal_Int64 | mnFirst |
sal_Int64 | mnLast |
Private Attributes | |
sal_uInt16 | mnDecimalDigits |
bool | mbThousandSep |
|
protected |
Definition at line 555 of file field.cxx.
References false, FormatterBase::ReformatAll(), and SAL_MAX_INT32.
sal_Int64 NumericFormatter::ClipAgainstMinMax | ( | sal_Int64 | nValue | ) | const |
Definition at line 780 of file field.cxx.
Referenced by FieldDown(), FieldUp(), GetValueFromString(), and ImplSetUserValue().
|
virtual |
Reimplemented in MetricFormatter.
Definition at line 609 of file field.cxx.
References GetDecimalDigits(), LocaleDataWrapper::getNum(), FormatterBase::ImplGetLocaleDataWrapper(), and IsUseThousandSep().
Referenced by MetricFormatter::CreateFieldText(), and FormatValue().
sal_Int64 NumericFormatter::Denormalize | ( | sal_Int64 | nValue | ) | const |
Definition at line 676 of file field.cxx.
References GetDecimalDigits(), SAL_MAX_INT64, and SAL_MIN_INT64.
Referenced by MetricField::SetUnit().
|
protected |
Definition at line 723 of file field.cxx.
References ClipAgainstMinMax(), GetValue(), ImplNewFieldValue(), and mnSpinSize.
Referenced by MetricField::Down().
|
protected |
Definition at line 737 of file field.cxx.
References ImplNewFieldValue(), and mnFirst.
Referenced by MetricField::First().
|
protected |
Definition at line 742 of file field.cxx.
References ImplNewFieldValue(), and mnLast.
Referenced by MetricField::Last().
|
protected |
Definition at line 709 of file field.cxx.
References ClipAgainstMinMax(), GetValue(), ImplNewFieldValue(), and mnSpinSize.
Referenced by MetricField::Up().
Definition at line 542 of file field.cxx.
References CreateFieldText(), FormatterBase::ImplSetText(), mbFormatting, and mnLastValue.
Referenced by ImplNumericReformat(), and ImplSetUserValue().
|
inline |
Definition at line 115 of file field.hxx.
Referenced by CreateFieldText(), MetricFormatter::CreateFieldText(), Denormalize(), MetricField::DumpAsPropertyTree(), MetricFormatter::GetCorrectedValue(), MetricField::GetFirst(), MetricField::GetLast(), MetricFormatter::GetMax(), MetricFormatter::GetMin(), GetValueFromString(), MetricFormatter::GetValueFromStringUnit(), GetValueString(), MetricFormatter::ImplMetricReformat(), VclBuilder::mungeAdjustment(), Normalize(), MetricField::SetFirst(), MetricField::SetLast(), MetricFormatter::SetMax(), MetricFormatter::SetMin(), MetricFormatter::SetUnit(), MetricFormatter::SetUserValue(), and SetValueFromString().
|
inline |
Definition at line 108 of file field.hxx.
Referenced by MetricField::SetUnit().
|
inline |
Definition at line 110 of file field.hxx.
Referenced by MetricField::SetUnit().
|
inline |
Definition at line 103 of file field.hxx.
Referenced by MetricField::DumpAsPropertyTree(), MetricFormatter::GetMax(), MetricFormatter::ImplMetricReformat(), and MetricField::SetUnit().
|
inline |
Definition at line 101 of file field.hxx.
Referenced by MetricField::DumpAsPropertyTree(), MetricFormatter::GetMin(), MetricFormatter::ImplMetricReformat(), and MetricField::SetUnit().
sal_Int64 NumericFormatter::GetValue | ( | ) | const |
Definition at line 663 of file field.cxx.
References FormatterBase::GetField(), GetValueFromString(), mbFormatting, and mnLastValue.
Referenced by MetricField::DumpAsPropertyTree(), FieldDown(), FieldUp(), GetValueString(), and ImplNumericReformat().
|
protectedvirtual |
Reimplemented in MetricFormatter.
Definition at line 628 of file field.cxx.
References ClipAgainstMinMax(), GetDecimalDigits(), FormatterBase::ImplGetLocaleDataWrapper(), and mnLastValue.
Referenced by GetValue().
OUString NumericFormatter::GetValueString | ( | ) | const |
Definition at line 641 of file field.cxx.
References GetDecimalDigits(), AllSettings::GetNeutralLocaleDataWrapper(), Application::GetSettings(), and GetValue().
Referenced by MetricFieldUIObject::get_state().
|
protected |
Definition at line 747 of file field.cxx.
References FormatterBase::GetField(), Edit::GetSelection(), Edit::GetText(), ImplSetUserValue(), Selection::Justify(), Selection::Len(), Selection::Max(), Selection::Min(), mnLastValue, Edit::Modify(), SELECTION_MAX, and Edit::SetModifyFlag().
Referenced by FieldDown(), FieldFirst(), FieldLast(), FieldUp(), and SetValueFromString().
|
protected |
Definition at line 549 of file field.cxx.
References FormatValue(), GetValue(), and mnLastValue.
Referenced by Reformat().
|
protected |
Definition at line 614 of file field.cxx.
References ClipAgainstMinMax(), FormatValue(), FormatterBase::GetField(), and mnLastValue.
Referenced by ImplNewFieldValue(), and SetUserValue().
|
inline |
Definition at line 118 of file field.hxx.
Referenced by CreateFieldText(), MetricField::PreNotify(), and MetricBox::PreNotify().
sal_Int64 NumericFormatter::Normalize | ( | sal_Int64 | nValue | ) | const |
Definition at line 671 of file field.cxx.
References GetDecimalDigits().
Referenced by MetricField::SetUnit().
|
overridevirtual |
Reimplemented from FormatterBase.
Reimplemented in MetricFormatter.
Definition at line 698 of file field.cxx.
References FormatterBase::GetField(), FormatterBase::ImplGetEmptyFieldValue(), and ImplNumericReformat().
void NumericFormatter::SetDecimalDigits | ( | sal_uInt16 | nDigits | ) |
Definition at line 597 of file field.cxx.
References mnDecimalDigits, and FormatterBase::ReformatAll().
Referenced by MetricField::set_property(), and MetricFormatter::SetUnit().
|
inline |
Definition at line 107 of file field.hxx.
Referenced by VclBuilder::mungeAdjustment().
|
inline |
Definition at line 109 of file field.hxx.
Referenced by VclBuilder::mungeAdjustment().
void NumericFormatter::SetMax | ( | sal_Int64 | nNewMax | ) |
Definition at line 584 of file field.cxx.
References FormatterBase::IsEmptyFieldValue(), mnMax, and FormatterBase::ReformatAll().
Referenced by VclBuilder::mungeAdjustment(), and MetricFormatter::SetMax().
void NumericFormatter::SetMin | ( | sal_Int64 | nNewMin | ) |
Definition at line 577 of file field.cxx.
References FormatterBase::IsEmptyFieldValue(), mnMin, and FormatterBase::ReformatAll().
Referenced by VclBuilder::mungeAdjustment(), and MetricFormatter::SetMin().
|
inline |
Definition at line 111 of file field.hxx.
Referenced by VclBuilder::mungeAdjustment(), and MetricField::set_property().
void NumericFormatter::SetUserValue | ( | sal_Int64 | nNewValue | ) |
Definition at line 623 of file field.cxx.
References ImplSetUserValue().
Referenced by MetricFormatter::SetUserValue(), and SetValue().
void NumericFormatter::SetUseThousandSep | ( | bool | b | ) |
Definition at line 591 of file field.cxx.
References mbThousandSep, and FormatterBase::ReformatAll().
|
virtual |
Reimplemented in MetricFormatter.
Definition at line 603 of file field.cxx.
References FormatterBase::SetEmptyFieldValueData(), and SetUserValue().
Referenced by VclBuilder::mungeAdjustment().
void NumericFormatter::SetValueFromString | ( | const OUString & | rStr | ) |
Definition at line 648 of file field.cxx.
References GetDecimalDigits(), Application::GetSettings(), ImplNewFieldValue(), and SAL_WARN.
Referenced by MetricFieldUIObject::execute().
|
protected |
Definition at line 135 of file field.hxx.
Referenced by FormatValue(), and GetValue().
|
private |
Definition at line 159 of file field.hxx.
Referenced by SetUseThousandSep().
|
private |
Definition at line 158 of file field.hxx.
Referenced by SetDecimalDigits().
|
protected |
Definition at line 140 of file field.hxx.
Referenced by FieldFirst(), MetricField::GetFirst(), and MetricField::SetFirst().
|
protected |
Definition at line 141 of file field.hxx.
Referenced by FieldLast(), MetricField::GetLast(), and MetricField::SetLast().
|
protected |
Definition at line 132 of file field.hxx.
Referenced by FormatValue(), GetValue(), GetValueFromString(), MetricFormatter::GetValueFromStringUnit(), ImplNewFieldValue(), ImplNumericReformat(), ImplSetUserValue(), and MetricFormatter::Reformat().
|
protected |
Definition at line 134 of file field.hxx.
Referenced by ClipAgainstMinMax(), MetricFormatter::GetValueFromStringUnit(), and SetMax().
|
protected |
Definition at line 133 of file field.hxx.
Referenced by ClipAgainstMinMax(), MetricFormatter::GetValueFromStringUnit(), and SetMin().
|
protected |
Definition at line 139 of file field.hxx.
Referenced by FieldDown(), and FieldUp().