LibreOffice Module vcl (master) 1
|
#include <field.hxx>
Public Member Functions | |
virtual | ~MetricFormatter () override |
virtual void | Reformat () override |
virtual void | SetUnit (FieldUnit meUnit) |
FieldUnit | GetUnit () const |
void | SetCustomUnitText (const OUString &rStr) |
const OUString & | GetCustomUnitText () const |
void | SetMax (sal_Int64 nNewMax, FieldUnit eInUnit) |
sal_Int64 | GetMax (FieldUnit eOutUnit) const |
void | SetMin (sal_Int64 nNewMin, FieldUnit eInUnit) |
sal_Int64 | GetMin (FieldUnit eOutUnit) const |
void | SetValue (sal_Int64 nNewValue, FieldUnit eInUnit) |
virtual void | SetValue (sal_Int64 nValue) override |
void | SetUserValue (sal_Int64 nNewValue, FieldUnit eInUnit) |
sal_Int64 | GetValue (FieldUnit eOutUnit) const |
virtual OUString | CreateFieldText (sal_Int64 nValue) const override |
sal_Int64 | GetCorrectedValue (FieldUnit eOutUnit) const |
void | SetMax (sal_Int64 nNewMax) |
sal_Int64 | GetMax () const |
void | SetMin (sal_Int64 nNewMin) |
sal_Int64 | GetMin () const |
void | SetUserValue (sal_Int64 nNewValue) |
sal_Int64 | GetValue () const |
![]() | |
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 | Reformat () |
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 | |
MetricFormatter (Edit *pEdit) | |
SAL_DLLPRIVATE void | ImplMetricReformat (const OUString &rStr, double &rValue, OUString &rOutStr) |
virtual sal_Int64 | GetValueFromString (const OUString &rStr) const override |
sal_Int64 | GetValueFromStringUnit (const OUString &rStr, FieldUnit eOutUnit) const |
![]() | |
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 | |
FieldUnit | meUnit |
![]() | |
sal_Int64 | mnLastValue |
sal_Int64 | mnMin |
sal_Int64 | mnMax |
bool | mbFormatting |
sal_Int64 | mnSpinSize |
sal_Int64 | mnFirst |
sal_Int64 | mnLast |
Private Attributes | |
OUString | maCustomUnitText |
|
protected |
|
overridevirtual |
Reimplemented from NumericFormatter.
Definition at line 1267 of file field.cxx.
References aStr, NumericFormatter::CreateFieldText(), unicode::formatPercent(), NumericFormatter::GetDecimalDigits(), FormatterBase::GetLanguageTag(), ImplMetricToString(), maCustomUnitText, meUnit, nValue, and u.
Referenced by ImplMetricReformat().
sal_Int64 MetricFormatter::GetCorrectedValue | ( | FieldUnit | eOutUnit | ) | const |
Definition at line 1395 of file field.cxx.
References vcl::ConvertValue(), NumericFormatter::GetDecimalDigits(), and meUnit.
|
inline |
|
inline |
Definition at line 103 of file field.hxx.
Referenced by MetricField::DumpAsPropertyTree(), ImplMetricReformat(), and MetricField::SetUnit().
sal_Int64 MetricFormatter::GetMax | ( | FieldUnit | eOutUnit | ) | const |
Definition at line 1368 of file field.cxx.
References vcl::ConvertValue(), NumericFormatter::GetDecimalDigits(), NumericFormatter::GetMax(), and meUnit.
|
inline |
Definition at line 101 of file field.hxx.
Referenced by MetricField::DumpAsPropertyTree(), ImplMetricReformat(), and MetricField::SetUnit().
sal_Int64 MetricFormatter::GetMin | ( | FieldUnit | eOutUnit | ) | const |
Definition at line 1356 of file field.cxx.
References vcl::ConvertValue(), NumericFormatter::GetDecimalDigits(), NumericFormatter::GetMin(), and meUnit.
|
inline |
Definition at line 171 of file field.hxx.
Referenced by MetricField::DumpAsPropertyTree().
sal_Int64 NumericFormatter::GetValue | ( | ) | const |
Definition at line 122 of file field.cxx.
Referenced by MetricField::DumpAsPropertyTree().
sal_Int64 MetricFormatter::GetValue | ( | FieldUnit | eOutUnit | ) | const |
Definition at line 1339 of file field.cxx.
References FormatterBase::GetField(), and GetValueFromStringUnit().
|
overrideprotectedvirtual |
Reimplemented from NumericFormatter.
Definition at line 1334 of file field.cxx.
References GetValueFromStringUnit().
|
protected |
Definition at line 1317 of file field.cxx.
References vcl::ConvertValue(), NumericFormatter::GetDecimalDigits(), FormatterBase::ImplGetLocaleDataWrapper(), meUnit, NumericFormatter::mnLastValue, NumericFormatter::mnMax, NumericFormatter::mnMin, and vcl::TextToValue().
Referenced by GetValue(), and GetValueFromString().
|
protected |
Definition at line 1220 of file field.cxx.
References CreateFieldText(), NumericFormatter::GetDecimalDigits(), GetMax(), GetMin(), FormatterBase::ImplGetLocaleDataWrapper(), meUnit, and vcl::TextToValue().
Referenced by Reformat(), and MetricBox::ReformatAll().
|
overridevirtual |
Reimplemented from NumericFormatter.
Definition at line 1374 of file field.cxx.
References aStr, FormatterBase::GetField(), Edit::GetText(), ImplMetricReformat(), FormatterBase::ImplSetText(), NumericFormatter::mnLastValue, and SetValue().
Referenced by MetricField::EventNotify(), MetricBox::EventNotify(), MetricBox::MetricBox(), MetricField::MetricField(), and MetricBox::ReformatAll().
void MetricFormatter::SetCustomUnitText | ( | const OUString & | rStr | ) |
Definition at line 1256 of file field.cxx.
References maCustomUnitText, and FormatterBase::ReformatAll().
void MetricFormatter::SetMax | ( | sal_Int64 | nNewMax, |
FieldUnit | eInUnit | ||
) |
Definition at line 1362 of file field.cxx.
References vcl::ConvertValue(), NumericFormatter::GetDecimalDigits(), meUnit, and NumericFormatter::SetMax().
Referenced by MetricField::SetUnit().
void MetricFormatter::SetMin | ( | sal_Int64 | nNewMin, |
FieldUnit | eInUnit | ||
) |
Definition at line 1350 of file field.cxx.
References vcl::ConvertValue(), NumericFormatter::GetDecimalDigits(), meUnit, and NumericFormatter::SetMin().
Referenced by MetricField::SetUnit().
|
virtual |
Reimplemented in MetricField.
Definition at line 1244 of file field.cxx.
References NumericFormatter::GetDecimalDigits(), meUnit, FormatterBase::ReformatAll(), and NumericFormatter::SetDecimalDigits().
Referenced by MetricField::SetUnit().
void NumericFormatter::SetUserValue | ( | sal_Int64 | nNewValue | ) |
void MetricFormatter::SetUserValue | ( | sal_Int64 | nNewValue, |
FieldUnit | eInUnit | ||
) |
Definition at line 1310 of file field.cxx.
References vcl::ConvertValue(), NumericFormatter::GetDecimalDigits(), meUnit, and NumericFormatter::SetUserValue().
Referenced by SetValue().
void MetricFormatter::SetValue | ( | sal_Int64 | nNewValue, |
FieldUnit | eInUnit | ||
) |
Definition at line 1262 of file field.cxx.
References SetUserValue().
Referenced by Reformat(), and SetValue().
|
overridevirtual |
Reimplemented from NumericFormatter.
Definition at line 1344 of file field.cxx.
References nValue, and SetValue().
|
private |
Definition at line 204 of file field.hxx.
Referenced by CreateFieldText(), and SetCustomUnitText().
|
protected |
Definition at line 194 of file field.hxx.
Referenced by CreateFieldText(), GetCorrectedValue(), MetricField::GetFirst(), MetricField::GetLast(), GetMax(), GetMin(), GetValueFromStringUnit(), ImplMetricReformat(), MetricField::SetFirst(), MetricField::SetLast(), SetMax(), SetMin(), SetUnit(), and SetUserValue().