summaryrefslogtreecommitdiff
path: root/sd/source/ui/func/fusearch.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sd/source/ui/func/fusearch.cxx')
-rw-r--r--sd/source/ui/func/fusearch.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/sd/source/ui/func/fusearch.cxx b/sd/source/ui/func/fusearch.cxx
index eb0003520830..a6d535f43821 100644
--- a/sd/source/ui/func/fusearch.cxx
+++ b/sd/source/ui/func/fusearch.cxx
@@ -73,12 +73,12 @@ void FuSearch::DoExecute( SfxRequest& )
{
mpViewShell->GetViewFrame()->GetBindings().Invalidate( SidArraySpell );
- if ( mpViewShell->ISA(DrawViewShell) )
+ if ( dynamic_cast< const DrawViewShell *>( mpViewShell ) != nullptr )
{
bOwnOutliner = true;
pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
}
- else if ( mpViewShell->ISA(OutlineViewShell) )
+ else if ( dynamic_cast< const OutlineViewShell *>( mpViewShell ) != nullptr )
{
bOwnOutliner = false;
pSdOutliner = mpDoc->GetOutliner();
@@ -102,14 +102,14 @@ FuSearch::~FuSearch()
void FuSearch::SearchAndReplace( const SvxSearchItem* pSearchItem )
{
- ViewShellBase* pBase = PTR_CAST(ViewShellBase, SfxViewShell::Current());
+ ViewShellBase* pBase = dynamic_cast<ViewShellBase*>( SfxViewShell::Current() );
ViewShell* pViewShell = NULL;
if (pBase != NULL)
pViewShell = pBase->GetMainViewShell().get();
if (pViewShell != NULL)
{
- if ( pSdOutliner && pViewShell->ISA(DrawViewShell) && !bOwnOutliner )
+ if ( pSdOutliner && dynamic_cast< const DrawViewShell *>( pViewShell ) != nullptr && !bOwnOutliner )
{
pSdOutliner->EndSpelling();
@@ -117,7 +117,7 @@ void FuSearch::SearchAndReplace( const SvxSearchItem* pSearchItem )
pSdOutliner = new ::sd::Outliner( mpDoc, OUTLINERMODE_TEXTOBJECT );
pSdOutliner->PrepareSpelling();
}
- else if ( pSdOutliner && pViewShell->ISA(OutlineViewShell) && bOwnOutliner )
+ else if ( pSdOutliner && dynamic_cast< const OutlineViewShell *>( pViewShell ) != nullptr && bOwnOutliner )
{
pSdOutliner->EndSpelling();
delete pSdOutliner;