summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorCaolán McNamara <caolan.mcnamara@collabora.com>2023-06-20 10:20:36 +0100
committerAndras Timar <andras.timar@collabora.com>2023-06-29 13:54:58 +0200
commit28338b9bab0bde32374fb408dba5100cc99a20d2 (patch)
tree42477842aaa78b88685bf8cfb450255be616704b /sfx2
parenta1d9d090338009c3fdc4dcb8d6dc0dfb6c13e582 (diff)
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>
Diffstat (limited to 'sfx2')
-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())