LibreOffice Module svx (master) 1
|
#include <gridcell.hxx>
Public Member Functions | |
DbCellControl (DbGridColumn &_rColumn) | |
virtual | ~DbCellControl () override |
svt::ControlBase & | GetWindow () const |
bool | isAlignedController () const |
void | AlignControl (sal_Int16 nAlignment) |
void | SetTextLineColor () |
void | SetTextLineColor (const Color &_rColor) |
virtual void | Init (BrowserDataWin &rParent, const css::uno::Reference< css::sdbc::XRowSet > &xCursor) |
virtual ::svt::CellControllerRef | CreateController () const =0 |
bool | Commit () |
virtual OUString | GetFormatText (const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter, const Color **ppColor=nullptr)=0 |
virtual void | Update () |
virtual void | UpdateFromField (const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter)=0 |
virtual void | PaintFieldToCell (OutputDevice &rDev, const tools::Rectangle &rRect, const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) |
virtual void | PaintCell (OutputDevice &_rDev, const tools::Rectangle &_rRect) |
void | ImplInitWindow (vcl::Window const &rParent, const InitWindowFacet _eInitWhat) |
double | GetValue (const css::uno::Reference< css::sdb::XColumn > &_rxField, const css::uno::Reference< css::util::XNumberFormatter > &xFormatter) const |
Public Member Functions inherited from comphelper::OPropertyChangeListener | |
OPropertyChangeListener (::osl::Mutex &_rMutex) | |
virtual | ~OPropertyChangeListener () |
virtual void | _propertyChanged (const css::beans::PropertyChangeEvent &_rEvent)=0 |
virtual void | _disposing (const css::lang::EventObject &_rSource) |
Protected Member Functions | |
const css::uno::Reference< css::sdbc::XRowSet > & | getCursor () const |
bool | isTransparent () const |
void | setTransparent (bool _bSet) |
void | setAlignedController (bool _bAlign) |
bool | isValuePropertyLocked () const |
determined whether or not the value property is locked More... | |
void | lockValueProperty () |
locks the listening at the value property. More... | |
void | unlockValueProperty () |
unlocks the listening at the value property More... | |
void | doPropertyListening (const OUString &_rPropertyName) |
virtual void | implAdjustGenericFieldSetting (const css::uno::Reference< css::beans::XPropertySet > &_rxModel) |
void | implValuePropertyChanged () |
void | invalidatedController () |
virtual bool | commitControl ()=0 |
commits the content of the control (e.g. More... | |
virtual void | updateFromModel (css::uno::Reference< css::beans::XPropertySet > _rxModel)=0 |
updates the current content of the control (e.g. More... | |
virtual void | _propertyChanged (const css::beans::PropertyChangeEvent &evt) override |
Protected Member Functions inherited from comphelper::OPropertyChangeListener | |
void | disposeAdapter () |
Protected Attributes | |
DbGridColumn & | m_rColumn |
VclPtr< svt::ControlBase > | m_pPainter |
VclPtr< svt::ControlBase > | m_pWindow |
Protected Attributes inherited from cppu::BaseMutex | |
mutable::osl::Mutex | m_aMutex |
Private Member Functions | |
void | implDoPropertyListening (const OUString &_rPropertyName, bool _bWarnIfNotExistent) |
void | implAdjustReadOnly (const css::uno::Reference< css::beans::XPropertySet > &_rxModel, bool i_bReadOnly) |
updates the "readonly" setting on m_pWindow, according to the respective property value in the given model More... | |
void | implAdjustEnabled (const css::uno::Reference< css::beans::XPropertySet > &_rxModel) |
updates the "enabled" setting on m_pWindow, according to the respective property value in the given model More... | |
Private Attributes | |
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > | m_pModelChangeBroadcaster |
rtl::Reference<::comphelper::OPropertyChangeMultiplexer > | m_pFieldChangeBroadcaster |
bool | m_bTransparent: 1 |
bool | m_bAlignedController: 1 |
bool | m_bAccessingValueProperty: 1 |
css::uno::Reference< css::sdbc::XRowSet > | m_xCursor |
Definition at line 185 of file gridcell.hxx.
DbCellControl::DbCellControl | ( | DbGridColumn & | _rColumn | ) |
Definition at line 521 of file gridcell.cxx.
References Exception, FM_PROP_BOUNDFIELD, FM_PROP_DATE, FM_PROP_EFFECTIVE_VALUE, FM_PROP_ENABLED, FM_PROP_ISREADONLY, FM_PROP_READONLY, FM_PROP_SELECT_SEQ, FM_PROP_STATE, FM_PROP_TEXT, FM_PROP_TIME, FM_PROP_VALUE, DbGridColumn::getModel(), implDoPropertyListening(), m_aMutex, m_pFieldChangeBroadcaster, m_pModelChangeBroadcaster, and TOOLS_WARN_EXCEPTION.
|
overridevirtual |
Definition at line 609 of file gridcell.cxx.
References VclPtr< class reference_type >::disposeAndClear(), lcl_clearBroadCaster(), m_pFieldChangeBroadcaster, m_pModelChangeBroadcaster, m_pPainter, and m_pWindow.
|
overrideprotectedvirtual |
Implements comphelper::OPropertyChangeListener.
Reimplemented in DbFormattedField, DbComboBox, and DbListBox.
Definition at line 637 of file gridcell.cxx.
References bReadOnly, FM_PROP_DATE, FM_PROP_EFFECTIVE_VALUE, FM_PROP_ENABLED, FM_PROP_ISREADONLY, FM_PROP_READONLY, FM_PROP_SELECT_SEQ, FM_PROP_STATE, FM_PROP_TEXT, FM_PROP_TIME, FM_PROP_VALUE, implAdjustEnabled(), implAdjustGenericFieldSetting(), implAdjustReadOnly(), implValuePropertyChanged(), isValuePropertyLocked(), m_rColumn, and DbGridColumn::SetReadOnly().
Referenced by DbFormattedField::_propertyChanged(), DbComboBox::_propertyChanged(), and DbListBox::_propertyChanged().
void DbCellControl::AlignControl | ( | sal_Int16 | nAlignment | ) |
Definition at line 932 of file gridcell.cxx.
References m_pPainter, m_pWindow, WB_CENTER, WB_LEFT, and WB_RIGHT.
Referenced by Init().
bool DbCellControl::Commit | ( | ) |
Definition at line 676 of file gridcell.cxx.
References commitControl(), DBG_UNHANDLED_EXCEPTION, Exception, lockValueProperty(), and unlockValueProperty().
|
protectedpure virtual |
commits the content of the control (e.g.
the text of an edit field) into the column model (e.g. the "Text" property of the model).
To be overwritten in derived classes.
Implemented in DbTextField, DbFormattedField, DbCheckBox, DbComboBox, DbListBox, DbPatternField, DbDateField, DbTimeField, DbCurrencyField, DbNumericField, and DbFilterField.
Referenced by Commit().
|
pure virtual |
Implemented in DbTextField, DbFormattedField, DbCheckBox, DbComboBox, DbListBox, DbPatternField, DbSpinField, and DbFilterField.
|
protected |
Definition at line 594 of file gridcell.cxx.
References implDoPropertyListening().
Referenced by DbComboBox::DbComboBox(), DbCurrencyField::DbCurrencyField(), DbDateField::DbDateField(), DbFormattedField::DbFormattedField(), DbLimitedLengthField::DbLimitedLengthField(), DbListBox::DbListBox(), DbNumericField::DbNumericField(), DbPatternField::DbPatternField(), and DbTimeField::DbTimeField().
|
inlineprotected |
Definition at line 208 of file gridcell.hxx.
References m_xCursor.
Referenced by DbPatternField::GetFormatText().
|
pure virtual |
Implemented in DbTextField, DbFormattedField, DbCheckBox, DbComboBox, DbListBox, DbPatternField, DbDateField, DbTimeField, DbCurrencyField, DbNumericField, and DbFilterField.
Referenced by PaintFieldToCell().
double DbCellControl::GetValue | ( | const css::uno::Reference< css::sdb::XColumn > & | _rxField, |
const css::uno::Reference< css::util::XNumberFormatter > & | xFormatter | ||
) | const |
Definition at line 964 of file gridcell.cxx.
References Exception, DbGridColumn::GetKey(), DbGridColumn::IsNumeric(), and m_rColumn.
|
inline |
Definition at line 254 of file gridcell.hxx.
References ENSURE_OR_THROW, and m_pWindow.
|
private |
updates the "enabled" setting on m_pWindow, according to the respective property value in the given model
Definition at line 817 of file gridcell.cxx.
References DBG_ASSERT, FM_PROP_ENABLED, and m_pWindow.
Referenced by _propertyChanged(), and Init().
|
protectedvirtual |
Reimplemented in DbLimitedLengthField, DbComboBox, DbListBox, DbPatternField, DbDateField, DbTimeField, DbCurrencyField, and DbNumericField.
Definition at line 631 of file gridcell.cxx.
Referenced by _propertyChanged(), and DbSpinField::Init().
|
private |
updates the "readonly" setting on m_pWindow, according to the respective property value in the given model
Definition at line 802 of file gridcell.cxx.
References bReadOnly, DBG_ASSERT, FM_PROP_ISREADONLY, FM_PROP_READONLY, DbGridColumn::IsReadOnly(), m_pWindow, and m_rColumn.
Referenced by _propertyChanged(), and Init().
|
private |
Definition at line 572 of file gridcell.cxx.
References DBG_ASSERT, Exception, DbGridColumn::getModel(), m_pModelChangeBroadcaster, m_rColumn, and TOOLS_WARN_EXCEPTION.
Referenced by DbCellControl(), and doPropertyListening().
void DbCellControl::ImplInitWindow | ( | vcl::Window const & | rParent, |
const InitWindowFacet | _eInitWhat | ||
) |
Definition at line 696 of file gridcell.cxx.
References Background, Font, Foreground, vcl::Window::GetBackground(), vcl::Window::GetControlBackground(), vcl::Window::GetControlFont(), vcl::Window::GetControlForeground(), Fraction::GetDenominator(), StyleSettings::GetFieldFont(), OutputDevice::GetFillColor(), vcl::Font::GetFontSize(), Fraction::GetNumerator(), vcl::Window::GetOutDev(), Application::GetSettings(), AllSettings::GetStyleSettings(), vcl::Window::GetTextColor(), vcl::Window::GetTextLineColor(), vcl::Window::GetZoom(), Size::Height(), vcl::Window::IsControlBackground(), vcl::Window::IsControlFont(), vcl::Window::IsControlForeground(), vcl::Window::IsRTLEnabled(), vcl::Window::IsTextLineColor(), isTransparent(), m_pPainter, m_pWindow, vcl::Font::Merge(), vcl::Font::SetFontSize(), Size::setHeight(), vcl::Font::SetTransparent(), Size::setWidth(), Size::Width(), and WritingMode.
Referenced by Init().
|
protected |
Definition at line 618 of file gridcell.cxx.
References DbGridColumn::getModel(), isValuePropertyLocked(), m_pWindow, m_rColumn, and updateFromModel().
Referenced by _propertyChanged().
|
virtual |
Reimplemented in DbSpinField, DbTextField, DbFormattedField, DbCheckBox, DbComboBox, DbListBox, DbPatternField, and DbFilterField.
Definition at line 829 of file gridcell.cxx.
References AlignControl(), All, DBG_UNHANDLED_EXCEPTION, Exception, FM_PROP_ENABLED, FM_PROP_MOUSE_WHEEL_BEHAVIOR, FM_PROP_READONLY, DbGridColumn::GetAlignment(), DbGridColumn::getModel(), AllSettings::GetMouseSettings(), implAdjustEnabled(), implAdjustReadOnly(), ImplInitWindow(), isAlignedController(), m_pWindow, m_rColumn, m_xCursor, AllSettings::SetMouseSettings(), MouseSettings::SetWheelBehavior(), updateFromModel(), and xModel.
Referenced by DbSpinField::Init(), DbTextField::Init(), DbFormattedField::Init(), DbCheckBox::Init(), DbComboBox::Init(), DbListBox::Init(), DbPatternField::Init(), and DbFilterField::Init().
|
protected |
Definition at line 996 of file gridcell.cxx.
References DbGridColumn::GetId(), DbGridColumn::GetParent(), m_rColumn, and DbGridControl::refreshController().
Referenced by DbComboBox::SetList(), and DbListBox::SetList().
|
inline |
|
inlineprotected |
Definition at line 211 of file gridcell.hxx.
References m_bTransparent.
Referenced by ImplInitWindow().
|
inlineprotected |
determined whether or not the value property is locked
Definition at line 326 of file gridcell.hxx.
References m_bAccessingValueProperty.
Referenced by _propertyChanged(), implValuePropertyChanged(), lockValueProperty(), and unlockValueProperty().
|
inlineprotected |
locks the listening at the value property.
This means that every subsequent change now done on the value property of the model ("Text", or "Value", or whatever) is then ignored.
This base class uses this setting in <method>Commit</method>.
@precond Value locking can't be nested
Definition at line 332 of file gridcell.hxx.
References isValuePropertyLocked(), and m_bAccessingValueProperty.
Referenced by Commit().
|
virtual |
Reimplemented in DbCheckBox, and DbFilterField.
Definition at line 952 of file gridcell.cxx.
References tools::Rectangle::GetSize(), m_pPainter, and tools::Rectangle::TopLeft().
Referenced by DbCheckBox::PaintCell(), DbFilterField::PaintCell(), and PaintFieldToCell().
|
virtual |
Reimplemented in DbTextField, and DbCheckBox.
Definition at line 958 of file gridcell.cxx.
References GetFormatText(), m_pPainter, and PaintCell().
Referenced by DbTextField::PaintFieldToCell(), and DbCheckBox::PaintFieldToCell().
|
inlineprotected |
Definition at line 215 of file gridcell.hxx.
References m_bAlignedController.
Referenced by DbCheckBox::DbCheckBox(), DbComboBox::DbComboBox(), DbFilterField::DbFilterField(), and DbListBox::DbListBox().
void DbCellControl::SetTextLineColor | ( | ) |
Definition at line 888 of file gridcell.cxx.
References m_pPainter, and m_pWindow.
void DbCellControl::SetTextLineColor | ( | const Color & | _rColor | ) |
Definition at line 897 of file gridcell.cxx.
References m_pPainter, and m_pWindow.
|
inlineprotected |
Definition at line 212 of file gridcell.hxx.
References m_bTransparent.
Referenced by DbCheckBox::Init().
|
inlineprotected |
unlocks the listening at the value property
Definition at line 339 of file gridcell.hxx.
References isValuePropertyLocked(), and m_bAccessingValueProperty.
Referenced by Commit().
|
inlinevirtual |
Reimplemented in DbFilterField.
Definition at line 277 of file gridcell.hxx.
|
pure virtual |
Implemented in DbTextField, DbFormattedField, DbCheckBox, DbComboBox, DbListBox, DbPatternField, DbDateField, DbTimeField, DbCurrencyField, DbNumericField, and DbFilterField.
|
protectedpure virtual |
updates the current content of the control (e.g.
the text of an edit field) from the column model (e.g. the "Text" property of the model).
To be overwritten in derived classes.
@precond NULL != _rxModel @precond NULL != m_pWindow
Implemented in DbTextField, DbFormattedField, DbCheckBox, DbComboBox, DbListBox, DbPatternField, DbDateField, DbTimeField, DbCurrencyField, DbNumericField, and DbFilterField.
Referenced by implValuePropertyChanged(), and Init().
|
private |
Definition at line 196 of file gridcell.hxx.
Referenced by isValuePropertyLocked(), lockValueProperty(), and unlockValueProperty().
|
private |
Definition at line 195 of file gridcell.hxx.
Referenced by isAlignedController(), and setAlignedController().
|
private |
Definition at line 194 of file gridcell.hxx.
Referenced by isTransparent(), and setTransparent().
|
private |
Definition at line 191 of file gridcell.hxx.
Referenced by DbCellControl(), and ~DbCellControl().
|
private |
Definition at line 190 of file gridcell.hxx.
Referenced by DbCellControl(), implDoPropertyListening(), and ~DbCellControl().
|
protected |
Definition at line 203 of file gridcell.hxx.
Referenced by DbFormattedField::_propertyChanged(), AlignControl(), DbFilterField::CreateControl(), DbFormattedField::GetFormatText(), DbDateField::GetFormatText(), DbTimeField::GetFormatText(), DbCurrencyField::GetFormatText(), DbNumericField::GetFormatText(), DbPatternField::impl_formatText(), DbPatternField::implAdjustGenericFieldSetting(), DbDateField::implAdjustGenericFieldSetting(), DbTimeField::implAdjustGenericFieldSetting(), DbCurrencyField::implAdjustGenericFieldSetting(), DbNumericField::implAdjustGenericFieldSetting(), ImplInitWindow(), DbLimitedLengthField::implSetEffectiveMaxTextLen(), DbSpinField::Init(), DbTextField::Init(), DbFormattedField::Init(), DbCheckBox::Init(), DbPatternField::Init(), PaintCell(), DbFilterField::PaintCell(), PaintFieldToCell(), DbCheckBox::PaintFieldToCell(), DbFilterField::SetText(), SetTextLineColor(), and ~DbCellControl().
|
protected |
Definition at line 204 of file gridcell.hxx.
Referenced by DbFormattedField::_propertyChanged(), AlignControl(), DbFormattedField::commitControl(), DbCheckBox::commitControl(), DbComboBox::commitControl(), DbListBox::commitControl(), DbPatternField::commitControl(), DbDateField::commitControl(), DbTimeField::commitControl(), DbCurrencyField::commitControl(), DbNumericField::commitControl(), DbFilterField::commitControl(), DbFilterField::CreateControl(), DbFormattedField::CreateController(), DbCheckBox::CreateController(), DbComboBox::CreateController(), DbListBox::CreateController(), DbPatternField::CreateController(), DbSpinField::CreateController(), DbFilterField::CreateController(), DbListBox::GetFormatText(), GetWindow(), implAdjustEnabled(), DbLimitedLengthField::implAdjustGenericFieldSetting(), DbPatternField::implAdjustGenericFieldSetting(), DbDateField::implAdjustGenericFieldSetting(), DbTimeField::implAdjustGenericFieldSetting(), DbCurrencyField::implAdjustGenericFieldSetting(), DbNumericField::implAdjustGenericFieldSetting(), implAdjustReadOnly(), ImplInitWindow(), implValuePropertyChanged(), DbSpinField::Init(), Init(), DbTextField::Init(), DbFormattedField::Init(), DbCheckBox::Init(), DbComboBox::Init(), DbListBox::Init(), DbPatternField::Init(), DbFilterField::Init(), DbCheckBox::PaintCell(), DbFilterField::PaintCell(), DbComboBox::SetList(), DbListBox::SetList(), DbFilterField::SetList(), DbFilterField::SetText(), SetTextLineColor(), DbFilterField::Update(), DbFormattedField::UpdateFromField(), DbCheckBox::UpdateFromField(), DbComboBox::UpdateFromField(), DbListBox::UpdateFromField(), DbPatternField::UpdateFromField(), DbDateField::UpdateFromField(), DbTimeField::UpdateFromField(), DbCurrencyField::UpdateFromField(), DbNumericField::UpdateFromField(), DbTextField::updateFromModel(), DbFormattedField::updateFromModel(), DbCheckBox::updateFromModel(), DbComboBox::updateFromModel(), DbListBox::updateFromModel(), DbPatternField::updateFromModel(), DbDateField::updateFromModel(), DbTimeField::updateFromModel(), DbCurrencyField::updateFromModel(), DbNumericField::updateFromModel(), DbFilterField::updateFromModel(), ~DbCellControl(), and DbFilterField::~DbFilterField().
|
protected |
Definition at line 202 of file gridcell.hxx.
Referenced by _propertyChanged(), DbTextField::commitControl(), DbFormattedField::commitControl(), DbCheckBox::commitControl(), DbComboBox::commitControl(), DbListBox::commitControl(), DbPatternField::commitControl(), DbDateField::commitControl(), DbTimeField::commitControl(), DbCurrencyField::commitControl(), DbNumericField::commitControl(), DbFilterField::commitControl(), DbFormattedField::GetFormatText(), DbPatternField::GetFormatText(), GetValue(), DbNumericField::implAdjustGenericFieldSetting(), implAdjustReadOnly(), implDoPropertyListening(), implValuePropertyChanged(), DbSpinField::Init(), Init(), DbTextField::Init(), DbFormattedField::Init(), DbCheckBox::Init(), DbComboBox::Init(), DbListBox::Init(), DbPatternField::Init(), DbFilterField::Init(), invalidatedController(), DbListBox::SetList(), DbFilterField::SetList(), DbFilterField::SetText(), DbFilterField::Update(), and DbFormattedField::UpdateFromField().
|
private |
Definition at line 199 of file gridcell.hxx.
Referenced by getCursor(), and Init().