sw/source/uibase/wrtsh/wrtsh2.cxx | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-)
New commits: commit fb789aff45773c2b161376d13dd660b80af0d157 Author: Mike Kaganski <mike.kagan...@collabora.com> AuthorDate: Fri Nov 17 12:50:45 2023 +0100 Commit: Mike Kaganski <mike.kagan...@collabora.com> CommitDate: Fri Nov 17 14:06:46 2023 +0100 Simplify a bit Change-Id: I41ed6256a5933aaadd385bdf9b9aa8469aa71187 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159575 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kagan...@collabora.com> 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,