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
 
svt::ControlBaseGetWindow () 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

DbGridColumnm_rColumn
 
VclPtr< svt::ControlBasem_pPainter
 
VclPtr< svt::ControlBasem_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::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 185 of file gridcell.hxx.

Constructor & Destructor Documentation

◆ DbCellControl()

DbCellControl::DbCellControl ( DbGridColumn _rColumn)

◆ ~DbCellControl()

DbCellControl::~DbCellControl ( )
overridevirtual

Member Function Documentation

◆ _propertyChanged()

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

◆ AlignControl()

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().

◆ Commit()

bool DbCellControl::Commit ( )

◆ commitControl()

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 DbTextField, DbFormattedField, DbCheckBox, DbComboBox, DbListBox, DbPatternField, DbDateField, DbTimeField, DbCurrencyField, DbNumericField, and DbFilterField.

Referenced by Commit().

◆ CreateController()

virtual ::svt::CellControllerRef DbCellControl::CreateController ( ) const
pure virtual

◆ doPropertyListening()

void DbCellControl::doPropertyListening ( const OUString &  _rPropertyName)
protected

◆ getCursor()

const css::uno::Reference< css::sdbc::XRowSet > & DbCellControl::getCursor ( ) const
inlineprotected

Definition at line 208 of file gridcell.hxx.

References m_xCursor.

Referenced by DbPatternField::GetFormatText().

◆ GetFormatText()

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

◆ GetValue()

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.

◆ GetWindow()

svt::ControlBase & DbCellControl::GetWindow ( ) const
inline

Definition at line 254 of file gridcell.hxx.

References ENSURE_OR_THROW, and m_pWindow.

◆ implAdjustEnabled()

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 817 of file gridcell.cxx.

References DBG_ASSERT, FM_PROP_ENABLED, and m_pWindow.

Referenced by _propertyChanged(), and Init().

◆ implAdjustGenericFieldSetting()

void DbCellControl::implAdjustGenericFieldSetting ( const css::uno::Reference< css::beans::XPropertySet > &  _rxModel)
protectedvirtual

◆ implAdjustReadOnly()

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 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().

◆ implDoPropertyListening()

void DbCellControl::implDoPropertyListening ( const OUString &  _rPropertyName,
bool  _bWarnIfNotExistent 
)
private

◆ ImplInitWindow()

void DbCellControl::ImplInitWindow ( vcl::Window const &  rParent,
const InitWindowFacet  _eInitWhat 
)

◆ implValuePropertyChanged()

void DbCellControl::implValuePropertyChanged ( )
protected

◆ Init()

void DbCellControl::Init ( BrowserDataWin rParent,
const css::uno::Reference< css::sdbc::XRowSet > &  xCursor 
)
virtual

◆ invalidatedController()

void DbCellControl::invalidatedController ( )
protected

◆ isAlignedController()

bool DbCellControl::isAlignedController ( ) const
inline

Definition at line 261 of file gridcell.hxx.

References m_bAlignedController.

Referenced by Init().

◆ isTransparent()

bool DbCellControl::isTransparent ( ) const
inlineprotected

Definition at line 211 of file gridcell.hxx.

References m_bTransparent.

Referenced by ImplInitWindow().

◆ isValuePropertyLocked()

bool DbCellControl::isValuePropertyLocked ( ) const
inlineprotected

determined whether or not the value property is locked

See also
lockValueProperty

Definition at line 326 of file gridcell.hxx.

References m_bAccessingValueProperty.

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

◆ lockValueProperty()

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>.

@precond Value locking can't be nested

See also
unlockValueProperty

Definition at line 332 of file gridcell.hxx.

References isValuePropertyLocked(), and m_bAccessingValueProperty.

Referenced by Commit().

◆ PaintCell()

void DbCellControl::PaintCell ( OutputDevice _rDev,
const tools::Rectangle _rRect 
)
virtual

◆ PaintFieldToCell()

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

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().

◆ setAlignedController()

void DbCellControl::setAlignedController ( bool  _bAlign)
inlineprotected

◆ SetTextLineColor() [1/2]

void DbCellControl::SetTextLineColor ( )

Definition at line 888 of file gridcell.cxx.

References m_pPainter, and m_pWindow.

◆ SetTextLineColor() [2/2]

void DbCellControl::SetTextLineColor ( const Color _rColor)

Definition at line 897 of file gridcell.cxx.

References m_pPainter, and m_pWindow.

◆ setTransparent()

void DbCellControl::setTransparent ( bool  _bSet)
inlineprotected

Definition at line 212 of file gridcell.hxx.

References m_bTransparent.

Referenced by DbCheckBox::Init().

◆ unlockValueProperty()

void DbCellControl::unlockValueProperty ( )
inlineprotected

unlocks the listening at the value property

See also
lockValueProperty

Definition at line 339 of file gridcell.hxx.

References isValuePropertyLocked(), and m_bAccessingValueProperty.

Referenced by Commit().

◆ Update()

virtual void DbCellControl::Update ( )
inlinevirtual

Reimplemented in DbFilterField.

Definition at line 277 of file gridcell.hxx.

◆ UpdateFromField()

virtual void DbCellControl::UpdateFromField ( const css::uno::Reference< css::sdb::XColumn > &  _rxField,
const css::uno::Reference< css::util::XNumberFormatter > &  xFormatter 
)
pure virtual

◆ updateFromModel()

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.

@precond NULL != _rxModel @precond NULL != m_pWindow

See also
commitControl

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

Referenced by implValuePropertyChanged(), and Init().

Member Data Documentation

◆ m_bAccessingValueProperty

bool DbCellControl::m_bAccessingValueProperty
private

Definition at line 196 of file gridcell.hxx.

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

◆ m_bAlignedController

bool DbCellControl::m_bAlignedController
private

Definition at line 195 of file gridcell.hxx.

Referenced by isAlignedController(), and setAlignedController().

◆ m_bTransparent

bool DbCellControl::m_bTransparent
private

Definition at line 194 of file gridcell.hxx.

Referenced by isTransparent(), and setTransparent().

◆ m_pFieldChangeBroadcaster

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

Definition at line 191 of file gridcell.hxx.

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

◆ m_pModelChangeBroadcaster

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

Definition at line 190 of file gridcell.hxx.

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

◆ m_pPainter

VclPtr<svt::ControlBase> DbCellControl::m_pPainter
protected

◆ m_pWindow

VclPtr<svt::ControlBase> DbCellControl::m_pWindow
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().

◆ m_rColumn

DbGridColumn& DbCellControl::m_rColumn
protected

◆ m_xCursor

css::uno::Reference< css::sdbc::XRowSet > DbCellControl::m_xCursor
private

Definition at line 199 of file gridcell.hxx.

Referenced by getCursor(), and Init().


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