summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-04-20 20:58:21 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2023-05-02 17:22:28 +0200
commit2681341b081ac8fb15f7ef7035c0e522c30a8ce9 (patch)
tree15492590458e15ee2384ce7a577526182d35bc3f
parent63e125f5e9e1d2ae38f6f00119e1b285230e46c5 (diff)
assume IFrame script/macro support isn't neededcib-6.4-17
seems undocumented at least Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151020 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> (cherry picked from commit a10a5994bddf7646196ff45f6af598420d8663ad) Change-Id: I316e4f4f25ddb7cf6b7bac4d856a721b987207a3
-rw-r--r--sfx2/source/doc/iframe.cxx15
1 files changed, 4 insertions, 11 deletions
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 217c764e0272..bc60a86b3317 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -168,23 +168,16 @@ sal_Bool SAL_CALL IFrameObject::load(
uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( mxContext ) );
xTrans->parseStrict( aTargetURL );
+ INetURLObject aURLObject(aTargetURL.Complete);
+ if (aURLObject.GetProtocol() == INetProtocol::Macro || aURLObject.isSchemeEqualTo(u"vnd.sun.star.script"))
+ return false;
+
uno::Reference<frame::XFramesSupplier> xParentFrame = xFrame->getCreator();
SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame);
- if (INetURLObject(aTargetURL.Complete).GetProtocol() == INetProtocol::Macro)
- {
- if (pDoc && !pDoc->AdjustMacroMode())
- return false;
- }
-
- 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();
}