diff options
author | Oliver Specht <oliver.specht@cib.de> | 2015-09-28 11:42:43 +0200 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2015-09-29 12:26:20 +0000 |
commit | d3c7c9ea81ee7c617f8cee5b645621088aea215b (patch) | |
tree | 116b8534291360181d80a53554c930caf186f15e /dbaccess/source/ui | |
parent | 2bce2365e7d411c1673e709eb1abc89da9f651dc (diff) |
tdf#94559: first step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
avmedia, basctl, basic, cui, dbaccess, vcl,xmloff
Change-Id: If4496762e82e896b6fbc362e6626502703c245f5
Reviewed-on: https://gerrit.libreoffice.org/18905
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'dbaccess/source/ui')
-rw-r--r-- | dbaccess/source/ui/browser/brwctrlr.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/browser/sbagrid.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/ConnectionHelper.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/DbAdminImpl.cxx | 12 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/advancedsettings.cxx | 6 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbadmin.cxx | 4 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwiz.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/dbwizsetup.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/generalpage.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/dlg/optionalboolitem.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/propertysetitem.cxx | 2 | ||||
-rw-r--r-- | dbaccess/source/ui/misc/stringlistitem.cxx | 2 |
13 files changed, 22 insertions, 22 deletions
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx index b0b8d6bce908..7f845cfc1c1c 100644 --- a/dbaccess/source/ui/browser/brwctrlr.cxx +++ b/dbaccess/source/ui/browser/brwctrlr.cxx @@ -1477,7 +1477,7 @@ FeatureState SbaXDataBrowserController::GetState(sal_uInt16 nId) const case ID_BROWSER_CUT: { CellControllerRef xCurrentController = getBrowserView()->getVclControl()->Controller(); - if (xCurrentController.Is() && xCurrentController->ISA(EditCellController)) + if (xCurrentController.Is() && 0 != dynamic_cast< const EditCellController* >(xCurrentController.get())) { Edit& rEdit = static_cast<Edit&>(xCurrentController->GetWindow()); bool bHasLen = (rEdit.GetSelection().Len() != 0); diff --git a/dbaccess/source/ui/browser/sbagrid.cxx b/dbaccess/source/ui/browser/sbagrid.cxx index deb636a6eded..3ccf87831ac4 100644 --- a/dbaccess/source/ui/browser/sbagrid.cxx +++ b/dbaccess/source/ui/browser/sbagrid.cxx @@ -1395,7 +1395,7 @@ sal_Int8 SbaGridControl::ExecuteDrop( const BrowserExecuteDropEvent& rEvt ) ActivateCell(); CellControllerRef xCurrentController = Controller(); - if (!xCurrentController.Is() || !xCurrentController->ISA(EditCellController)) + if (!xCurrentController.Is() || 0 == dynamic_cast< const EditCellController* >(xCurrentController.get())) return DND_ACTION_NONE; Edit& rEdit = static_cast<Edit&>(xCurrentController->GetWindow()); diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx index a28fd3a9b402..7bfbd70c58a8 100644 --- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx +++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx @@ -98,7 +98,7 @@ namespace dbaui get(m_pPB_CreateDB, "create"); // extract the datasource type collection from the item set - const DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rCoreAttrs.GetItem(DSID_TYPECOLLECTION)); + const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _rCoreAttrs.GetItem(DSID_TYPECOLLECTION) ); if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); m_pPB_Connection->SetClickHdl(LINK(this, OConnectionHelper, OnBrowseConnections)); diff --git a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx index 5284f1c3e543..5029c632e7e3 100644 --- a/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx +++ b/dbaccess/source/ui/dlg/DBSetupConnectionPages.cxx @@ -182,7 +182,7 @@ using namespace ::com::sun::star; if ( m_pETHostServer->IsValueChangedFromSaved() ) { - const DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rSet->GetItem(DSID_TYPECOLLECTION)); + const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _rSet->GetItem(DSID_TYPECOLLECTION) ); ::dbaccess::ODsnTypeCollection* pCollection = NULL; if (pCollectionItem) pCollection = pCollectionItem->getCollection(); @@ -279,7 +279,7 @@ using namespace ::com::sun::star; void OMySQLIntroPageSetup::implInitControls(const SfxItemSet& _rSet, bool /*_bSaveValue*/) { // show the "Connect directly" option only if the driver is installed - const DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rSet.GetItem(DSID_TYPECOLLECTION)); + const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _rSet.GetItem(DSID_TYPECOLLECTION) ); bool bHasMySQLNative = ( pCollectionItem != NULL ) && pCollectionItem->getCollection()->hasDriver( "sdbc:mysqlc:" ); if ( bHasMySQLNative ) m_pNATIVEDatabase->Show(); diff --git a/dbaccess/source/ui/dlg/DbAdminImpl.cxx b/dbaccess/source/ui/dlg/DbAdminImpl.cxx index 6f248f4ba251..08bd5f070712 100644 --- a/dbaccess/source/ui/dlg/DbAdminImpl.cxx +++ b/dbaccess/source/ui/dlg/DbAdminImpl.cxx @@ -839,11 +839,11 @@ Any ODbDataSourceAdministrationHelper::implTranslateProperty(const SfxPoolItem* // translate the SfxPoolItem Any aValue; - const SfxStringItem* pStringItem = PTR_CAST( SfxStringItem, _pItem ); - const SfxBoolItem* pBoolItem = PTR_CAST( SfxBoolItem, _pItem ); - const OptionalBoolItem* pOptBoolItem = PTR_CAST( OptionalBoolItem, _pItem ); - const SfxInt32Item* pInt32Item = PTR_CAST( SfxInt32Item, _pItem ); - const OStringListItem* pStringListItem = PTR_CAST( OStringListItem, _pItem ); + const SfxStringItem* pStringItem = dynamic_cast<const SfxStringItem*>( _pItem ); + const SfxBoolItem* pBoolItem = dynamic_cast<const SfxBoolItem*>( _pItem ); + const OptionalBoolItem* pOptBoolItem = dynamic_cast<const OptionalBoolItem*>( _pItem ); + const SfxInt32Item* pInt32Item = dynamic_cast< const SfxInt32Item* >( _pItem ); + const OStringListItem* pStringListItem = dynamic_cast<const OStringListItem*>( _pItem ); if ( pStringItem ) { @@ -1113,7 +1113,7 @@ DbuTypeCollectionItem::DbuTypeCollectionItem(const DbuTypeCollectionItem& _rSour bool DbuTypeCollectionItem::operator==(const SfxPoolItem& _rItem) const { - const DbuTypeCollectionItem* pCompare = PTR_CAST(DbuTypeCollectionItem, &_rItem); + const DbuTypeCollectionItem* pCompare = dynamic_cast<const DbuTypeCollectionItem*>( &_rItem ); return pCompare && (pCompare->getCollection() == getCollection()); } diff --git a/dbaccess/source/ui/dlg/advancedsettings.cxx b/dbaccess/source/ui/dlg/advancedsettings.cxx index 0f6e7bc6985f..2c2dbbef65d7 100644 --- a/dbaccess/source/ui/dlg/advancedsettings.cxx +++ b/dbaccess/source/ui/dlg/advancedsettings.cxx @@ -105,7 +105,7 @@ namespace dbaui // check whether this must be a tristate check box const SfxPoolItem& rItem = _rCoreAttrs.Get( nItemId ); - if ( rItem.ISA( OptionalBoolItem ) ) + if ( 0 != dynamic_cast< const OptionalBoolItem* >(&rItem) ) (*setting->ppControl)->EnableTriState(); } } @@ -253,11 +253,11 @@ namespace dbaui aValue.reset(); SFX_ITEMSET_GET( _rSet, pItem, SfxPoolItem, setting->nItemId, true ); - if (const SfxBoolItem *pBoolItem = PTR_CAST(SfxBoolItem, pItem)) + if (const SfxBoolItem *pBoolItem = dynamic_cast<const SfxBoolItem*>( pItem) ) { aValue.reset( pBoolItem->GetValue() ); } - else if (const OptionalBoolItem *pOptionalItem = PTR_CAST(OptionalBoolItem, pItem)) + else if (const OptionalBoolItem *pOptionalItem = dynamic_cast<const OptionalBoolItem*>( pItem) ) { aValue = pOptionalItem->GetFullValue(); } diff --git a/dbaccess/source/ui/dlg/dbadmin.cxx b/dbaccess/source/ui/dlg/dbadmin.cxx index 5d69c14af6f7..0522cb302442 100644 --- a/dbaccess/source/ui/dlg/dbadmin.cxx +++ b/dbaccess/source/ui/dlg/dbadmin.cxx @@ -109,7 +109,7 @@ void ODbAdminDialog::impl_selectDataSource(const css::uno::Any& _aDataSourceName Reference< XPropertySet > xDatasource = m_pImpl->getCurrentDataSource(); impl_resetPages( xDatasource ); - const DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, getOutputSet()->GetItem(DSID_TYPECOLLECTION)); + const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( getOutputSet()->GetItem(DSID_TYPECOLLECTION) ); ::dbaccess::ODsnTypeCollection* pCollection = pCollectionItem->getCollection(); ::dbaccess::DATASOURCE_TYPE eType = pCollection->determineType(getDatasourceType(*getOutputSet())); @@ -200,7 +200,7 @@ void ODbAdminDialog::impl_resetPages(const Reference< XPropertySet >& _rxDatasou // special case: MySQL Native does not have the generic "advanced" page - const DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, getOutputSet()->GetItem(DSID_TYPECOLLECTION)); + const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( getOutputSet()->GetItem(DSID_TYPECOLLECTION) ); ::dbaccess::ODsnTypeCollection* pCollection = pCollectionItem->getCollection(); if ( pCollection->determineType(getDatasourceType( *pExampleSet )) == ::dbaccess::DST_MYSQL_NATIVE ) { diff --git a/dbaccess/source/ui/dlg/dbwiz.cxx b/dbaccess/source/ui/dlg/dbwiz.cxx index 2dd1f1033a68..f8e925ee3f7e 100644 --- a/dbaccess/source/ui/dlg/dbwiz.cxx +++ b/dbaccess/source/ui/dlg/dbwiz.cxx @@ -93,7 +93,7 @@ ODbTypeWizDialog::ODbTypeWizDialog(vcl::Window* _pParent m_pHelp->SetUniqueId(UID_DBWIZ_HELP); // no local resources needed anymore - const DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _pItems->GetItem(DSID_TYPECOLLECTION)); + const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _pItems->GetItem(DSID_TYPECOLLECTION) ); m_pCollection = pCollectionItem->getCollection(); ActivatePage(); diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx index cc4efd81d651..151044a55a95 100644 --- a/dbaccess/source/ui/dlg/dbwizsetup.cxx +++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx @@ -135,7 +135,7 @@ ODbTypeWizDialogSetup::ODbTypeWizDialogSetup(vcl::Window* _pParent { // no local resources needed anymore // extract the datasource type collection from the item set - const DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _pItems->GetItem(DSID_TYPECOLLECTION)); + const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _pItems->GetItem(DSID_TYPECOLLECTION) ); if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx index 5af2be90980d..7286e93acb0c 100644 --- a/dbaccess/source/ui/dlg/generalpage.cxx +++ b/dbaccess/source/ui/dlg/generalpage.cxx @@ -65,7 +65,7 @@ namespace dbaui get( m_pSpecialMessage, "specialMessage" ); // extract the datasource type collection from the item set - const DbuTypeCollectionItem* pCollectionItem = PTR_CAST(DbuTypeCollectionItem, _rItems.GetItem(DSID_TYPECOLLECTION)); + const DbuTypeCollectionItem* pCollectionItem = dynamic_cast<const DbuTypeCollectionItem*>( _rItems.GetItem(DSID_TYPECOLLECTION) ); if (pCollectionItem) m_pCollection = pCollectionItem->getCollection(); SAL_WARN_IF(!m_pCollection, "dbaccess", "OGeneralPage::OGeneralPage : really need a DSN type collection !"); diff --git a/dbaccess/source/ui/dlg/optionalboolitem.cxx b/dbaccess/source/ui/dlg/optionalboolitem.cxx index 76086d9ddc4f..bfdc2cfe8923 100644 --- a/dbaccess/source/ui/dlg/optionalboolitem.cxx +++ b/dbaccess/source/ui/dlg/optionalboolitem.cxx @@ -38,7 +38,7 @@ namespace dbaui bool OptionalBoolItem::operator==( const SfxPoolItem& _rItem ) const { - const OptionalBoolItem* pCompare = PTR_CAST( OptionalBoolItem, &_rItem ); + const OptionalBoolItem* pCompare = dynamic_cast<const OptionalBoolItem*>( &_rItem ); if ( !pCompare ) return false; diff --git a/dbaccess/source/ui/misc/propertysetitem.cxx b/dbaccess/source/ui/misc/propertysetitem.cxx index a527faa11da7..92024d2b3954 100644 --- a/dbaccess/source/ui/misc/propertysetitem.cxx +++ b/dbaccess/source/ui/misc/propertysetitem.cxx @@ -46,7 +46,7 @@ namespace dbaui bool OPropertySetItem::operator==(const SfxPoolItem& _rItem) const { - const OPropertySetItem* pCompare = PTR_CAST(OPropertySetItem, &_rItem); + const OPropertySetItem* pCompare = dynamic_cast<const OPropertySetItem*>( &_rItem ); if ((!pCompare) || (pCompare->m_xSet.get() != m_xSet.get())) return false; diff --git a/dbaccess/source/ui/misc/stringlistitem.cxx b/dbaccess/source/ui/misc/stringlistitem.cxx index d375d8669f07..2663db4746c3 100644 --- a/dbaccess/source/ui/misc/stringlistitem.cxx +++ b/dbaccess/source/ui/misc/stringlistitem.cxx @@ -40,7 +40,7 @@ OStringListItem::OStringListItem(const OStringListItem& _rSource) bool OStringListItem::operator==(const SfxPoolItem& _rItem) const { - const OStringListItem* pCompare = PTR_CAST(OStringListItem, &_rItem); + const OStringListItem* pCompare = dynamic_cast<const OStringListItem*>( &_rItem ); if ((!pCompare) || (pCompare->m_aList.getLength() != m_aList.getLength())) return false; |