LibreOffice Module extensions (master) 1
|
#include <standardcontrol.hxx>
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::Widget * | getWidget ()=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::Widget * | getWidget () override |
sal_Int64 | impl_apiValueToFieldValue_nothrow (double nApiValue) const |
converts an API value (double , as passed into set[Max|Min|]Value) into a 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::Builder > | m_xBuilder |
Protected Attributes inherited from cppu::BaseMutex | |
mutable::osl::Mutex | m_aMutex |
Definition at line 207 of file standardcontrol.hxx.
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.
|
override |
Definition at line 372 of file standardcontrol.cxx.
References pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow().
|
override |
Definition at line 428 of file standardcontrol.cxx.
References VCLUnoHelper::ConvertToMeasurementUnit(), and pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow().
|
overridevirtual |
Definition at line 407 of file standardcontrol.cxx.
References pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow().
Referenced by ONumericControl().
|
overridevirtual |
Definition at line 386 of file standardcontrol.cxx.
References pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow().
|
overridevirtual |
Definition at line 496 of file standardcontrol.cxx.
References Any, pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow(), impl_fieldValueToApiValue_nothrow(), m_eValueUnit, and nValue.
|
overridevirtual |
Definition at line 508 of file standardcontrol.cxx.
|
override |
Definition at line 455 of file standardcontrol.cxx.
References VCLUnoHelper::ConvertToMeasurementUnit(), m_eValueUnit, and m_nFieldToUNOValueFactor.
|
inlineoverrideprivatevirtual |
Implements pcr::CommonBehaviourControlHelper.
Definition at line 242 of file standardcontrol.hxx.
References pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow().
|
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().
|
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().
|
overridevirtual |
Definition at line 377 of file standardcontrol.cxx.
References weld::MetricSpinButton::get_range(), pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow(), max, min, weld::MetricSpinButton::set_digits(), and weld::MetricSpinButton::set_range().
|
overridevirtual |
Definition at line 433 of file standardcontrol.cxx.
References VCLUnoHelper::ConvertToFieldUnit(), and pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow().
|
overridevirtual |
Definition at line 420 of file standardcontrol.cxx.
References pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow(), impl_apiValueToFieldValue_nothrow(), and m_eValueUnit.
|
overridevirtual |
Definition at line 399 of file standardcontrol.cxx.
References pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow(), impl_apiValueToFieldValue_nothrow(), and m_eValueUnit.
Referenced by ONumericControl().
|
inlineoverridevirtual |
Reimplemented from pcr::CommonBehaviourControl< TControlInterface, TControlWindow >.
Definition at line 233 of file standardcontrol.hxx.
References weld::Entry::connect_changed(), weld::MetricSpinButton::connect_value_changed(), weld::MetricSpinButton::get_widget(), pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow(), LINK, and pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::SetModifyHandler().
|
overridevirtual |
Definition at line 467 of file standardcontrol.cxx.
References pcr::CommonBehaviourControl< TControlInterface, TControlWindow >::getTypedControlWindow(), impl_apiValueToFieldValue_nothrow(), m_eValueUnit, nControlValue, and nValue.
|
overridevirtual |
Definition at line 460 of file standardcontrol.cxx.
References VCLUnoHelper::ConvertToFieldUnit(), m_eValueUnit, and m_nFieldToUNOValueFactor.
|
private |
Definition at line 210 of file standardcontrol.hxx.
Referenced by getValue(), getValueUnit(), setMaxValue(), setMinValue(), setValue(), and setValueUnit().
|
private |
Definition at line 211 of file standardcontrol.hxx.
Referenced by getValueUnit(), impl_apiValueToFieldValue_nothrow(), impl_fieldValueToApiValue_nothrow(), and setValueUnit().