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-07 00:47:59 +0100 |
commit | 054cc9bb0815519ead2da03fb297280cb5017861 (patch) | |
tree | 5867cb02d8b02b378530173baebfd27a4b3c2cdc | |
parent | check earlier on loading ole objects if parent doc is untrusted referer (diff) | |
download | core-054cc9bb0815519ead2da03fb297280cb5017861.tar.gz core-054cc9bb0815519ead2da03fb297280cb5017861.zip |
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 7a4088f0c497..38c12cf7204f 100644 --- a/sw/source/uibase/wrtsh/wrtsh2.cxx +++ b/sw/source/uibase/wrtsh/wrtsh2.cxx @@ -493,11 +493,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, @@ -522,7 +522,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 ); @@ -543,7 +543,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 ); } |