summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-06-20 10:20:36 +0100
committerMichael Stahl <michael.stahl@allotropia.de>2023-06-27 11:21:11 +0200
commitb8129f3df425b879a63239b35845b741ccc34dc3 (patch)
treed9c6a8495bedea4827480aec46d961bd0c44e702
parenttdf#156016 Fix bug where SVG check size would be 0 (diff)
downloadcore-b8129f3df425b879a63239b35845b741ccc34dc3.tar.gz
core-b8129f3df425b879a63239b35845b741ccc34dc3.zip
Resolves: tdf#155750 allow private:factory urls in floating frames
they create a new document so there isn't an associated location which would trigger the prompt to allow it so just allow factory urls Change-Id: I7b693bcfe5ac04aaed06905637ab3c1eba43c51f Reviewed-on: https://gerrit.libreoffice.org/c/core/+/153330 Tested-by: Jenkins Reviewed-by: Michael Stahl <michael.stahl@allotropia.de>
-rw-r--r--sfx2/source/doc/iframe.cxx16
1 files changed, 10 insertions, 6 deletions
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 4f3b414d5d69..150218b436e9 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -174,14 +174,18 @@ sal_Bool SAL_CALL IFrameObject::load(
uno::Reference<frame::XFramesSupplier> xParentFrame = xFrame->getCreator();
SfxObjectShell* pDoc = SfxMacroLoader::GetObjectShell(xParentFrame);
- bool bUpdateAllowed(true);
- if (pDoc)
+ const bool bIsFactoryURL = aTargetURL.Complete.startsWith("private:factory/");
+ if (!bIsFactoryURL)
{
- comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDoc->getEmbeddedObjectContainer();
- bUpdateAllowed = rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
+ bool bUpdateAllowed(true);
+ if (pDoc)
+ {
+ comphelper::EmbeddedObjectContainer& rEmbeddedObjectContainer = pDoc->getEmbeddedObjectContainer();
+ bUpdateAllowed = rEmbeddedObjectContainer.getUserAllowsLinkUpdate();
+ }
+ if (!bUpdateAllowed)
+ return false;
}
- if (!bUpdateAllowed)
- return false;
OUString sReferer;
if (pDoc && pDoc->HasName())