summaryrefslogtreecommitdiff
path: root/sd
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2019-07-25 10:30:56 +0100
committerCaolán McNamara <caolanm@redhat.com>2019-07-25 13:24:11 +0200
commitb0cc179a728603d62fd62595f039d2d856f8c9c3 (patch)
treedae6ad2f37a41a2b8adc28aa81ac3cd50bb077d5 /sd
parent11b06f0e00fc21654384e2816842ab101e15010e (diff)
add XInitialization to allow setting explicit dialog parent
Change-Id: Icc2626b6b3defeb6c02a43cee14cdb97dc573870 Reviewed-on: https://gerrit.libreoffice.org/76290 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'sd')
-rw-r--r--sd/source/ui/view/drviews2.cxx15
1 files changed, 15 insertions, 0 deletions
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 3c70dc1596c6..34fcc56b2243 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/drawing/XMasterPagesSupplier.hpp>
#include <com/sun/star/drawing/XDrawPages.hpp>
+#include <com/sun/star/lang/XInitialization.hpp>
#include <com/sun/star/ui/dialogs/XExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/XSLTFilterDialog.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -36,6 +37,7 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <comphelper/processfactory.hxx>
+#include <comphelper/propertysequence.hxx>
#include <comphelper/scopeguard.hxx>
#include <editeng/editdata.hxx>
@@ -1730,6 +1732,19 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if( aContexts.hasElements() )
{
css::scanner::ScannerContext aContext( aContexts.getConstArray()[ 0 ] );
+
+ Reference<lang::XInitialization> xInit(mxScannerManager, UNO_QUERY);
+ if (xInit.is())
+ {
+ // initialize dialog
+ weld::Window* pWindow = rReq.GetFrameWeld();
+ uno::Sequence<uno::Any> aSeq(comphelper::InitAnyPropertySequence(
+ {
+ {"ParentWindow", pWindow ? uno::Any(pWindow->GetXWindow()) : uno::Any(Reference<awt::XWindow>())}
+ }));
+ xInit->initialize( aSeq );
+ }
+
mxScannerManager->configureScannerAndScan( aContext, mxScannerListener );
}
}