sfx2/source/doc/iframe.cxx | 11 +++++++++++ 1 file changed, 11 insertions(+)
New commits: commit 52aa46468531918eabfa2031dedf50377ae72cf7 Author: Caolán McNamara <caol...@redhat.com> AuthorDate: Thu Apr 13 11:49:18 2023 +0100 Commit: Caolán McNamara <caol...@redhat.com> CommitDate: Thu Apr 13 16:45:29 2023 +0200 query getUserAllowsLinkUpdate for the case of content in a floating frame similarly to how it works for the more common "normal" embedded objects Change-Id: I83e38dfa2f84907c2de9680e91f779d34864a9ad Reviewed-on: https://gerrit.libreoffice.org/c/core/+/149971 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caol...@redhat.com> diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx index 0bea24b14c69..812153990c32 100644 --- a/sfx2/source/doc/iframe.cxx +++ b/sfx2/source/doc/iframe.cxx @@ -180,6 +180,17 @@ sal_Bool SAL_CALL IFrameObject::load( if (!SfxEvents_Impl::isScriptURLAllowed(aTargetURL.Complete)) return false; + bool bUpdateAllowed(true); + if (pDoc) + { + // perhaps should only check for file targets, but lets default to making it strong + // unless there is a known need to distinguish + comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDoc->getEmbeddedObjectContainer(); + bUpdateAllowed = rEmbeddedObjectContainer.getUserAllowsLinkUpdate(); + } + if (!bUpdateAllowed) + return false; + OUString sReferer; if (pDoc && pDoc->HasName()) sReferer = pDoc->GetMedium()->GetName();