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 ( std::unique_ptr< weld::MetricSpinButton pControl)

Definition at line 23 of file prcntfld.cxx.

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

Member Function Documentation

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

Definition at line 49 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Init().

sal_Int64 SwPercentField::Convert ( sal_Int64  nValue,
FieldUnit  eInUnit,
FieldUnit  eOutUnit 
)
sal_Int64 SwPercentField::DenormalizePercent ( sal_Int64  nValue)
const weld::MetricSpinButton* SwPercentField::get ( ) const
inline
weld::MetricSpinButton* SwPercentField::get ( )
inline

Definition at line 48 of file prcntfld.hxx.

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

Definition at line 69 of file prcntfld.hxx.

sal_Int64 SwPercentField::get_value ( FieldUnit  eOutUnit = FieldUnit::NONE)
bool SwPercentField::get_value_changed_from_saved ( ) const
inline

Definition at line 55 of file prcntfld.hxx.

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

Definition at line 61 of file prcntfld.hxx.

sal_Int64 SwPercentField::GetRealValue ( FieldUnit  eOutUnit)

Definition at line 189 of file prcntfld.cxx.

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

Referenced by SetRefValue().

bool SwPercentField::has_focus ( ) const
inline

Definition at line 53 of file prcntfld.hxx.

int SwPercentField::ImpPower10 ( sal_uInt16  n)
staticprivate

Definition at line 179 of file prcntfld.cxx.

References i, and nValue.

Referenced by DenormalizePercent(), and NormalizePercent().

void SwPercentField::LockAutoCalculation ( bool  bLock)
inline

Definition at line 81 of file prcntfld.hxx.

sal_Int64 SwPercentField::NormalizePercent ( sal_Int64  nValue)

Definition at line 158 of file prcntfld.cxx.

References ImpPower10(), m_nOldDigits, and m_pField.

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

void SwPercentField::save_value ( )
inline

Definition at line 54 of file prcntfld.hxx.

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

Definition at line 57 of file prcntfld.hxx.

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

Definition at line 152 of file prcntfld.cxx.

References m_pField.

Referenced by SwTableColumnPage::Reset().

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().

void SwPercentField::set_sensitive ( bool  bEnable)
inline

Definition at line 51 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Reset().

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

Definition at line 56 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Reset().

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

Definition at line 50 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Init().

void SwPercentField::SetMetricFieldMax ( sal_Int64  nNewMax)
inline

Definition at line 59 of file prcntfld.hxx.

void SwPercentField::SetMetricFieldMin ( sal_Int64  nNewMin)
inline

Definition at line 58 of file prcntfld.hxx.

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

Definition at line 60 of file prcntfld.hxx.

void SwPercentField::SetRefValue ( sal_Int64  nValue)
void SwPercentField::show ( )
inline

Definition at line 52 of file prcntfld.hxx.

void SwPercentField::ShowPercent ( bool  bPercent)

Member Data Documentation

bool SwPercentField::m_bLockAutoCalculation
private

Definition at line 39 of file prcntfld.hxx.

Referenced by SetRefValue().

FieldUnit SwPercentField::m_eOldUnit
private

Definition at line 38 of file prcntfld.hxx.

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

sal_Int64 SwPercentField::m_nLastPercent
private

Definition at line 35 of file prcntfld.hxx.

Referenced by ShowPercent().

sal_Int64 SwPercentField::m_nLastValue
private

Definition at line 36 of file prcntfld.hxx.

Referenced by ShowPercent().

sal_uInt16 SwPercentField::m_nOldDigits
private

Definition at line 37 of file prcntfld.hxx.

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

sal_Int64 SwPercentField::m_nOldMax
private

Definition at line 31 of file prcntfld.hxx.

Referenced by ShowPercent().

sal_Int64 SwPercentField::m_nOldMin
private

Definition at line 32 of file prcntfld.hxx.

Referenced by set_min(), and ShowPercent().

int SwPercentField::m_nOldPageSize
private

Definition at line 34 of file prcntfld.hxx.

Referenced by ShowPercent(), and SwPercentField().

int SwPercentField::m_nOldSpinSize
private

Definition at line 33 of file prcntfld.hxx.

Referenced by ShowPercent(), and SwPercentField().

sal_Int64 SwPercentField::m_nRefValue
private

Definition at line 30 of file prcntfld.hxx.

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

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

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