[Libreoffice-commits] core.git: svx/source
Noel Grandin
noel.grandin at collabora.co.uk
Fri May 18 18:02:41 UTC 2018
svx/source/fmcomp/gridcell.cxx | 8 +++-----
svx/source/inc/gridcell.hxx | 2 +-
2 files changed, 4 insertions(+), 6 deletions(-)
New commits:
commit c845135b7b605257b5c94b382d88627282cb05a3
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date: Fri May 18 10:54:00 2018 +0200
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 at libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>
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 ) );
}
diff --git a/svx/source/inc/gridcell.hxx b/svx/source/inc/gridcell.hxx
index c412fffcd915..7574d90dbac2 100644
--- a/svx/source/inc/gridcell.hxx
+++ b/svx/source/inc/gridcell.hxx
@@ -1052,7 +1052,7 @@ class FmXFilterCell final : public FmXGridCell
,public FmXFilterCell_Base
{
public:
- FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl);
+ FmXFilterCell(DbGridColumn* pColumn, DbFilterField* pControl);
DECLARE_UNO3_AGG_DEFAULTS(FmXFilterCell, FmXGridCell)
More information about the Libreoffice-commits
mailing list