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 (int nNewMin)
 
void SetMetricFieldMax (int nNewMax)
 
void set_value (int nNewValue, FieldUnit eInUnit=FieldUnit::NONE)
 
int get_value (FieldUnit eOutUnit=FieldUnit::NONE)
 
void set_min (int nNewMin, FieldUnit eInUnit)
 
void set_max (int nNewMax, FieldUnit eInUnit)
 
int get_min (FieldUnit eOutUnit=FieldUnit::NONE) const
 
int NormalizePercent (int nValue)
 
int DenormalizePercent (int nValue)
 
void SetRefValue (int nValue)
 
int GetRealValue (FieldUnit eOutUnit)
 
int Convert (int 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
 
int nRefValue
 
int nOldMax
 
int nOldMin
 
int nOldSpinSize
 
int nOldPageSize
 
int nLastPercent
 
int nLastValue
 
sal_uInt16 nOldDigits
 
FieldUnit eOldUnit
 
bool bLockAutoCalculation
 

Detailed Description

Definition at line 28 of file prcntfld.hxx.

Constructor & Destructor Documentation

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

Definition at line 22 of file prcntfld.cxx.

References DenormalizePercent(), m_pField, nOldPageSize, nOldSpinSize, and nRefValue.

Member Function Documentation

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

Definition at line 51 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Init().

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

Definition at line 50 of file prcntfld.hxx.

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

Definition at line 69 of file prcntfld.hxx.

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

Definition at line 57 of file prcntfld.hxx.

int SwPercentField::GetRealValue ( FieldUnit  eOutUnit)

Definition at line 185 of file prcntfld.cxx.

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

Referenced by SetRefValue().

bool SwPercentField::has_focus ( ) const
inline

Definition at line 55 of file prcntfld.hxx.

int SwPercentField::ImpPower10 ( sal_uInt16  n)
staticprivate

Definition at line 175 of file prcntfld.cxx.

References i.

Referenced by DenormalizePercent(), and NormalizePercent().

void SwPercentField::LockAutoCalculation ( bool  bLock)
inline

Definition at line 81 of file prcntfld.hxx.

int SwPercentField::NormalizePercent ( int  nValue)

Definition at line 154 of file prcntfld.cxx.

References ImpPower10(), m_pField, and nOldDigits.

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

void SwPercentField::save_value ( )
inline

Definition at line 56 of file prcntfld.hxx.

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

Definition at line 59 of file prcntfld.hxx.

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

Definition at line 148 of file prcntfld.cxx.

References m_pField.

Referenced by SwTableColumnPage::Reset().

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

Definition at line 133 of file prcntfld.cxx.

References Convert(), eOldUnit, m_pField, and nOldMin.

Referenced by SwTableColumnPage::Reset().

void SwPercentField::set_sensitive ( bool  bEnable)
inline

Definition at line 53 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Reset().

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

Definition at line 58 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Reset().

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

Definition at line 52 of file prcntfld.hxx.

Referenced by SwTableColumnPage::Init().

void SwPercentField::SetMetricFieldMax ( int  nNewMax)
inline

Definition at line 61 of file prcntfld.hxx.

void SwPercentField::SetMetricFieldMin ( int  nNewMin)
inline

Definition at line 60 of file prcntfld.hxx.

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

Definition at line 54 of file prcntfld.hxx.

void SwPercentField::ShowPercent ( bool  bPercent)

Member Data Documentation

bool SwPercentField::bLockAutoCalculation
private

Definition at line 41 of file prcntfld.hxx.

Referenced by SetRefValue().

FieldUnit SwPercentField::eOldUnit
private

Definition at line 40 of file prcntfld.hxx.

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

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

Definition at line 37 of file prcntfld.hxx.

Referenced by ShowPercent().

int SwPercentField::nLastValue
private

Definition at line 38 of file prcntfld.hxx.

Referenced by ShowPercent().

sal_uInt16 SwPercentField::nOldDigits
private

Definition at line 39 of file prcntfld.hxx.

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

int SwPercentField::nOldMax
private

Definition at line 33 of file prcntfld.hxx.

Referenced by ShowPercent().

int SwPercentField::nOldMin
private

Definition at line 34 of file prcntfld.hxx.

Referenced by set_min(), and ShowPercent().

int SwPercentField::nOldPageSize
private

Definition at line 36 of file prcntfld.hxx.

Referenced by ShowPercent(), and SwPercentField().

int SwPercentField::nOldSpinSize
private

Definition at line 35 of file prcntfld.hxx.

Referenced by ShowPercent(), and SwPercentField().

int SwPercentField::nRefValue
private

Definition at line 32 of file prcntfld.hxx.

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


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