avmedia/source/framework/mediacontrol.cxx | 2 +- avmedia/source/viewer/mediawindow.cxx | 7 ++++--- include/avmedia/mediawindow.hxx | 2 +- sc/source/ui/drawfunc/fuins1.cxx | 5 ++--- sd/source/ui/func/fuinsert.cxx | 3 +-- sw/source/uibase/shells/grfshex.cxx | 3 +-- 6 files changed, 10 insertions(+), 12 deletions(-)
New commits: commit 1abd3b0e00766a6674d965535bd18a4891bac06e Author: Caolán McNamara <caol...@redhat.com> Date: Sat Sep 2 21:30:40 2017 +0100 set parent for insert media file dialog Change-Id: I71eace1995b229caa75e61df363fd8bad981bed1 Reviewed-on: https://gerrit.libreoffice.org/41851 Tested-by: Jenkins <c...@libreoffice.org> Reviewed-by: Caolán McNamara <caol...@redhat.com> Tested-by: Caolán McNamara <caol...@redhat.com> 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[] = ";"; diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx index f5dd652f2cd6..a285e26474fc 100644 --- a/include/avmedia/mediawindow.hxx +++ b/include/avmedia/mediawindow.hxx @@ -98,7 +98,7 @@ namespace avmedia static void getMediaFilters( FilterNameVector& rFilterNameVector ); /// @param o_pbLink if not 0, this is an "insert" dialog: display link /// checkbox and store its state in *o_pbLink - static bool executeMediaURLDialog( OUString& rURL, bool *const o_pbLink ); + static bool executeMediaURLDialog(const vcl::Window* pParent, OUString& rURL, bool *const o_pbLink); static void executeFormatErrorBox( vcl::Window* pParent ); static bool isMediaURL( const OUString& rURL, const OUString& rReferer, bool bDeep = false, Size* pPreferredSizePixel = nullptr ); diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx index 1177c90e9d84..00a612e2eefe 100644 --- a/sc/source/ui/drawfunc/fuins1.cxx +++ b/sc/source/ui/drawfunc/fuins1.cxx @@ -290,7 +290,7 @@ FuInsertGraphic::~FuInsertGraphic() } FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh, - vcl::Window* pWin, + vcl::Window* pWin, ScDrawView* pViewP, SdrModel* pDoc, const SfxRequest& rReq ) : @@ -312,8 +312,7 @@ FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh, } bool bLink(true); - if (bAPI || - ::avmedia::MediaWindow::executeMediaURLDialog(aURL, & bLink)) + if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(pWin, aURL, &bLink)) { Size aPrefSize; diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx index e1e4c1e42e8f..67efed274d2b 100644 --- a/sd/source/ui/func/fuinsert.cxx +++ b/sd/source/ui/func/fuinsert.cxx @@ -708,8 +708,7 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq ) } bool bLink(true); - if (bAPI || - ::avmedia::MediaWindow::executeMediaURLDialog(aURL, & bLink)) + if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(mpWindow, aURL, & bLink)) { Size aPrefSize; diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx index cf3c3589fc9a..a8f92194cbb9 100644 --- a/sw/source/uibase/shells/grfshex.cxx +++ b/sw/source/uibase/shells/grfshex.cxx @@ -74,8 +74,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) } bool bLink(true); - if (bAPI || - ::avmedia::MediaWindow::executeMediaURLDialog(aURL, & bLink)) + if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(pWindow, aURL, & bLink)) { Size aPrefSize;
_______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits