summaryrefslogtreecommitdiff
path: root/sw/source
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2023-11-17 12:50:45 +0100
committerMike Kaganski <mike.kaganski@collabora.com>2023-11-17 14:06:46 +0100
commitfb789aff45773c2b161376d13dd660b80af0d157 (patch)
tree3e1ffa093ed42ed3727615309700ab1903b71574 /sw/source
parent2105f638fa178f49210116bd914889599930b62a (diff)
Simplify a bit
Change-Id: I41ed6256a5933aaadd385bdf9b9aa8469aa71187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159575 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'sw/source')
-rw-r--r--sw/source/uibase/wrtsh/wrtsh2.cxx9
1 files changed, 2 insertions, 7 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx
index e3af36a1c54b..029b728bb30a 100644
--- a/sw/source/uibase/wrtsh/wrtsh2.cxx
+++ b/sw/source/uibase/wrtsh/wrtsh2.cxx
@@ -619,13 +619,8 @@ void LoadURL( SwViewShell& rVSh, const OUString& rURL, LoadUrlFlags nFilter,
return ;
// The shell could be 0 also!!!!!
- if ( dynamic_cast<const SwCursorShell*>( &rVSh) == nullptr )
- return;
-
- //A CursorShell is always a WrtShell
- SwWrtShell &rSh = static_cast<SwWrtShell&>(rVSh);
-
- ::LoadURL(rSh.GetView(), rURL, nFilter, rTargetFrameName);
+ if (auto pSh = dynamic_cast<SwWrtShell*>(&rVSh))
+ ::LoadURL(pSh->GetView(), rURL, nFilter, rTargetFrameName);
}
void SwWrtShell::NavigatorPaste( const NaviContentBookmark& rBkmk,