diff options
author | Caolán McNamara <caolanm@redhat.com> | 2017-09-07 10:54:22 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2017-09-08 11:27:18 +0200 |
commit | 1af5f6e8d1bdec9bd2f14d0f5f8fad9c0fdead2b (patch) | |
tree | 84773114c08ca86424af4f8a17ec69d295908e01 /forms | |
parent | bb2258f7e4bcf078810cf1e40fdec2f17576c3b2 (diff) |
set parent for file dialog helper
Change-Id: I3994ee48dcb5b2732cb27cb9ccb54926abf0828a
Reviewed-on: https://gerrit.libreoffice.org/42048
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'forms')
-rw-r--r-- | forms/source/component/ImageControl.cxx | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx index 7aeb238b269d..d402a7a87c95 100644 --- a/forms/source/component/ImageControl.cxx +++ b/forms/source/component/ImageControl.cxx @@ -26,6 +26,7 @@ #include <svtools/imageresourceaccess.hxx> #include <sfx2/filedlghelper.hxx> +#include <toolkit/helper/vclunohelper.hxx> #include <com/sun/star/awt/PopupMenu.hpp> #include <com/sun/star/awt/XPopupMenu.hpp> #include <com/sun/star/awt/PopupMenuDirection.hpp> @@ -781,7 +782,9 @@ bool OImageControlControl::implInsertGraphics() // build some arguments for the upcoming dialog try { - ::sfx2::FileDialogHelper aDialog( TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic ); + Reference< XWindowPeer > xWindowPeer = getPeer(); + ::sfx2::FileDialogHelper aDialog(TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic, + VCLUnoHelper::GetWindow(xWindowPeer)); aDialog.SetTitle( sTitle ); Reference< XFilePickerControlAccess > xController( aDialog.GetFilePicker(), UNO_QUERY_THROW ); |