LibreOffice Module svx (master)  1
Public Member Functions | Protected Member Functions | Protected Attributes | Private Member Functions | Private Attributes | List of all members
DbCellControl Class Referenceabstract

#include <gridcell.hxx>

Inheritance diagram for DbCellControl:
[legend]
Collaboration diagram for DbCellControl:
[legend]

Public Member Functions

 DbCellControl (DbGridColumn &_rColumn)
 
virtual ~DbCellControl () override
 
vcl::WindowGetWindow () const
 
bool isAlignedController () const
 
void AlignControl (sal_Int16 nAlignment)
 
void SetTextLineColor ()
 
void SetTextLineColor (const Color &_rColor)
 
virtual void Init (vcl::Window &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, 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 _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 ()
 
void setAdapter (OPropertyChangeMultiplexer *_pAdapter)
 

Protected Attributes

DbGridColumnm_rColumn
 
VclPtr< vcl::Windowm_pPainter
 
VclPtr< vcl::Windowm_pWindow
 
- Protected Attributes inherited from FmMutexHelper
::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::OPropertyChangeMultiplexerm_pModelChangeBroadcaster
 
rtl::Reference<::comphelper::OPropertyChangeMultiplexerm_pFieldChangeBroadcaster
 
bool m_bTransparent: 1
 
bool m_bAlignedController: 1
 
bool m_bAccessingValueProperty: 1
 
css::uno::Reference< css::sdbc::XRowSet > m_xCursor
 

Detailed Description

Definition at line 196 of file gridcell.hxx.

Constructor & Destructor Documentation

DbCellControl::DbCellControl ( DbGridColumn _rColumn)
DbCellControl::~DbCellControl ( )
overridevirtual

Member Function Documentation

void DbCellControl::_propertyChanged ( const css::beans::PropertyChangeEvent &  evt)
overrideprotectedvirtual
void DbCellControl::AlignControl ( sal_Int16  nAlignment)

Definition at line 939 of file gridcell.cxx.

References m_pPainter, m_pWindow, WB_CENTER, WB_LEFT, and WB_RIGHT.

Referenced by Init().

bool DbCellControl::Commit ( )
virtual bool DbCellControl::commitControl ( )
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.

See also
updateFromModel

Implemented in DbFilterField, DbNumericField, DbCurrencyField, DbTimeField, DbDateField, DbPatternField, DbListBox, DbComboBox, DbCheckBox, DbFormattedField, and DbTextField.

Referenced by Commit().

virtual ::svt::CellControllerRef DbCellControl::CreateController ( ) const
pure virtual
void DbCellControl::doPropertyListening ( const OUString &  _rPropertyName)
protected
const css::uno::Reference< css::sdbc::XRowSet >& DbCellControl::getCursor ( ) const
inlineprotected

Definition at line 219 of file gridcell.hxx.

References m_xCursor.

Referenced by DbPatternField::GetFormatText().

virtual OUString DbCellControl::GetFormatText ( const css::uno::Reference< css::sdb::XColumn > &  _rxField,
const css::uno::Reference< css::util::XNumberFormatter > &  xFormatter,
Color **  ppColor = nullptr 
)
pure virtual
double DbCellControl::GetValue ( const css::uno::Reference< css::sdb::XColumn > &  _rxField,
const css::uno::Reference< css::util::XNumberFormatter > &  xFormatter 
) const
vcl::Window& DbCellControl::GetWindow ( ) const
inline

Definition at line 266 of file gridcell.hxx.

References ENSURE_OR_THROW, and m_pWindow.

void DbCellControl::implAdjustEnabled ( const css::uno::Reference< css::beans::XPropertySet > &  _rxModel)
private

updates the "enabled" setting on m_pWindow, according to the respective property value in the given model

Definition at line 839 of file gridcell.cxx.

References DBG_ASSERT, vcl::Window::Enable(), FM_PROP_ENABLED, and m_pWindow.

Referenced by _propertyChanged(), and Init().

void DbCellControl::implAdjustGenericFieldSetting ( const css::uno::Reference< css::beans::XPropertySet > &  _rxModel)
protectedvirtual
void DbCellControl::implAdjustReadOnly ( const css::uno::Reference< css::beans::XPropertySet > &  _rxModel,
bool  i_bReadOnly 
)
private

updates the "readonly" setting on m_pWindow, according to the respective property value in the given model

Definition at line 819 of file gridcell.cxx.

References DBG_ASSERT, FM_PROP_ISREADONLY, FM_PROP_READONLY, VclPtr< vcl::Window >::get(), DbGridColumn::IsReadOnly(), m_pWindow, and m_rColumn.

Referenced by _propertyChanged(), and Init().

void DbCellControl::implDoPropertyListening ( const OUString &  _rPropertyName,
bool  _bWarnIfNotExistent 
)
private
void DbCellControl::ImplInitWindow ( vcl::Window const &  rParent,
const InitWindowFacet  _eInitWhat 
)
void DbCellControl::implValuePropertyChanged ( )
protected
void DbCellControl::Init ( vcl::Window rParent,
const css::uno::Reference< css::sdbc::XRowSet > &  xCursor 
)
virtual
void DbCellControl::invalidatedController ( )
protected
bool DbCellControl::isAlignedController ( ) const
inline

Definition at line 273 of file gridcell.hxx.

References m_bAlignedController.

Referenced by Init().

bool DbCellControl::isTransparent ( ) const
inlineprotected

Definition at line 222 of file gridcell.hxx.

References m_bTransparent.

Referenced by ImplInitWindow().

bool DbCellControl::isValuePropertyLocked ( ) const
inlineprotected

determined whether or not the value property is locked

See also
lockValueProperty

Definition at line 338 of file gridcell.hxx.

References m_bAccessingValueProperty.

Referenced by _propertyChanged(), implValuePropertyChanged(), lockValueProperty(), and unlockValueProperty().

void DbCellControl::lockValueProperty ( )
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

See also
unlockValueProperty

Definition at line 344 of file gridcell.hxx.

References isValuePropertyLocked(), and m_bAccessingValueProperty.

Referenced by Commit().

void DbCellControl::PaintCell ( OutputDevice _rDev,
const tools::Rectangle _rRect 
)
virtual
void DbCellControl::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 DbCellControl::setAlignedController ( bool  _bAlign)
inlineprotected
void DbCellControl::SetTextLineColor ( )

Definition at line 911 of file gridcell.cxx.

References m_pPainter, m_pWindow, and OutputDevice::SetTextLineColor().

void DbCellControl::SetTextLineColor ( const Color _rColor)

Definition at line 920 of file gridcell.cxx.

References m_pPainter, m_pWindow, and OutputDevice::SetTextLineColor().

void DbCellControl::setTransparent ( bool  _bSet)
inlineprotected

Definition at line 223 of file gridcell.hxx.

References m_bTransparent.

Referenced by DbCheckBox::Init().

void DbCellControl::unlockValueProperty ( )
inlineprotected

unlocks the listening at the value property

See also
lockValueProperty

Definition at line 351 of file gridcell.hxx.

References isValuePropertyLocked(), and m_bAccessingValueProperty.

Referenced by Commit().

virtual void DbCellControl::Update ( )
inlinevirtual

Reimplemented in DbFilterField.

Definition at line 289 of file gridcell.hxx.

virtual void DbCellControl::UpdateFromField ( const css::uno::Reference< css::sdb::XColumn > &  _rxField,
const css::uno::Reference< css::util::XNumberFormatter > &  xFormatter 
)
pure virtual
virtual void DbCellControl::updateFromModel ( css::uno::Reference< css::beans::XPropertySet >  _rxModel)
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

See also
commitControl

Implemented in DbFilterField, DbNumericField, DbCurrencyField, DbTimeField, DbDateField, DbPatternField, DbListBox, DbComboBox, DbCheckBox, DbFormattedField, and DbTextField.

Referenced by implValuePropertyChanged(), and Init().

Member Data Documentation

bool DbCellControl::m_bAccessingValueProperty
private

Definition at line 207 of file gridcell.hxx.

Referenced by isValuePropertyLocked(), lockValueProperty(), and unlockValueProperty().

bool DbCellControl::m_bAlignedController
private

Definition at line 206 of file gridcell.hxx.

Referenced by isAlignedController(), and setAlignedController().

bool DbCellControl::m_bTransparent
private

Definition at line 205 of file gridcell.hxx.

Referenced by isTransparent(), and setTransparent().

rtl::Reference<::comphelper::OPropertyChangeMultiplexer> DbCellControl::m_pFieldChangeBroadcaster
private

Definition at line 202 of file gridcell.hxx.

Referenced by DbCellControl(), and ~DbCellControl().

rtl::Reference<::comphelper::OPropertyChangeMultiplexer> DbCellControl::m_pModelChangeBroadcaster
private

Definition at line 201 of file gridcell.hxx.

Referenced by DbCellControl(), implDoPropertyListening(), and ~DbCellControl().

VclPtr<vcl::Window> DbCellControl::m_pPainter
protected
VclPtr<vcl::Window> DbCellControl::m_pWindow
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(), DbComboBox::implAdjustGenericFieldSetting(), DbListBox::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().

DbGridColumn& DbCellControl::m_rColumn
protected
css::uno::Reference< css::sdbc::XRowSet > DbCellControl::m_xCursor
private

Definition at line 210 of file gridcell.hxx.

Referenced by getCursor(), and Init().


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