diff options
author | Oliver Specht <oliver.specht@cib.de> | 2015-09-30 16:10:07 +0200 |
---|---|---|
committer | Oliver Specht <oliver.specht@cib.de> | 2015-10-06 07:29:37 +0000 |
commit | 89d39bc100aabf5dccbe77c0b5c0c85736e85b39 (patch) | |
tree | 871a91210913ecee91530c95392534bf18f80f3f /sd/source/ui/app/sdmod1.cxx | |
parent | 32b9901dae7403453d773f5904de15551a323595 (diff) |
tdf#94559: 4th step to remove rtti.hxx
replaced use of PTR_CAST, IS_TYPE, ISA in
idl, editeng, sc, sd, sw, sfx2, sot, starmath
Change-Id: I4a5bba4fdc4829099618c09b690c83f876a3d653
Reviewed-on: https://gerrit.libreoffice.org/19132
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Oliver Specht <oliver.specht@cib.de>
Diffstat (limited to 'sd/source/ui/app/sdmod1.cxx')
-rw-r--r-- | sd/source/ui/app/sdmod1.cxx | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/sd/source/ui/app/sdmod1.cxx b/sd/source/ui/app/sdmod1.cxx index 69599d9b7fa7..c8a376b5c402 100644 --- a/sd/source/ui/app/sdmod1.cxx +++ b/sd/source/ui/app/sdmod1.cxx @@ -111,7 +111,7 @@ void SdModule::Execute(SfxRequest& rReq) { bool bOnlineSpelling = static_cast<const SfxBoolItem*>( pItem )->GetValue(); // save at document: - ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if( pDocSh ) { SdDrawDocument* pDoc = pDocSh->GetDoc(); @@ -135,7 +135,7 @@ void SdModule::Execute(SfxRequest& rReq) case FUNIT_PICA: case FUNIT_POINT: { - ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() ); + ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if(pDocSh) { DocumentType eDocType = pDocSh->GetDoc()->GetDocumentType(); @@ -170,7 +170,7 @@ void SdModule::Execute(SfxRequest& rReq) ) { // save at the document: - ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if ( pDocSh ) { LanguageType eLanguage = static_cast<const SvxLanguageItem*>(pItem)->GetValue(); @@ -208,7 +208,7 @@ void SdModule::Execute(SfxRequest& rReq) case SID_OPENDOC: { bool bIntercept = false; - ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if (pDocShell) { ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); @@ -323,7 +323,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) } else { - ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if (pDocShell) { ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); @@ -340,7 +340,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_ATTR_METRIC ) ) { - ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current() ); + ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if(pDocSh) { DocumentType eDocType = pDocSh->GetDoc()->GetDocumentType(); @@ -369,7 +369,7 @@ void SdModule::GetState(SfxItemSet& rItemSet) if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_AUTOSPELL_CHECK ) ) { ::sd::DrawDocShell* pDocSh = - PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if( pDocSh ) { SdDrawDocument* pDoc = pDocSh->GetDoc(); @@ -379,28 +379,28 @@ void SdModule::GetState(SfxItemSet& rItemSet) if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_ATTR_LANGUAGE ) ) { - ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if( pDocSh ) rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE ), SID_ATTR_LANGUAGE ) ); } if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CJK_LANGUAGE ) ) { - ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if( pDocSh ) rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE_CJK ), SID_ATTR_CHAR_CJK_LANGUAGE ) ); } if( SfxItemState::DEFAULT == rItemSet.GetItemState( SID_ATTR_CHAR_CTL_LANGUAGE ) ) { - ::sd::DrawDocShell* pDocSh = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + ::sd::DrawDocShell* pDocSh = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if( pDocSh ) rItemSet.Put( SvxLanguageItem( pDocSh->GetDoc()->GetLanguage( EE_CHAR_LANGUAGE_CTL ), SID_ATTR_CHAR_CTL_LANGUAGE ) ); } if ( !mbEventListenerAdded ) { - ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if( pDocShell ) // Impress or Draw ? { ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); @@ -429,7 +429,7 @@ IMPL_STATIC_LINK_TYPED( SdModule, EventListenerHdl, VclSimpleEvent&, rSimpleEven { case MediaCommand::Play: { - ::sd::DrawDocShell* pDocShell = PTR_CAST(::sd::DrawDocShell, SfxObjectShell::Current()); + ::sd::DrawDocShell* pDocShell = dynamic_cast< ::sd::DrawDocShell *>( SfxObjectShell::Current() ); if( pDocShell ) // Impress or Draw ? { ::sd::ViewShell* pViewShell = pDocShell->GetViewShell(); @@ -591,7 +591,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) aSet.Put( aPassword ); const SfxPoolItem* pRet = SfxFrame::OpenDocumentSynchron( aSet, xTargetFrame ); - const SfxViewFrameItem* pFrameItem = PTR_CAST( SfxViewFrameItem, pRet ); + const SfxViewFrameItem* pFrameItem = dynamic_cast<const SfxViewFrameItem*>( pRet ); if ( pFrameItem && pFrameItem->GetFrame() ) pFrame = &pFrameItem->GetFrame()->GetFrame(); } @@ -610,7 +610,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) try { const SfxPoolItem* pRet = SfxGetpApp()->ExecuteSlot (aRequest); - const SfxViewFrameItem* pFrameItem = PTR_CAST( SfxViewFrameItem, pRet ); + const SfxViewFrameItem* pFrameItem = dynamic_cast<const SfxViewFrameItem*>( pRet ); if ( pFrameItem ) pFrame = &pFrameItem->GetFrame()->GetFrame(); } @@ -652,7 +652,7 @@ SfxFrame* SdModule::ExecuteNewDocument( SfxRequest& rReq ) SdDrawDocument* pDoc(NULL); if (pShell && pViewFrame) { - pDocShell = PTR_CAST(::sd::DrawDocShell, pShell); + pDocShell = dynamic_cast< ::sd::DrawDocShell *>( pShell ); pDoc = pDocShell ? pDocShell->GetDoc() : NULL; pBase = ::sd::ViewShellBase::GetViewShellBase(pViewFrame); } |