LibreOffice Module svx (master)
1
|
#include <gridcell.hxx>
Public Member Functions | |
DbCellControl (DbGridColumn &_rColumn) | |
virtual | ~DbCellControl () override |
vcl::Window & | 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 |
![]() | |
OPropertyChangeListener (::osl::Mutex &_rMutex) | |
virtual | ~OPropertyChangeListener () |
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 |
![]() | |
void | disposeAdapter () |
void | setAdapter (OPropertyChangeMultiplexer *_pAdapter) |
Protected Attributes | |
DbGridColumn & | m_rColumn |
VclPtr< vcl::Window > | m_pPainter |
VclPtr< vcl::Window > | m_pWindow |
![]() | |
::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 196 of file gridcell.hxx.
DbCellControl::DbCellControl | ( | DbGridColumn & | _rColumn | ) |
Definition at line 519 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 607 of file gridcell.cxx.
References VclPtr< vcl::Window >::disposeAndClear(), lcl_clearBroadCaster(), m_pFieldChangeBroadcaster, m_pModelChangeBroadcaster, m_pPainter, and m_pWindow.
|
overrideprotectedvirtual |
Implements comphelper::OPropertyChangeListener.
Reimplemented in DbListBox, DbComboBox, and DbFormattedField.
Definition at line 635 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 931 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 674 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 DbFilterField, DbNumericField, DbCurrencyField, DbTimeField, DbDateField, DbPatternField, DbListBox, DbComboBox, DbCheckBox, DbFormattedField, and DbTextField.
Referenced by Commit().
|
pure virtual |
Implemented in DbFilterField, DbSpinField, DbPatternField, DbListBox, DbComboBox, DbCheckBox, DbFormattedField, and DbTextField.
|
protected |
Definition at line 592 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 219 of file gridcell.hxx.
References m_xCursor.
Referenced by DbPatternField::GetFormatText().
|
pure virtual |
Implemented in DbFilterField, DbNumericField, DbCurrencyField, DbTimeField, DbDateField, DbPatternField, DbListBox, DbComboBox, DbCheckBox, DbFormattedField, and DbTextField.
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 963 of file gridcell.cxx.
References Exception, DbGridColumn::GetKey(), DbGridColumn::IsNumeric(), and m_rColumn.
|
inline |
Definition at line 266 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 816 of file gridcell.cxx.
References DBG_ASSERT, vcl::Window::Enable(), FM_PROP_ENABLED, and m_pWindow.
Referenced by _propertyChanged(), and Init().
|
protectedvirtual |
Reimplemented in DbNumericField, DbCurrencyField, DbTimeField, DbDateField, DbPatternField, DbListBox, DbComboBox, and DbLimitedLengthField.
Definition at line 629 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 797 of file gridcell.cxx.
References bReadOnly, DBG_ASSERT, FM_PROP_ISREADONLY, FM_PROP_READONLY, VclPtr< vcl::Window >::get(), DbGridColumn::IsReadOnly(), m_pWindow, and m_rColumn.
Referenced by _propertyChanged(), and Init().
|
private |
Definition at line 570 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 694 of file gridcell.cxx.
References Background, vcl::Window::EnableRTL(), Font, Foreground, OutputDevice::GetBackground(), vcl::Window::GetControlBackground(), vcl::Window::GetControlFont(), vcl::Window::GetControlForeground(), StyleSettings::GetFieldFont(), OutputDevice::GetFillColor(), OutputDevice::GetTextColor(), OutputDevice::GetTextLineColor(), vcl::Window::GetZoom(), vcl::Window::IsControlBackground(), vcl::Window::IsControlFont(), vcl::Window::IsControlForeground(), OutputDevice::IsRTLEnabled(), OutputDevice::IsTextLineColor(), isTransparent(), m_pPainter, m_pWindow, vcl::Font::Merge(), OutputDevice::SetBackground(), OutputDevice::SetFillColor(), vcl::Font::SetTransparent(), and WritingMode.
Referenced by Init().
|
protected |
Definition at line 616 of file gridcell.cxx.
References DbGridColumn::getModel(), isValuePropertyLocked(), m_pWindow, m_rColumn, and updateFromModel().
Referenced by _propertyChanged().
|
virtual |
Reimplemented in DbFilterField, DbSpinField, DbPatternField, DbListBox, DbComboBox, DbCheckBox, DbFormattedField, and DbTextField.
Definition at line 828 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(), OutputDevice::GetSettings(), implAdjustEnabled(), implAdjustReadOnly(), ImplInitWindow(), isAlignedController(), m_pWindow, m_rColumn, m_xCursor, AllSettings::SetMouseSettings(), vcl::Window::SetSettings(), MouseSettings::SetWheelBehavior(), updateFromModel(), and xModel.
Referenced by DbTextField::Init(), DbFormattedField::Init(), DbCheckBox::Init(), DbComboBox::Init(), DbListBox::Init(), DbPatternField::Init(), DbSpinField::Init(), and DbFilterField::Init().
|
protected |
Definition at line 995 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 222 of file gridcell.hxx.
References m_bTransparent.
Referenced by ImplInitWindow().
|
inlineprotected |
determined whether or not the value property is locked
Definition at line 338 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>.
Value locking can't be nested
Definition at line 344 of file gridcell.hxx.
References isValuePropertyLocked(), and m_bAccessingValueProperty.
Referenced by Commit().
|
virtual |
Reimplemented in DbFilterField.
Definition at line 951 of file gridcell.cxx.
References vcl::Window::Draw(), tools::Rectangle::GetSize(), m_pPainter, vcl::Window::SetSizePixel(), and tools::Rectangle::TopLeft().
Referenced by DbFilterField::PaintCell(), and PaintFieldToCell().
|
virtual |
Reimplemented in DbCheckBox, and DbTextField.
Definition at line 957 of file gridcell.cxx.
References GetFormatText(), m_pPainter, PaintCell(), and vcl::Window::SetText().
Referenced by DbTextField::PaintFieldToCell(), and DbCheckBox::PaintFieldToCell().
|
inlineprotected |
Definition at line 226 of file gridcell.hxx.
References m_bAlignedController.
Referenced by DbCheckBox::DbCheckBox(), DbComboBox::DbComboBox(), DbFilterField::DbFilterField(), and DbListBox::DbListBox().
void DbCellControl::SetTextLineColor | ( | ) |
Definition at line 887 of file gridcell.cxx.
References m_pPainter, m_pWindow, and OutputDevice::SetTextLineColor().
Definition at line 896 of file gridcell.cxx.
References m_pPainter, m_pWindow, and OutputDevice::SetTextLineColor().
|
inlineprotected |
Definition at line 223 of file gridcell.hxx.
References m_bTransparent.
Referenced by DbCheckBox::Init().
|
inlineprotected |
unlocks the listening at the value property
Definition at line 351 of file gridcell.hxx.
References isValuePropertyLocked(), and m_bAccessingValueProperty.
Referenced by Commit().
|
inlinevirtual |
Reimplemented in DbFilterField.
Definition at line 289 of file gridcell.hxx.
|
pure virtual |
Implemented in DbFilterField, DbNumericField, DbCurrencyField, DbTimeField, DbDateField, DbPatternField, DbListBox, DbComboBox, DbCheckBox, DbFormattedField, and DbTextField.
|
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.
NULL != _rxModel NULL != m_pWindow
Implemented in DbFilterField, DbNumericField, DbCurrencyField, DbTimeField, DbDateField, DbPatternField, DbListBox, DbComboBox, DbCheckBox, DbFormattedField, and DbTextField.
Referenced by implValuePropertyChanged(), and Init().
|
private |
Definition at line 207 of file gridcell.hxx.
Referenced by isValuePropertyLocked(), lockValueProperty(), and unlockValueProperty().
|
private |
Definition at line 206 of file gridcell.hxx.
Referenced by isAlignedController(), and setAlignedController().
|
private |
Definition at line 205 of file gridcell.hxx.
Referenced by isTransparent(), and setTransparent().
|
private |
Definition at line 202 of file gridcell.hxx.
Referenced by DbCellControl(), and ~DbCellControl().
|
private |
Definition at line 201 of file gridcell.hxx.
Referenced by DbCellControl(), implDoPropertyListening(), and ~DbCellControl().
|
protected |
Definition at line 214 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(), DbTextField::Init(), DbFormattedField::Init(), DbCheckBox::Init(), DbPatternField::Init(), DbSpinField::Init(), PaintCell(), DbFilterField::PaintCell(), PaintFieldToCell(), DbCheckBox::PaintFieldToCell(), DbFilterField::SetText(), SetTextLineColor(), and ~DbCellControl().
|
protected |
Definition at line 215 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(), Init(), DbTextField::Init(), DbFormattedField::Init(), DbCheckBox::Init(), DbComboBox::Init(), DbListBox::Init(), DbPatternField::Init(), DbSpinField::Init(), DbFilterField::Init(), 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 213 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(), Init(), DbTextField::Init(), DbFormattedField::Init(), DbCheckBox::Init(), DbComboBox::Init(), DbListBox::Init(), DbPatternField::Init(), DbSpinField::Init(), DbFilterField::Init(), invalidatedController(), DbListBox::SetList(), DbFilterField::SetList(), DbFilterField::SetText(), DbFilterField::Update(), and DbFormattedField::UpdateFromField().
|
private |
Definition at line 210 of file gridcell.hxx.
Referenced by getCursor(), and Init().