summaryrefslogtreecommitdiff
path: root/sfx2/source/doc/iframe.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2023-04-07 16:44:39 +0100
committerCaolán McNamara <caolanm@redhat.com>2023-04-07 22:50:57 +0200
commit2da7cb9462a98d37191132b6eec13a3ab0da147a (patch)
tree2bee45b99ba6a85d396ff443ddac2d9e89b4226c /sfx2/source/doc/iframe.cxx
parent1ed50bb714b8ed657cd422df850a6852cd863f43 (diff)
set an InteractionHandler with the embedded frame as dialog parent
for any warning dialogs that may appear Change-Id: Ibb8f90b60cb1af625b0dc57d2f9fd01964fa9bba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/150128 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sfx2/source/doc/iframe.cxx')
-rw-r--r--sfx2/source/doc/iframe.cxx5
1 files changed, 4 insertions, 1 deletions
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 8d1504979e3e..b30063ee382e 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -24,6 +24,7 @@
#include <com/sun/star/frame/Frame.hpp>
#include <com/sun/star/frame/XFrame2.hpp>
#include <com/sun/star/frame/XSynchronousFrameLoader.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/util/XCloseable.hpp>
@@ -199,9 +200,11 @@ sal_Bool SAL_CALL IFrameObject::load(
if ( xFramesSupplier.is() )
mxFrame->setCreator( xFramesSupplier );
+ uno::Reference<task::XInteractionHandler> xInteractionHandler(task::InteractionHandler::createWithParent(mxContext, xWin));
uno::Sequence < beans::PropertyValue > aProps{
comphelper::makePropertyValue("PluginMode", sal_Int16(2)),
- comphelper::makePropertyValue("ReadOnly", true)
+ comphelper::makePropertyValue("ReadOnly", true),
+ comphelper::makePropertyValue("InteractionHandler", xInteractionHandler)
};
uno::Reference < frame::XDispatch > xDisp = mxFrame->queryDispatch( aTargetURL, "_self", 0 );
if ( xDisp.is() )