diff options
author | Caolán McNamara <caolanm@redhat.com> | 2023-04-13 11:49:18 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2023-04-13 16:45:29 +0200 |
commit | 52aa46468531918eabfa2031dedf50377ae72cf7 (patch) | |
tree | d8e9d499c142a17b67af500a6aa9183fdb724e0e /sfx2/source | |
parent | 3a727d26fd9eb6fa140bc3f5cadf3db079d42206 (diff) |
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 <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/iframe.cxx | 11 |
1 files changed, 11 insertions, 0 deletions
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(); |