diff options
Diffstat (limited to 'sd/source/ui/view/ViewShellBase.cxx')
-rw-r--r-- | sd/source/ui/view/ViewShellBase.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sd/source/ui/view/ViewShellBase.cxx b/sd/source/ui/view/ViewShellBase.cxx index 3dbd3503b13a..99dca2efed88 100644 --- a/sd/source/ui/view/ViewShellBase.cxx +++ b/sd/source/ui/view/ViewShellBase.cxx @@ -455,7 +455,7 @@ OUString ViewShellBase::GetSelectionText(bool bCompleteWords) std::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); DrawViewShell *const pDrawViewShell( dynamic_cast<DrawViewShell*>(pMainShell.get())); - return (pDrawViewShell) + return pDrawViewShell ? pDrawViewShell->GetSelectionText(bCompleteWords) : SfxViewShell::GetSelectionText(bCompleteWords); } @@ -465,7 +465,7 @@ bool ViewShellBase::HasSelection(bool bText) const std::shared_ptr<ViewShell> const pMainShell(GetMainViewShell()); DrawViewShell *const pDrawViewShell( dynamic_cast<DrawViewShell*>(pMainShell.get())); - return (pDrawViewShell) + return pDrawViewShell ? pDrawViewShell->HasSelection(bText) : SfxViewShell::HasSelection(bText); } |