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

#include <field.hxx>

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

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
 

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
 

Protected Attributes

FieldUnit meUnit
 

Private Attributes

OUString maCustomUnitText
 

Detailed Description

Definition at line 163 of file field.hxx.

Constructor & Destructor Documentation

◆ ~MetricFormatter()

MetricFormatter::~MetricFormatter ( )
overridevirtual

Definition at line 1237 of file field.cxx.

◆ MetricFormatter()

MetricFormatter::MetricFormatter ( Edit pEdit)
protected

Definition at line 1231 of file field.cxx.

References NONE.

Member Function Documentation

◆ CreateFieldText()

OUString MetricFormatter::CreateFieldText ( sal_Int64  nValue) const
overridevirtual

Definition at line 1264 of file field.cxx.

References aStr, unicode::formatPercent(), ImplMetricToString(), maCustomUnitText, meUnit, nValue, and u.

Referenced by ImplMetricReformat().

◆ GetCorrectedValue()

sal_Int64 MetricFormatter::GetCorrectedValue ( FieldUnit  eOutUnit) const

Definition at line 1392 of file field.cxx.

References vcl::ConvertValue(), and meUnit.

◆ GetCustomUnitText()

const OUString & MetricFormatter::GetCustomUnitText ( ) const
inline

Definition at line 173 of file field.hxx.

◆ GetMax()

sal_Int64 MetricFormatter::GetMax ( FieldUnit  eOutUnit) const

◆ GetMin()

sal_Int64 MetricFormatter::GetMin ( FieldUnit  eOutUnit) const

◆ GetUnit()

FieldUnit MetricFormatter::GetUnit ( ) const
inline

Definition at line 171 of file field.hxx.

Referenced by MetricField::DumpAsPropertyTree().

◆ GetValue()

sal_Int64 MetricFormatter::GetValue ( FieldUnit  eOutUnit) const

Definition at line 1336 of file field.cxx.

References GetValueFromStringUnit().

Referenced by MetricField::DumpAsPropertyTree().

◆ GetValueFromString()

sal_Int64 MetricFormatter::GetValueFromString ( const OUString &  rStr) const
overrideprotectedvirtual

Definition at line 1331 of file field.cxx.

References GetValueFromStringUnit().

◆ GetValueFromStringUnit()

sal_Int64 MetricFormatter::GetValueFromStringUnit ( const OUString &  rStr,
FieldUnit  eOutUnit 
) const
protected

Definition at line 1314 of file field.cxx.

References vcl::ConvertValue(), meUnit, and vcl::TextToValue().

Referenced by GetValue(), and GetValueFromString().

◆ ImplMetricReformat()

void MetricFormatter::ImplMetricReformat ( const OUString &  rStr,
double &  rValue,
OUString &  rOutStr 
)
protected

Definition at line 1217 of file field.cxx.

References CreateFieldText(), GetMax(), GetMin(), meUnit, and vcl::TextToValue().

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

◆ Reformat()

void MetricFormatter::Reformat ( )
overridevirtual

◆ SetCustomUnitText()

void MetricFormatter::SetCustomUnitText ( const OUString &  rStr)

Definition at line 1253 of file field.cxx.

References maCustomUnitText.

◆ SetMax()

void MetricFormatter::SetMax ( sal_Int64  nNewMax,
FieldUnit  eInUnit 
)

Definition at line 1359 of file field.cxx.

References vcl::ConvertValue(), and meUnit.

Referenced by MetricField::SetUnit().

◆ SetMin()

void MetricFormatter::SetMin ( sal_Int64  nNewMin,
FieldUnit  eInUnit 
)

Definition at line 1347 of file field.cxx.

References vcl::ConvertValue(), and meUnit.

Referenced by MetricField::SetUnit().

◆ SetUnit()

void MetricFormatter::SetUnit ( FieldUnit  meUnit)
virtual

Reimplemented in MetricField.

Definition at line 1241 of file field.cxx.

References meUnit.

Referenced by MetricField::SetUnit().

◆ SetUserValue()

void MetricFormatter::SetUserValue ( sal_Int64  nNewValue,
FieldUnit  eInUnit 
)

Definition at line 1307 of file field.cxx.

References vcl::ConvertValue(), and meUnit.

Referenced by SetValue().

◆ SetValue() [1/2]

void MetricFormatter::SetValue ( sal_Int64  nNewValue,
FieldUnit  eInUnit 
)

Definition at line 1259 of file field.cxx.

References SetUserValue().

Referenced by Reformat(), and SetValue().

◆ SetValue() [2/2]

void MetricFormatter::SetValue ( sal_Int64  nValue)
overridevirtual

Definition at line 1341 of file field.cxx.

References nValue, and SetValue().

Member Data Documentation

◆ maCustomUnitText

OUString MetricFormatter::maCustomUnitText
private

Definition at line 204 of file field.hxx.

Referenced by CreateFieldText(), and SetCustomUnitText().

◆ meUnit

FieldUnit MetricFormatter::meUnit
protected

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