LibreOffice Module extensions (master) 1
Public Member Functions | Private Member Functions | Private Attributes | List of all members
pcr::ONumericControl Class Reference

#include <standardcontrol.hxx>

Inheritance diagram for pcr::ONumericControl:
[legend]
Collaboration diagram for pcr::ONumericControl:
[legend]

Public Member Functions

 ONumericControl (std::unique_ptr< weld::MetricSpinButton > xWidget, std::unique_ptr< weld::Builder > xBuilder, bool bReadOnly)
 
virtual css::uno::Any SAL_CALL getValue () override
 
virtual void SAL_CALL setValue (const css::uno::Any &_value) override
 
virtual css::uno::Type SAL_CALL getValueType () override
 
virtual ::sal_Int16 SAL_CALL getDecimalDigits () override
 
virtual void SAL_CALL setDecimalDigits (::sal_Int16 _decimaldigits) override
 
virtual css::beans::Optional< double > SAL_CALL getMinValue () override
 
virtual void SAL_CALL setMinValue (const css::beans::Optional< double > &_minvalue) override
 
virtual css::beans::Optional< double > SAL_CALL getMaxValue () override
 
virtual void SAL_CALL setMaxValue (const css::beans::Optional< double > &_maxvalue) override
 
virtual ::sal_Int16 SAL_CALL getDisplayUnit () override
 
virtual void SAL_CALL setDisplayUnit (::sal_Int16 _displayunit) override
 
virtual ::sal_Int16 SAL_CALL getValueUnit () override
 
virtual void SAL_CALL setValueUnit (::sal_Int16 _valueunit) override
 
virtual void SetModifyHandler () override
 
- Public Member Functions inherited from pcr::CommonBehaviourControlHelper
 CommonBehaviourControlHelper (sal_Int16 nControlType, css::inspection::XPropertyControl &rAntiImpl)
 creates the instance More...
 
virtual ~CommonBehaviourControlHelper ()
 
virtual void setModified ()
 
virtual void editChanged ()
 
::sal_Int16 getControlType () const
 
const css::uno::Reference< css::inspection::XPropertyControlContext > & getControlContext () const
 
void setControlContext (const css::uno::Reference< css::inspection::XPropertyControlContext > &controlcontext)
 
bool isModified () const
 
void notifyModifiedValue ()
 
virtual weld::WidgetgetWidget ()=0
 
 DECL_LINK (ModifiedHdl, weld::ComboBox &, void)
 may be used by derived classes, they forward the event to the PropCtrListener More...
 
 DECL_LINK (ColorModifiedHdl, ColorListBox &, void)
 
 DECL_LINK (EditModifiedHdl, weld::Entry &, void)
 
 DECL_LINK (MetricModifiedHdl, weld::MetricSpinButton &, void)
 
 DECL_LINK (FormattedModifiedHdl, weld::FormattedSpinButton &, void)
 
 DECL_LINK (TimeModifiedHdl, weld::FormattedSpinButton &, void)
 
 DECL_LINK (DateModifiedHdl, SvtCalendarBox &, void)
 
 DECL_LINK (GetFocusHdl, weld::Widget &, void)
 
 DECL_LINK (LoseFocusHdl, weld::Widget &, void)
 

Private Member Functions

virtual weld::WidgetgetWidget () override
 
sal_Int64 impl_apiValueToFieldValue_nothrow (double nApiValue) const
 converts an API value (double, as passed into set[Max|Min|]Value) into a int value which can be passed to our NumericField. More...
 
double impl_fieldValueToApiValue_nothrow (sal_Int64 nFieldValue) const
 converts a control value, as obtained from our Numeric field, into a value which can passed to outer callers via our UNO API. More...
 

Private Attributes

FieldUnit m_eValueUnit
 
sal_Int16 m_nFieldToUNOValueFactor
 

Additional Inherited Members

- Protected Types inherited from pcr::CommonBehaviourControl< TControlInterface, TControlWindow >
typedef ::cppu::WeakComponentImplHelper< TControlInterface > ComponentBaseClass
 
- Protected Member Functions inherited from pcr::CommonBehaviourControl< TControlInterface, TControlWindow >
 CommonBehaviourControl (sal_Int16 nControlType, std::unique_ptr< weld::Builder > xBuilder, std::unique_ptr< TControlWindow > xWidget, bool bReadOnly)
 
virtual ~CommonBehaviourControl () override
 
virtual ::sal_Int16 SAL_CALL getControlType () override
 
virtual css::uno::Reference< css::inspection::XPropertyControlContext > SAL_CALL getControlContext () override
 
virtual void SAL_CALL setControlContext (const css::uno::Reference< css::inspection::XPropertyControlContext > &controlcontext) override
 
virtual css::uno::Reference< css::awt::XWindow > SAL_CALL getControlWindow () override
 
virtual sal_Bool SAL_CALL isModified () override
 
virtual void SAL_CALL notifyModifiedValue () override
 
void clear_widgetry ()
 
virtual void SAL_CALL disposing () override
 
TControlWindow * getTypedControlWindow ()
 
const TControlWindow * getTypedControlWindow () const
 
virtual void SetModifyHandler ()
 
void impl_checkDisposed_throw ()
 checks whether the instance is already disposed More...
 
- Protected Attributes inherited from pcr::CommonBehaviourControl< TControlInterface, TControlWindow >
std::unique_ptr< weld::Builderm_xBuilder
 
- Protected Attributes inherited from cppu::BaseMutex
mutable::osl::Mutex m_aMutex
 

Detailed Description

Definition at line 207 of file standardcontrol.hxx.

Constructor & Destructor Documentation

◆ ONumericControl()

pcr::ONumericControl::ONumericControl ( std::unique_ptr< weld::MetricSpinButton xWidget,
std::unique_ptr< weld::Builder xBuilder,
bool  bReadOnly 
)

Definition at line 362 of file standardcontrol.cxx.

References bReadOnly, getMaxValue(), NONE, setMinValue(), and value.

Member Function Documentation

◆ getDecimalDigits()

sal_Int16 SAL_CALL pcr::ONumericControl::getDecimalDigits ( )
override

◆ getDisplayUnit()

sal_Int16 SAL_CALL pcr::ONumericControl::getDisplayUnit ( )
override

◆ getMaxValue()

Optional< double > SAL_CALL pcr::ONumericControl::getMaxValue ( )
overridevirtual

◆ getMinValue()

Optional< double > SAL_CALL pcr::ONumericControl::getMinValue ( )
overridevirtual

◆ getValue()

Any SAL_CALL pcr::ONumericControl::getValue ( )
overridevirtual

◆ getValueType()

Type SAL_CALL pcr::ONumericControl::getValueType ( )
overridevirtual

Definition at line 508 of file standardcontrol.cxx.

◆ getValueUnit()

sal_Int16 SAL_CALL pcr::ONumericControl::getValueUnit ( )
override

◆ getWidget()

virtual weld::Widget * pcr::ONumericControl::getWidget ( )
inlineoverrideprivatevirtual

◆ impl_apiValueToFieldValue_nothrow()

sal_Int64 pcr::ONumericControl::impl_apiValueToFieldValue_nothrow ( double  nApiValue) const
private

converts an API value (double, as passed into set[Max|Min|]Value) into a int value which can be passed to our NumericField.

The conversion respects our decimal digits as well as our value factor (<member>m_nFieldToUNOValueFactor</member>).

Definition at line 482 of file standardcontrol.cxx.

References pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow(), pcr::ImplCalcLongValue(), m_nFieldToUNOValueFactor, and nControlValue.

Referenced by setMaxValue(), setMinValue(), and setValue().

◆ impl_fieldValueToApiValue_nothrow()

double pcr::ONumericControl::impl_fieldValueToApiValue_nothrow ( sal_Int64  nFieldValue) const
private

converts a control value, as obtained from our Numeric field, into a value which can passed to outer callers via our UNO API.

Definition at line 489 of file standardcontrol.cxx.

References pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow(), pcr::ImplCalcDoubleValue(), and m_nFieldToUNOValueFactor.

Referenced by getValue().

◆ setDecimalDigits()

void SAL_CALL pcr::ONumericControl::setDecimalDigits ( ::sal_Int16  _decimaldigits)
overridevirtual

◆ setDisplayUnit()

void SAL_CALL pcr::ONumericControl::setDisplayUnit ( ::sal_Int16  _displayunit)
overridevirtual

◆ setMaxValue()

void SAL_CALL pcr::ONumericControl::setMaxValue ( const css::beans::Optional< double > &  _maxvalue)
overridevirtual

◆ setMinValue()

void SAL_CALL pcr::ONumericControl::setMinValue ( const css::beans::Optional< double > &  _minvalue)
overridevirtual

◆ SetModifyHandler()

virtual void pcr::ONumericControl::SetModifyHandler ( )
inlineoverridevirtual

◆ setValue()

void SAL_CALL pcr::ONumericControl::setValue ( const css::uno::Any &  _value)
overridevirtual

◆ setValueUnit()

void SAL_CALL pcr::ONumericControl::setValueUnit ( ::sal_Int16  _valueunit)
overridevirtual

Member Data Documentation

◆ m_eValueUnit

FieldUnit pcr::ONumericControl::m_eValueUnit
private

◆ m_nFieldToUNOValueFactor

sal_Int16 pcr::ONumericControl::m_nFieldToUNOValueFactor
private

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