From 1abd3b0e00766a6674d965535bd18a4891bac06e Mon Sep 17 00:00:00 2001 From: Caolán McNamara Date: Sat, 2 Sep 2017 21:30:40 +0100 Subject: set parent for insert media file dialog MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I71eace1995b229caa75e61df363fd8bad981bed1 Reviewed-on: https://gerrit.libreoffice.org/41851 Tested-by: Jenkins Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- avmedia/source/framework/mediacontrol.cxx | 2 +- avmedia/source/viewer/mediawindow.cxx | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) (limited to 'avmedia') diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx index b3dbf8f21cef..98706fc8a679 100644 --- a/avmedia/source/framework/mediacontrol.cxx +++ b/avmedia/source/framework/mediacontrol.cxx @@ -296,7 +296,7 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p, void ) { OUString aURL; - if (MediaWindow::executeMediaURLDialog(aURL, nullptr)) + if (MediaWindow::executeMediaURLDialog(this, aURL, nullptr)) { if( !MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true ) ) MediaWindow::executeFormatErrorBox( this ); diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx index 93774aab821f..304384cb2761 100644 --- a/avmedia/source/viewer/mediawindow.cxx +++ b/avmedia/source/viewer/mediawindow.cxx @@ -209,11 +209,12 @@ void MediaWindow::getMediaFilters( FilterNameVector& rFilterNameVector ) } -bool MediaWindow::executeMediaURLDialog(OUString& rURL, bool *const o_pbLink) +bool MediaWindow::executeMediaURLDialog(const vcl::Window* pParent, OUString& rURL, bool *const o_pbLink) { - ::sfx2::FileDialogHelper aDlg( o_pbLink + ::sfx2::FileDialogHelper aDlg(o_pbLink ? ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW - : ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE ); + : ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, + FileDialogFlags::NONE, pParent); static const char aWildcard[] = "*."; FilterNameVector aFilters; static const char aSeparator[] = ";"; -- cgit