diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2023-11-15 12:55:58 +0000 |
---|---|---|
committer | Thorsten Behrens <thorsten.behrens@allotropia.de> | 2023-12-06 10:41:58 +0100 |
commit | d50a5aff79525c81c98863ecc9cbff40bc91fe9a (patch) | |
tree | 72805d01624674d18dc7b55093bfeb3fd4842d2a | |
parent | ba3cfbbaf0f9cb4e5878e43527eb24107e71f770 (diff) |
reuse AllowedLinkProtocolFromDocument in writer
Conflicts:
sw/source/uibase/wrtsh/wrtsh2.cxx
Change-Id: Iacf5e313fc6ca5f7d69ca6986a036f0e1ab1f2a0
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/159488
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
(cherry picked from commit 32535dfa82200b54296838b52285c054fbe5e51d)
-rw-r--r-- | sw/source/uibase/wrtsh/wrtsh2.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sw/source/uibase/wrtsh/wrtsh2.cxx b/sw/source/uibase/wrtsh/wrtsh2.cxx index 543644d3b997..4b98417ac788 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -491,11 +491,11 @@ bool SwWrtShell::ClickToINetGrf( const Point& rDocPt, LoadUrlFlags nFilter ) static void LoadURL(SwView& rView, const OUString& rURL, LoadUrlFlags nFilter, const OUString& rTargetFrameName) { - SwDocShell* pDShell = rView.GetDocShell(); + SwDocShell* pDShell = rSh.GetView().GetDocShell(); OSL_ENSURE( pDShell, "No DocShell?!"); - SfxViewFrame* pViewFrame = rView.GetViewFrame(); + SfxViewFrame& rViewFrame = *rSh.GetView().GetViewFrame(); - if (!SfxObjectShell::AllowedLinkProtocolFromDocument(rURL, pDShell, pViewFrame->GetWindow().GetFrameWeld())) + if (!SfxObjectShell::AllowedLinkProtocolFromDocument(rURL, pDShell, rViewFrame.GetFrameWeld())) return; // We are doing tiledRendering, let the client handles the URL loading, @@ -520,7 +520,7 @@ static void LoadURL(SwView& rView, const OUString& rURL, LoadUrlFlags nFilter, OUString sReferer; if( pDShell && pDShell->GetMedium() ) sReferer = pDShell->GetMedium()->GetName(); - SfxFrameItem aView( SID_DOCFRAME, pViewFrame ); + SfxFrameItem aView( SID_DOCFRAME, &rViewFrame ); SfxStringItem aName( SID_FILE_NAME, rURL ); SfxStringItem aTargetFrameName( SID_TARGETNAME, sTargetFrame ); SfxStringItem aReferer( SID_REFERER, sReferer ); @@ -541,7 +541,7 @@ static void LoadURL(SwView& rView, const OUString& rURL, LoadUrlFlags nFilter, nullptr }; - pViewFrame->GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, + rViewFrame.GetDispatcher()->GetBindings()->Execute( SID_OPENDOC, aArr, SfxCallMode::ASYNCHRON|SfxCallMode::RECORD ); } |