summaryrefslogtreecommitdiff
path: root/cui
diff options
context:
space:
mode:
authorOliver Specht <oliver.specht@cib.de>2015-09-28 11:42:43 +0200
committerOliver Specht <oliver.specht@cib.de>2015-09-29 12:26:20 +0000
commitd3c7c9ea81ee7c617f8cee5b645621088aea215b (patch)
tree116b8534291360181d80a53554c930caf186f15e /cui
parent2bce2365e7d411c1673e709eb1abc89da9f651dc (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 'cui')
-rw-r--r--cui/source/customize/acccfg.cxx6
-rw-r--r--cui/source/dialogs/hldocntp.cxx2
-rw-r--r--cui/source/dialogs/zoom.cxx2
-rw-r--r--cui/source/options/cfgchart.cxx2
-rw-r--r--cui/source/options/connpoolsettings.cxx2
-rw-r--r--cui/source/options/dbregistersettings.cxx2
-rw-r--r--cui/source/options/optgdlg.cxx3
-rw-r--r--cui/source/tabpages/numfmt.cxx2
-rw-r--r--cui/source/tabpages/tplneend.cxx8
9 files changed, 14 insertions, 15 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 7bfc2990a2aa..d8bf3d37b6c7 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1474,18 +1474,18 @@ void SfxAcceleratorConfigPage::Reset( const SfxItemSet* rSet )
const SfxPoolItem* pMacroItem=0;
if( SfxItemState::SET == rSet->GetItemState( SID_MACROINFO, true, &pMacroItem ) )
{
- m_pMacroInfoItem = PTR_CAST( SfxMacroInfoItem, pMacroItem );
+ m_pMacroInfoItem = dynamic_cast<const SfxMacroInfoItem*>( pMacroItem );
m_pGroupLBox->SelectMacro( m_pMacroInfoItem );
}
else
{
const SfxPoolItem* pStringItem=0;
if( SfxItemState::SET == rSet->GetItemState( SID_CHARMAP, true, &pStringItem ) )
- m_pStringItem = PTR_CAST( SfxStringItem, pStringItem );
+ m_pStringItem = dynamic_cast<const SfxStringItem*>( pStringItem );
const SfxPoolItem* pFontItem=0;
if( SfxItemState::SET == rSet->GetItemState( SID_ATTR_SPECIALCHAR, true, &pFontItem ) )
- m_pFontItem = PTR_CAST( SfxStringItem, pFontItem );
+ m_pFontItem = dynamic_cast<const SfxStringItem*>( pFontItem );
}
}
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index e4d4b0a664db..e35ed0bc1c6c 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -358,7 +358,7 @@ void SvxHyperlinkNewDocTp::DoApply ()
&aFrame, &aReferer, 0L );
// save new doc
- const SfxViewFrameItem *pItem = PTR_CAST( SfxViewFrameItem, pReturn ); // SJ: pReturn is NULL if the Hyperlink
+ const SfxViewFrameItem *pItem = dynamic_cast<const SfxViewFrameItem*>( pReturn ); // SJ: pReturn is NULL if the Hyperlink
if ( pItem ) // creation is cancelled #106216#
{
pViewFrame = pItem->GetFrame();
diff --git a/cui/source/dialogs/zoom.cxx b/cui/source/dialogs/zoom.cxx
index 0e8453296652..42c77ea01624 100644
--- a/cui/source/dialogs/zoom.cxx
+++ b/cui/source/dialogs/zoom.cxx
@@ -203,7 +203,7 @@ SvxZoomDialog::SvxZoomDialog( vcl::Window* pParent, const SfxItemSet& rCoreSet )
const SfxPoolItem& rItem = mrSet.Get(mrSet.GetPool()->GetWhich(SID_ATTR_ZOOM));
- if (rItem.ISA(SvxZoomItem))
+ if (0 != dynamic_cast<const SvxZoomItem*>( &rItem))
{
const SvxZoomItem& rZoomItem = static_cast<const SvxZoomItem&>(rItem);
const sal_uInt16 nZoom = rZoomItem.GetValue();
diff --git a/cui/source/options/cfgchart.cxx b/cui/source/options/cfgchart.cxx
index 12e6b5dcffc6..1e37184959b4 100644
--- a/cui/source/options/cfgchart.cxx
+++ b/cui/source/options/cfgchart.cxx
@@ -296,7 +296,7 @@ bool SvxChartColorTableItem::operator==( const SfxPoolItem& rAttr ) const
{
DBG_ASSERT( SfxPoolItem::operator==( rAttr ), "SvxChartColorTableItem::operator== : types differ" );
- const SvxChartColorTableItem * rCTItem( dynamic_cast< const SvxChartColorTableItem * >( & rAttr ));
+ const SvxChartColorTableItem * rCTItem( dynamic_cast<const SvxChartColorTableItem * >( & rAttr ));
if( rCTItem )
{
return (this->m_aColorTable == rCTItem->GetColorList());
diff --git a/cui/source/options/connpoolsettings.cxx b/cui/source/options/connpoolsettings.cxx
index b735076835b7..cb42a3a36bdd 100644
--- a/cui/source/options/connpoolsettings.cxx
+++ b/cui/source/options/connpoolsettings.cxx
@@ -53,7 +53,7 @@ namespace offapp
bool DriverPoolingSettingsItem::operator==( const SfxPoolItem& _rCompare ) const
{
- const DriverPoolingSettingsItem* pItem = PTR_CAST(DriverPoolingSettingsItem, &_rCompare);
+ const DriverPoolingSettingsItem* pItem = dynamic_cast<const DriverPoolingSettingsItem*>( &_rCompare );
if (!pItem)
return false;
diff --git a/cui/source/options/dbregistersettings.cxx b/cui/source/options/dbregistersettings.cxx
index f3fca6a033f2..75f71d57e10d 100644
--- a/cui/source/options/dbregistersettings.cxx
+++ b/cui/source/options/dbregistersettings.cxx
@@ -36,7 +36,7 @@ namespace svx
bool DatabaseMapItem::operator==( const SfxPoolItem& _rCompare ) const
{
- const DatabaseMapItem* pItem = PTR_CAST(DatabaseMapItem, &_rCompare);
+ const DatabaseMapItem* pItem = dynamic_cast<const DatabaseMapItem*>( &_rCompare );
if ( !pItem )
return false;
diff --git a/cui/source/options/optgdlg.cxx b/cui/source/options/optgdlg.cxx
index 5c582919fb78..79e037c9d467 100644
--- a/cui/source/options/optgdlg.cxx
+++ b/cui/source/options/optgdlg.cxx
@@ -359,8 +359,7 @@ bool OfaMiscTabPage::FillItemSet( SfxItemSet* rSet )
bModified = true;
}
- const SfxUInt16Item* pUInt16Item =
- PTR_CAST( SfxUInt16Item, GetOldItem( *rSet, SID_ATTR_YEAR2000 ) );
+ const SfxUInt16Item* pUInt16Item = dynamic_cast< const SfxUInt16Item* >( GetOldItem( *rSet, SID_ATTR_YEAR2000 ) );
sal_uInt16 nNum = (sal_uInt16)m_pYearValueField->GetText().toInt32();
if ( pUInt16Item && pUInt16Item->GetValue() != nNum )
{
diff --git a/cui/source/tabpages/numfmt.cxx b/cui/source/tabpages/numfmt.cxx
index e8b45bbb1a6f..113ccae31a31 100644
--- a/cui/source/tabpages/numfmt.cxx
+++ b/cui/source/tabpages/numfmt.cxx
@@ -1717,7 +1717,7 @@ bool SvxNumberFormatTabPage::PreNotify( NotifyEvent& rNEvt )
{
if(rNEvt.GetType()==MouseNotifyEvent::LOSEFOCUS)
{
- if ( rNEvt.GetWindow() == dynamic_cast< vcl::Window* >( m_pEdComment.get() ) && !m_pEdComment->IsVisible() )
+ if ( rNEvt.GetWindow() == dynamic_cast<const vcl::Window* >( m_pEdComment.get() ) && !m_pEdComment->IsVisible() )
{
pLastActivWindow = NULL;
}
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index e466a09208d7..3b4e7eaa58e0 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -140,7 +140,7 @@ void SvxLineEndDefTabPage::Construct()
{
bCreateArrowPossible = false;
}
- else if( !pPolyObj->ISA( SdrPathObj ) )
+ else if( 0 == dynamic_cast<const SdrPathObj*>( pPolyObj) )
{
SdrObjTransformInfoRec aInfoRec;
pPolyObj->TakeObjInfo( aInfoRec );
@@ -148,7 +148,7 @@ void SvxLineEndDefTabPage::Construct()
if( aInfoRec.bCanConvToPath )
pNewObj = pPolyObj->ConvertToPolyObj( true, false );
- bCreateArrowPossible = pNewObj && pNewObj->ISA( SdrPathObj );
+ bCreateArrowPossible = pNewObj && 0 != dynamic_cast<const SdrPathObj*>( pNewObj);
SdrObject::Free( pNewObj );
}
@@ -407,7 +407,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, ClickAddHdl_Impl, Button*, void)
const SdrObject* pNewObj;
SdrObject* pConvPolyObj = NULL;
- if( pPolyObj->ISA( SdrPathObj ) )
+ if( 0 != dynamic_cast<const SdrPathObj*>( pPolyObj) )
{
pNewObj = pPolyObj;
}
@@ -420,7 +420,7 @@ IMPL_LINK_NOARG_TYPED(SvxLineEndDefTabPage, ClickAddHdl_Impl, Button*, void)
{
pNewObj = pConvPolyObj = pPolyObj->ConvertToPolyObj( true, false );
- if( !pNewObj || !pNewObj->ISA( SdrPathObj ) )
+ if( !pNewObj || 0 == dynamic_cast<const SdrPathObj*>( pNewObj) )
return; // cancel, additional safety, which
// has no use for group objects though.
}