diff options
author | Oliver Specht <oliver.specht@cib.de> | 2015-09-29 15:35:28 +0200 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2015-10-01 08:32:26 +0000 |
commit | 85f93697defd9a812a0cda0bc4e9364e28c0339e (patch) | |
tree | 0c43827cda0e18b03c3d28599b696bcab3a8069a /svx/source/fmcomp | |
parent | c1e0a697a70872ef1b6deaf5222538899554221b (diff) |
tdf#94559: third step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
oox, reportdesign, svl, svtools, svx, tools
Change-Id: I1f85ff92267a0668eba625fa61b4f07feb8f3d4e
Reviewed-on: https://gerrit.libreoffice.org/19002
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'svx/source/fmcomp')
-rw-r--r-- | svx/source/fmcomp/fmgridcl.cxx | 2 | ||||
-rw-r--r-- | svx/source/fmcomp/gridcell.cxx | 20 | ||||
-rw-r--r-- | svx/source/fmcomp/gridctrl.cxx | 2 |
3 files changed, 12 insertions, 12 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx index 223081356ac2..03fc375304ae 100644 --- a/svx/source/fmcomp/fmgridcl.cxx +++ b/svx/source/fmcomp/fmgridcl.cxx @@ -768,7 +768,7 @@ void FmGridHeader::PreExecuteColumnContextMenu(sal_uInt16 nColId, PopupMenu& rMe if (eState >= SfxItemState::DEFAULT && pItem ) { - bool bChecked = pItem->ISA(SfxBoolItem) && static_cast<SfxBoolItem*>(pItem)->GetValue(); + bool bChecked = dynamic_cast<const SfxBoolItem*>( pItem) != nullptr && static_cast<SfxBoolItem*>(pItem)->GetValue(); rMenu.CheckItem(SID_FM_SHOW_PROPERTY_BROWSER,bChecked); } delete pItem; diff --git a/svx/source/fmcomp/gridcell.cxx b/svx/source/fmcomp/gridcell.cxx index b73b821cb733..ede090dc555f 100644 --- a/svx/source/fmcomp/gridcell.cxx +++ b/svx/source/fmcomp/gridcell.cxx @@ -263,11 +263,11 @@ void DbGridColumn::impl_toggleScriptManager_nothrow( bool _bAttach ) void DbGridColumn::UpdateFromField(const DbGridRow* pRow, const Reference< XNumberFormatter >& xFormatter) { - if (m_pCell && m_pCell->ISA(FmXFilterCell)) - PTR_CAST(FmXFilterCell, m_pCell)->Update(); + if (m_pCell && dynamic_cast<const FmXFilterCell*>( m_pCell) != nullptr) + dynamic_cast<FmXFilterCell*>( m_pCell)->Update( ); else if (pRow && pRow->IsValid() && m_nFieldPos >= 0 && m_pCell && pRow->HasField(m_nFieldPos)) { - PTR_CAST(FmXDataCell, m_pCell)->UpdateFromField( pRow->GetField( m_nFieldPos ).getColumn(), xFormatter ); + dynamic_cast<FmXDataCell*>( m_pCell)->UpdateFromField( pRow->GetField( m_nFieldPos ).getColumn(), xFormatter ); } } @@ -281,7 +281,7 @@ bool DbGridColumn::Commit() bResult = m_pCell->Commit(); // store the data into the model - FmXDataCell* pDataCell = PTR_CAST(FmXDataCell, m_pCell); + FmXDataCell* pDataCell = dynamic_cast<FmXDataCell*>( m_pCell ); if (bResult && pDataCell) { Reference< ::com::sun::star::form::XBoundComponent > xComp(m_xModel, UNO_QUERY); @@ -413,7 +413,7 @@ void DbGridColumn::setLock(bool _bLock) OUString DbGridColumn::GetCellText(const DbGridRow* pRow, const Reference< XNumberFormatter >& xFormatter) const { OUString aText; - if (m_pCell && m_pCell->ISA(FmXFilterCell)) + if (m_pCell && dynamic_cast<const FmXFilterCell*>( m_pCell) != nullptr) return aText; if (!pRow || !pRow->IsValid()) @@ -431,7 +431,7 @@ OUString DbGridColumn::GetCellText(const Reference< ::com::sun::star::sdb::XColu OUString aText; if (xField.is()) { - FmXTextCell* pTextCell = PTR_CAST(FmXTextCell, m_pCell); + FmXTextCell* pTextCell = dynamic_cast<FmXTextCell*>( m_pCell ); if (pTextCell) aText = pTextCell->GetText(xField, xFormatter); else if (m_bObject) @@ -461,7 +461,7 @@ void DbGridColumn::Paint(OutputDevice& rDev, bool bEnabled = ( rDev.GetOutDevType() != OUTDEV_WINDOW ) || ( static_cast< vcl::Window& >( rDev ).IsEnabled() ); - FmXDataCell* pDataCell = PTR_CAST(FmXDataCell, m_pCell); + FmXDataCell* pDataCell = dynamic_cast<FmXDataCell*>( m_pCell ); if (pDataCell) { if (!pRow || !pRow->IsValid()) @@ -515,7 +515,7 @@ void DbGridColumn::Paint(OutputDevice& rDev, rDev.DrawText(rRect, OUString(OBJECTTEXT), nStyle); } } - else if ( m_pCell->ISA( FmXFilterCell ) ) + else if ( dynamic_cast<const FmXFilterCell*>( m_pCell) != nullptr ) static_cast< FmXFilterCell* >( m_pCell )->PaintCell( rDev, rRect ); } @@ -3588,7 +3588,7 @@ FmXEditCell::FmXEditCell( DbGridColumn* pColumn, DbCellControl& _rControl ) ,m_bOwnEditImplementation( false ) { - DbTextField* pTextField = PTR_CAST( DbTextField, &_rControl ); + DbTextField* pTextField = dynamic_cast<DbTextField*>( &_rControl ); if ( pTextField ) { @@ -4546,7 +4546,7 @@ FmXFilterCell::FmXFilterCell(DbGridColumn* pColumn, DbCellControl* pControl ) ,m_aTextListeners(m_aMutex) { - DBG_ASSERT( m_pCellControl->ISA( DbFilterField ), "FmXFilterCell::FmXFilterCell: invalid cell control!" ); + DBG_ASSERT( dynamic_cast<const DbFilterField*>( m_pCellControl) != nullptr, "FmXFilterCell::FmXFilterCell: invalid cell control!" ); static_cast< DbFilterField* >( m_pCellControl )->SetCommitHdl( LINK( this, FmXFilterCell, OnCommit ) ); } diff --git a/svx/source/fmcomp/gridctrl.cxx b/svx/source/fmcomp/gridctrl.cxx index fdd2bddd25db..d1ff468c4239 100644 --- a/svx/source/fmcomp/gridctrl.cxx +++ b/svx/source/fmcomp/gridctrl.cxx @@ -2893,7 +2893,7 @@ CellController* DbGridControl::GetController(long /*nRow*/, sal_uInt16 nColumnId if (pReturn) { // if it is an edit row, it is possible to give it a forced read-only property - if (!pReturn->ISA(EditCellController) && !pReturn->ISA(SpinCellController)) + if ( dynamic_cast<const EditCellController*>( pReturn) == nullptr && dynamic_cast<const SpinCellController*>( pReturn) == nullptr ) // controller could not be set to read-only in forceROController if (!bInsert && !bUpdate) // better use no controller than one without read-only |