summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-04-20 20:58:21 +0100
committerCaolán McNamara <caolan.mcnamara@collabora.com>2023-05-23 15:32:38 +0200
commit17b405871d480a2c4319532035aa08ddc1ed7d06 (patch)
tree3893aa9eee719bbab3d5a9d1d4f0952159c6a51d
parentcfa1fc9be9831a61fba736d428c2c2e56fbf7617 (diff)
assume IFrame script/macro support isn't needed
seems undocumented at least Change-Id: I316e4f4f25ddb7cf6b7bac4d856a721b987207a3 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/151020 Tested-by: Jenkins Reviewed-by: Xisco Fauli <xiscofauli@libreoffice.org> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/152148 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com> Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
-rw-r--r--sfx2/source/doc/iframe.cxx12
1 files changed, 4 insertions, 8 deletions
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index e80f4d3cebf9..08dfee998c6d 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -166,20 +166,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;
- }
-
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();
}