LibreOffice Module sw (master) 1
Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
SwPercentField Class Reference

#include <prcntfld.hxx>

Public Member Functions

 SwPercentField (std::unique_ptr< weld::MetricSpinButton > pControl)
 
const weld::MetricSpinButtonget () const
 
weld::MetricSpinButtonget ()
 
void connect_value_changed (const Link< weld::MetricSpinButton &, void > &rLink)
 
void SetMetric (FieldUnit eUnit)
 
void set_sensitive (bool bEnable)
 
void show ()
 
bool has_focus () const
 
void save_value ()
 
bool get_value_changed_from_saved () const
 
void set_text (const OUString &rStr)
 
void set_accessible_name (const OUString &rStr)
 
void SetMetricFieldMin (sal_Int64 nNewMin)
 
void SetMetricFieldMax (sal_Int64 nNewMax)
 
void SetMetricFieldRange (sal_Int64 nNewMin, sal_Int64 nNewMax)
 
void GetMetricFieldRange (sal_Int64 &rOldMin, sal_Int64 &rOldMax) const
 
void set_value (sal_Int64 nNewValue, FieldUnit eInUnit=FieldUnit::NONE)
 
sal_Int64 get_value (FieldUnit eOutUnit=FieldUnit::NONE)
 
void set_min (sal_Int64 nNewMin, FieldUnit eInUnit)
 
void set_max (sal_Int64 nNewMax, FieldUnit eInUnit)
 
sal_Int64 get_min (FieldUnit eOutUnit=FieldUnit::NONE) const
 
sal_Int64 NormalizePercent (sal_Int64 nValue)
 
sal_Int64 DenormalizePercent (sal_Int64 nValue)
 
void SetRefValue (sal_Int64 nValue)
 
sal_Int64 GetRealValue (FieldUnit eOutUnit)
 
sal_Int64 Convert (sal_Int64 nValue, FieldUnit eInUnit, FieldUnit eOutUnit)
 
void ShowPercent (bool bPercent)
 
void LockAutoCalculation (bool bLock)
 

Static Private Member Functions

static SAL_DLLPRIVATE int ImpPower10 (sal_uInt16 n)
 

Private Attributes

std::unique_ptr< weld::MetricSpinButtonm_pField
 
sal_Int64 m_nRefValue
 
sal_Int64 m_nOldMax
 
sal_Int64 m_nOldMin
 
int m_nOldSpinSize
 
int m_nOldPageSize
 
sal_Int64 m_nLastPercent
 
sal_Int64 m_nLastValue
 
sal_uInt16 m_nOldDigits
 
FieldUnit m_eOldUnit
 
bool m_bLockAutoCalculation
 

Detailed Description

Definition at line 26 of file prcntfld.hxx.

Constructor & Destructor Documentation

◆ SwPercentField()

SwPercentField::SwPercentField ( std::unique_ptr< weld::MetricSpinButton pControl)

Definition at line 23 of file prcntfld.cxx.

References DenormalizePercent(), m_nOldPageSize, m_nOldSpinSize, m_nRefValue, and m_pField.

Member Function Documentation

◆ connect_value_changed()

void SwPercentField::connect_value_changed ( const Link< weld::MetricSpinButton &, void > &  rLink)
inline

Definition at line 49 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Init().

◆ Convert()

sal_Int64 SwPercentField::Convert ( sal_Int64  nValue,
FieldUnit  eInUnit,
FieldUnit  eOutUnit 
)

◆ DenormalizePercent()

sal_Int64 SwPercentField::DenormalizePercent ( sal_Int64  nValue)

◆ get() [1/2]

weld::MetricSpinButton * SwPercentField::get ( )
inline

Definition at line 48 of file prcntfld.hxx.

◆ get() [2/2]

const weld::MetricSpinButton * SwPercentField::get ( ) const
inline

◆ get_min()

sal_Int64 SwPercentField::get_min ( FieldUnit  eOutUnit = FieldUnit::NONE) const
inline

Definition at line 69 of file prcntfld.hxx.

◆ get_value()

sal_Int64 SwPercentField::get_value ( FieldUnit  eOutUnit = FieldUnit::NONE)

◆ get_value_changed_from_saved()

bool SwPercentField::get_value_changed_from_saved ( ) const
inline

Definition at line 55 of file prcntfld.hxx.

◆ GetMetricFieldRange()

void SwPercentField::GetMetricFieldRange ( sal_Int64 &  rOldMin,
sal_Int64 &  rOldMax 
) const
inline

Definition at line 61 of file prcntfld.hxx.

◆ GetRealValue()

sal_Int64 SwPercentField::GetRealValue ( FieldUnit  eOutUnit)

Definition at line 189 of file prcntfld.cxx.

References Convert(), get_value(), and m_pField.

Referenced by SetRefValue().

◆ has_focus()

bool SwPercentField::has_focus ( ) const
inline

Definition at line 53 of file prcntfld.hxx.

◆ ImpPower10()

int SwPercentField::ImpPower10 ( sal_uInt16  n)
staticprivate

Definition at line 179 of file prcntfld.cxx.

References i, n, and nValue.

Referenced by DenormalizePercent(), and NormalizePercent().

◆ LockAutoCalculation()

void SwPercentField::LockAutoCalculation ( bool  bLock)
inline

Definition at line 81 of file prcntfld.hxx.

◆ NormalizePercent()

sal_Int64 SwPercentField::NormalizePercent ( sal_Int64  nValue)

Definition at line 158 of file prcntfld.cxx.

References ImpPower10(), m_nOldDigits, m_pField, and nValue.

Referenced by Convert(), and SwTableColumnPage::Reset().

◆ save_value()

void SwPercentField::save_value ( )
inline

Definition at line 54 of file prcntfld.hxx.

◆ set_accessible_name()

void SwPercentField::set_accessible_name ( const OUString &  rStr)
inline

Definition at line 57 of file prcntfld.hxx.

◆ set_max()

void SwPercentField::set_max ( sal_Int64  nNewMax,
FieldUnit  eInUnit 
)

Definition at line 152 of file prcntfld.cxx.

References m_pField.

Referenced by SwTableColumnPage::Reset().

◆ set_min()

void SwPercentField::set_min ( sal_Int64  nNewMin,
FieldUnit  eInUnit 
)

Definition at line 137 of file prcntfld.cxx.

References Convert(), m_eOldUnit, m_nOldMin, and m_pField.

Referenced by SwTableColumnPage::Reset().

◆ set_sensitive()

void SwPercentField::set_sensitive ( bool  bEnable)
inline

Definition at line 51 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Reset().

◆ set_text()

void SwPercentField::set_text ( const OUString &  rStr)
inline

Definition at line 56 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Reset().

◆ set_value()

void SwPercentField::set_value ( sal_Int64  nNewValue,
FieldUnit  eInUnit = FieldUnit::NONE 
)

◆ SetMetric()

void SwPercentField::SetMetric ( FieldUnit  eUnit)
inline

Definition at line 50 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Init().

◆ SetMetricFieldMax()

void SwPercentField::SetMetricFieldMax ( sal_Int64  nNewMax)
inline

Definition at line 59 of file prcntfld.hxx.

◆ SetMetricFieldMin()

void SwPercentField::SetMetricFieldMin ( sal_Int64  nNewMin)
inline

Definition at line 58 of file prcntfld.hxx.

◆ SetMetricFieldRange()

void SwPercentField::SetMetricFieldRange ( sal_Int64  nNewMin,
sal_Int64  nNewMax 
)
inline

Definition at line 60 of file prcntfld.hxx.

◆ SetRefValue()

void SwPercentField::SetRefValue ( sal_Int64  nValue)

◆ show()

void SwPercentField::show ( )
inline

Definition at line 52 of file prcntfld.hxx.

◆ ShowPercent()

void SwPercentField::ShowPercent ( bool  bPercent)

Member Data Documentation

◆ m_bLockAutoCalculation

bool SwPercentField::m_bLockAutoCalculation
private

Definition at line 39 of file prcntfld.hxx.

Referenced by SetRefValue().

◆ m_eOldUnit

FieldUnit SwPercentField::m_eOldUnit
private

Definition at line 38 of file prcntfld.hxx.

Referenced by set_min(), set_value(), SetRefValue(), and ShowPercent().

◆ m_nLastPercent

sal_Int64 SwPercentField::m_nLastPercent
private

Definition at line 35 of file prcntfld.hxx.

Referenced by ShowPercent().

◆ m_nLastValue

sal_Int64 SwPercentField::m_nLastValue
private

Definition at line 36 of file prcntfld.hxx.

Referenced by ShowPercent().

◆ m_nOldDigits

sal_uInt16 SwPercentField::m_nOldDigits
private

Definition at line 37 of file prcntfld.hxx.

Referenced by Convert(), DenormalizePercent(), NormalizePercent(), set_value(), and ShowPercent().

◆ m_nOldMax

sal_Int64 SwPercentField::m_nOldMax
private

Definition at line 31 of file prcntfld.hxx.

Referenced by ShowPercent().

◆ m_nOldMin

sal_Int64 SwPercentField::m_nOldMin
private

Definition at line 32 of file prcntfld.hxx.

Referenced by set_min(), and ShowPercent().

◆ m_nOldPageSize

int SwPercentField::m_nOldPageSize
private

Definition at line 34 of file prcntfld.hxx.

Referenced by ShowPercent(), and SwPercentField().

◆ m_nOldSpinSize

int SwPercentField::m_nOldSpinSize
private

Definition at line 33 of file prcntfld.hxx.

Referenced by ShowPercent(), and SwPercentField().

◆ m_nRefValue

sal_Int64 SwPercentField::m_nRefValue
private

Definition at line 30 of file prcntfld.hxx.

Referenced by Convert(), set_value(), SetRefValue(), ShowPercent(), and SwPercentField().

◆ m_pField

std::unique_ptr<weld::MetricSpinButton> SwPercentField::m_pField
private

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