LibreOffice Module vcl (master)  1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
NumericFormatter Class Reference

#include <field.hxx>

Inheritance diagram for NumericFormatter:
[legend]
Collaboration diagram for NumericFormatter:
[legend]

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 SetShowTrailingZeros (bool bShowTrailingZeros)
 
bool IsShowTrailingZeros () const
 
void SetUserValue (sal_Int64 nNewValue)
 
virtual void SetValue (sal_Int64 nNewValue)
 
sal_Int64 GetValue () const
 
virtual OUString CreateFieldText (sal_Int64 nValue) const
 
bool IsValueModified () const
 
sal_Int64 Normalize (sal_Int64 nValue) const
 
sal_Int64 Denormalize (sal_Int64 nValue) const
 
- Public Member Functions inherited from FormatterBase
 FormatterBase (Edit *pField)
 
virtual ~FormatterBase ()
 
const LocaleDataWrapperGetLocaleDataWrapper () 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 LanguageTagGetLanguageTag () 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
 
- Protected Member Functions inherited from FormatterBase
SAL_DLLPRIVATE void ImplSetText (const OUString &rText, Selection const *pNewSel=nullptr)
 
SAL_DLLPRIVATE bool ImplGetEmptyFieldValue () const
 
void SetEmptyFieldValueData (bool bValue)
 
SAL_DLLPRIVATE LocaleDataWrapperImplGetLocaleDataWrapper () const
 
EditGetField () const
 
void ClearField ()
 

Protected Attributes

sal_Int64 mnFieldValue
 
sal_Int64 mnLastValue
 
sal_Int64 mnMin
 
sal_Int64 mnMax
 
bool mbWrapOnLimits
 
bool mbFormatting
 
sal_Int64 mnSpinSize
 
sal_Int64 mnFirst
 
sal_Int64 mnLast
 

Private Member Functions

SAL_DLLPRIVATE void ImplInit ()
 

Private Attributes

sal_uInt16 mnDecimalDigits
 
bool mbThousandSep
 
bool mbShowTrailingZeros
 

Detailed Description

Definition at line 118 of file field.hxx.

Constructor & Destructor Documentation

NumericFormatter::~NumericFormatter ( )
overridevirtual

Definition at line 566 of file field.cxx.

NumericFormatter::NumericFormatter ( Edit pEdit)
protected

Definition at line 560 of file field.cxx.

References ImplInit().

Member Function Documentation

sal_Int64 NumericFormatter::ClipAgainstMinMax ( sal_Int64  nValue) const
OUString NumericFormatter::CreateFieldText ( sal_Int64  nValue) const
virtual
sal_Int64 NumericFormatter::Denormalize ( sal_Int64  nValue) const

Definition at line 668 of file field.cxx.

References GetDecimalDigits(), SAL_MAX_INT64, and SAL_MIN_INT64.

Referenced by MetricField::SetUnit().

void NumericFormatter::FieldDown ( )
protected
void NumericFormatter::FieldFirst ( )
protected

Definition at line 729 of file field.cxx.

References ImplNewFieldValue(), and mnFirst.

Referenced by NumericField::First(), MetricField::First(), and CurrencyField::First().

void NumericFormatter::FieldLast ( )
protected

Definition at line 734 of file field.cxx.

References ImplNewFieldValue(), and mnLast.

Referenced by NumericField::Last(), MetricField::Last(), and CurrencyField::Last().

void NumericFormatter::FieldUp ( )
protected
void NumericFormatter::FormatValue ( Selection const *  pNewSelection = nullptr)
protected
sal_uInt16 NumericFormatter::GetDecimalDigits ( ) const
inline
sal_Int64 NumericFormatter::GetFirst ( ) const
inline

Definition at line 133 of file field.hxx.

Referenced by MetricField::SetUnit().

sal_Int64 NumericFormatter::GetLast ( ) const
inline

Definition at line 135 of file field.hxx.

Referenced by MetricField::SetUnit().

sal_Int64 NumericFormatter::GetMax ( ) const
inline
sal_Int64 NumericFormatter::GetMin ( ) const
inline
sal_Int64 NumericFormatter::GetSpinSize ( ) const
inline

Definition at line 137 of file field.hxx.

sal_Int64 NumericFormatter::GetValue ( ) const
sal_Int64 NumericFormatter::GetValueFromString ( const OUString &  rStr) const
protectedvirtual
void NumericFormatter::ImplInit ( )
private
void NumericFormatter::ImplNewFieldValue ( sal_Int64  nNewValue)
protected
void NumericFormatter::ImplNumericReformat ( )
protected

Definition at line 532 of file field.cxx.

References FormatValue(), GetValue(), and mnLastValue.

Referenced by Reformat(), and NumericBox::ReformatAll().

void NumericFormatter::ImplSetUserValue ( sal_Int64  nNewValue,
Selection const *  pNewSelection = nullptr 
)
protected

Definition at line 618 of file field.cxx.

References ClipAgainstMinMax(), FormatValue(), FormatterBase::GetField(), and mnLastValue.

Referenced by ImplNewFieldValue(), and SetUserValue().

bool NumericFormatter::IsShowTrailingZeros ( ) const
inline

Definition at line 146 of file field.hxx.

Referenced by CreateFieldText().

bool NumericFormatter::IsUseThousandSep ( ) const
inline
bool NumericFormatter::IsValueModified ( ) const
sal_Int64 NumericFormatter::Normalize ( sal_Int64  nValue) const

Definition at line 663 of file field.cxx.

References GetDecimalDigits().

Referenced by MetricField::SetUnit().

void NumericFormatter::Reformat ( )
overridevirtual
void NumericFormatter::SetDecimalDigits ( sal_uInt16  nDigits)
void NumericFormatter::SetFirst ( sal_Int64  nNewFirst)
inline

Definition at line 132 of file field.hxx.

Referenced by VclBuilder::mungeAdjustment().

void NumericFormatter::SetLast ( sal_Int64  nNewLast)
inline

Definition at line 134 of file field.hxx.

Referenced by VclBuilder::mungeAdjustment().

void NumericFormatter::SetMax ( sal_Int64  nNewMax)
void NumericFormatter::SetMin ( sal_Int64  nNewMin)
void NumericFormatter::SetShowTrailingZeros ( bool  bShowTrailingZeros)

Definition at line 596 of file field.cxx.

References mbShowTrailingZeros, and FormatterBase::ReformatAll().

void NumericFormatter::SetSpinSize ( sal_Int64  nNewSize)
inline
void NumericFormatter::SetUserValue ( sal_Int64  nNewValue)

Definition at line 627 of file field.cxx.

References ImplSetUserValue().

Referenced by MetricFormatter::SetUserValue(), SetValue(), and CurrencyFormatter::SetValue().

void NumericFormatter::SetUseThousandSep ( bool  b)

Definition at line 584 of file field.cxx.

References mbThousandSep, and FormatterBase::ReformatAll().

void NumericFormatter::SetValue ( sal_Int64  nNewValue)
virtual

Member Data Documentation

bool NumericFormatter::mbFormatting
protected

Definition at line 163 of file field.hxx.

Referenced by FormatValue(), GetValue(), and ImplInit().

bool NumericFormatter::mbShowTrailingZeros
private

Definition at line 190 of file field.hxx.

Referenced by ImplInit(), and SetShowTrailingZeros().

bool NumericFormatter::mbThousandSep
private

Definition at line 189 of file field.hxx.

Referenced by ImplInit(), and SetUseThousandSep().

bool NumericFormatter::mbWrapOnLimits
protected

Definition at line 162 of file field.hxx.

Referenced by ClipAgainstMinMax(), ImplInit(), and NumericField::set_property().

sal_uInt16 NumericFormatter::mnDecimalDigits
private

Definition at line 188 of file field.hxx.

Referenced by ImplInit(), and SetDecimalDigits().

sal_Int64 NumericFormatter::mnFieldValue
protected
sal_Int64 NumericFormatter::mnFirst
protected

Definition at line 168 of file field.hxx.

Referenced by FieldFirst(), MetricField::GetFirst(), ImplInit(), and MetricField::SetFirst().

sal_Int64 NumericFormatter::mnLast
protected

Definition at line 169 of file field.hxx.

Referenced by FieldLast(), MetricField::GetLast(), ImplInit(), and MetricField::SetLast().

sal_Int64 NumericFormatter::mnLastValue
protected
sal_Int64 NumericFormatter::mnMax
protected
sal_Int64 NumericFormatter::mnMin
protected
sal_Int64 NumericFormatter::mnSpinSize
protected

Definition at line 167 of file field.hxx.

Referenced by FieldDown(), FieldUp(), and ImplInit().


The documentation for this class was generated from the following files: