summaryrefslogtreecommitdiff
path: root/sw/source/uibase/app
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/uibase/app')
-rw-r--r--sw/source/uibase/app/apphdl.cxx8
-rw-r--r--sw/source/uibase/app/docsh.cxx12
2 files changed, 10 insertions, 10 deletions
diff --git a/sw/source/uibase/app/apphdl.cxx b/sw/source/uibase/app/apphdl.cxx
index d4bcf37d4fca..3074d96f7bab 100644
--- a/sw/source/uibase/app/apphdl.cxx
+++ b/sw/source/uibase/app/apphdl.cxx
@@ -964,10 +964,10 @@ void SwModule::ConfigurationChanged( utl::ConfigurationBroadcaster* pBrdCst, Con
{
if(bAccessibility)
{
- if(dynamic_cast< const SwView *>( pViewShell ) != nullptr)
- static_cast<SwView*>(pViewShell)->ApplyAccessibilityOptions(*m_pAccessibilityOptions);
- else if(dynamic_cast< const SwPagePreview *>( pViewShell ) != nullptr)
- static_cast<SwPagePreview*>(pViewShell)->ApplyAccessibilityOptions(*m_pAccessibilityOptions);
+ if(auto pSwView = dynamic_cast<SwView *>( pViewShell ))
+ pSwView->ApplyAccessibilityOptions(*m_pAccessibilityOptions);
+ else if(auto pPagePreview = dynamic_cast<SwPagePreview *>( pViewShell ))
+ pPagePreview->ApplyAccessibilityOptions(*m_pAccessibilityOptions);
}
pViewShell->GetWindow()->Invalidate();
}
diff --git a/sw/source/uibase/app/docsh.cxx b/sw/source/uibase/app/docsh.cxx
index 16b3a66d8460..b6937382ebe8 100644
--- a/sw/source/uibase/app/docsh.cxx
+++ b/sw/source/uibase/app/docsh.cxx
@@ -994,12 +994,12 @@ void SwDocShell::GetState(SfxItemSet& rSet)
SfxViewFrame *pTmpFrame = SfxViewFrame::GetFirst(this);
while (pTmpFrame) // Look for Preview
{
- if ( dynamic_cast<SwView*>( pTmpFrame->GetViewShell() ) &&
- static_cast<SwView*>(pTmpFrame->GetViewShell())->GetWrtShell().GetViewOptions()->getBrowseMode() )
- {
- bDisable = true;
- break;
- }
+ if ( auto pSwView = dynamic_cast<SwView*>( pTmpFrame->GetViewShell() ) )
+ if (pSwView->GetWrtShell().GetViewOptions()->getBrowseMode())
+ {
+ bDisable = true;
+ break;
+ }
pTmpFrame = SfxViewFrame::GetNext(*pTmpFrame, this);
}
}