summaryrefslogtreecommitdiff
path: root/sw/source/ui/dialog/docstdlg.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sw/source/ui/dialog/docstdlg.cxx')
-rw-r--r--sw/source/ui/dialog/docstdlg.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/sw/source/ui/dialog/docstdlg.cxx b/sw/source/ui/dialog/docstdlg.cxx
index 7aacfd94cd5f..c9b362355c6e 100644
--- a/sw/source/ui/dialog/docstdlg.cxx
+++ b/sw/source/ui/dialog/docstdlg.cxx
@@ -95,10 +95,10 @@ void SwDocStatPage::Update()
{
SfxViewShell *pVSh = SfxViewShell::Current();
SwViewShell *pSh = nullptr;
- if ( dynamic_cast< const SwView *>( pVSh ) != nullptr )
- pSh = static_cast<SwView*>(pVSh)->GetWrtShellPtr();
- else if ( dynamic_cast< const SwPagePreview *>( pVSh ) != nullptr )
- pSh = static_cast<SwPagePreview*>(pVSh)->GetViewShell();
+ if ( auto pSwView = dynamic_cast<SwView *>( pVSh ) )
+ pSh = pSwView->GetWrtShellPtr();
+ else if ( auto pPagePreview = dynamic_cast<SwPagePreview *>( pVSh ) )
+ pSh = pPagePreview->GetViewShell();
OSL_ENSURE( pSh, "Shell not found" );