diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-18 10:54:00 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-05-18 20:02:14 +0200 |
commit | c845135b7b605257b5c94b382d88627282cb05a3 (patch) | |
tree | 21365778f6580f020c71240c488f0795ecaac944 /svx/source/fmcomp/gridcell.cxx | |
parent | 9e60d29be40dfcc66604cb642e699d4febf032dc (diff) |
simplify FmXFilterCell constructor
if it wants a DbFilterControl, just take a DbFilterControl
Change-Id: I43f08062be1c6c7c052c43de912a81afe409c928
Reviewed-on: https://gerrit.libreoffice.org/54523
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'svx/source/fmcomp/gridcell.cxx')
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index feb3c3fb9b23..8767b3efb0b5 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -213,7 +213,7 @@ void DbGridColumn::CreateControl(sal_Int32 _nFieldPos, const Reference< css::bea // now create the control wrapper if (m_rParent.IsFilterMode()) - m_pCell = new FmXFilterCell(this, pCellControl); + m_pCell = new FmXFilterCell(this, static_cast<DbFilterField*>(pCellControl)); else { switch (nTypeId) @@ -4504,13 +4504,11 @@ void FmXComboBoxCell::onWindowEvent( const VclEventId _nEventId, const vcl::Wind } -FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl ) +FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbFilterField* pControl ) :FmXGridCell( pColumn, pControl ) ,m_aTextListeners(m_aMutex) { - - DBG_ASSERT( dynamic_cast<const DbFilterField*>( m_pCellControl) != nullptr, "FmXFilterCell::FmXFilterCell: invalid cell control!" ); - static_cast< DbFilterField* >( m_pCellControl )->SetCommitHdl( LINK( this, FmXFilterCell, OnCommit ) ); + pControl->SetCommitHdl( LINK( this, FmXFilterCell, OnCommit ) ); } |