diff options
author | Caolán McNamara <caolanm@redhat.com> | 2020-07-29 15:56:37 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2020-07-29 21:28:01 +0200 |
commit | 28a278e8029ed5d589a948f68abc2ba29c616c1f (patch) | |
tree | 10e0cb21af96fd4edb9b48671022afc7666b1d75 /svx | |
parent | ae72d8cef6998d84471666ca3088a0f2b43946b7 (diff) |
move SetReadOnly into ControlBase as SetEditableReadOnly
and cast to that instead of "Edit" and override the Editable controls impls to
do something suitable when called
Change-Id: I24cc02b603e9551df4e3eb39f6cb4839883db777
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/99709
Tested-by: Caolán McNamara <caolanm@redhat.com>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'svx')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index 585abcdc124d..a920477e9f49 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -805,7 +805,7 @@ void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxMode DBG_ASSERT( _rxModel.is(), "DbCellControl::implAdjustReadOnly: invalid model!" ); if ( m_pWindow && _rxModel.is() ) { - Edit* pEditWindow = dynamic_cast< Edit* >( m_pWindow.get() ); + ControlBase* pEditWindow = dynamic_cast<ControlBase*>(m_pWindow.get()); if ( pEditWindow ) { bool bReadOnly = m_rColumn.IsReadOnly(); @@ -813,7 +813,7 @@ void DbCellControl::implAdjustReadOnly( const Reference< XPropertySet >& _rxMode { _rxModel->getPropertyValue( i_bReadOnly ? OUString(FM_PROP_READONLY) : OUString(FM_PROP_ISREADONLY)) >>= bReadOnly; } - pEditWindow->SetReadOnly(bReadOnly); + pEditWindow->SetEditableReadOnly(bReadOnly); } } } @@ -2748,9 +2748,9 @@ void DbFilterField::Init(BrowserDataWin& rParent, const Reference< XRowSet >& xC DbCellControl::Init( rParent, xCursor ); // filter cells are never readonly - Edit* pAsEdit = dynamic_cast< Edit* >( m_pWindow.get() ); - if ( pAsEdit ) - pAsEdit->SetReadOnly( false ); + ControlBase* pAsEdit = dynamic_cast<ControlBase*>(m_pWindow.get()); + if (pAsEdit) + pAsEdit->SetEditableReadOnly(false); } CellControllerRef DbFilterField::CreateController() const |