summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2017-09-07 10:54:22 +0100
committerCaolán McNamara <caolanm@redhat.com>2017-09-08 11:27:18 +0200
commit1af5f6e8d1bdec9bd2f14d0f5f8fad9c0fdead2b (patch)
tree84773114c08ca86424af4f8a17ec69d295908e01
parentbb2258f7e4bcf078810cf1e40fdec2f17576c3b2 (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>
-rw-r--r--cui/source/customize/acccfg.cxx2
-rw-r--r--cui/source/customize/cfg.cxx2
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx2
-rw-r--r--cui/source/dialogs/insdlg.cxx3
-rw-r--r--cui/source/options/doclinkdialog.cxx4
-rw-r--r--cui/source/options/optinet2.cxx2
-rw-r--r--cui/source/options/optjava.cxx2
-rw-r--r--cui/source/tabpages/backgrnd.cxx2
-rw-r--r--cui/source/tabpages/numpages.cxx5
-rw-r--r--cui/source/tabpages/tpbitmap.cxx2
-rw-r--r--cui/source/tabpages/tpline.cxx2
-rw-r--r--cui/source/tabpages/tplnedef.cxx8
-rw-r--r--cui/source/tabpages/tplneend.cxx5
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx18
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx2
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx3
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx10
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx6
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.cxx3
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx6
-rw-r--r--forms/source/component/ImageControl.cxx5
-rw-r--r--include/sfx2/docinsert.hxx3
-rw-r--r--include/sfx2/filedlghelper.hxx55
-rw-r--r--include/sfx2/opengrf.hxx4
-rw-r--r--include/svx/graphichelper.hxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx2
-rw-r--r--sc/source/ui/docshell/docsh4.cxx6
-rw-r--r--sc/source/ui/drawfunc/chartsh.cxx4
-rw-r--r--sc/source/ui/drawfunc/fuins1.cxx4
-rw-r--r--sc/source/ui/drawfunc/graphsh.cxx9
-rw-r--r--sc/source/ui/miscdlgs/dataproviderdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/datastreamdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/instbdlg.cxx2
-rw-r--r--sc/source/ui/miscdlgs/linkarea.cxx2
-rw-r--r--sc/source/ui/view/tabvwshb.cxx3
-rw-r--r--sd/source/ui/animations/CustomAnimationDialog.cxx2
-rw-r--r--sd/source/ui/animations/SlideTransitionPane.cxx2
-rw-r--r--sd/source/ui/dlg/PhotoAlbumDialog.cxx2
-rw-r--r--sd/source/ui/dlg/filedlg.cxx10
-rw-r--r--sd/source/ui/dlg/tpaction.cxx5
-rw-r--r--sd/source/ui/func/fuinsert.cxx5
-rw-r--r--sd/source/ui/func/fuinsfil.cxx2
-rw-r--r--sd/source/ui/func/fupage.cxx4
-rw-r--r--sd/source/ui/inc/filedlg.hxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx6
-rw-r--r--sfx2/source/appl/fileobj.cxx4
-rw-r--r--sfx2/source/appl/lnkbase2.cxx2
-rw-r--r--sfx2/source/appl/opengrf.cxx14
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx5
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx4
-rw-r--r--sfx2/source/doc/docinsert.cxx9
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--svx/source/core/graphichelper.cxx8
-rw-r--r--svx/source/dialog/imapdlg.cxx6
-rw-r--r--svx/source/form/datanavi.cxx3
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanelBase.cxx2
-rw-r--r--sw/inc/dbmgr.hxx2
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx3
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx3
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx3
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx4
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx5
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx2
-rw-r--r--sw/source/ui/fldui/changedb.cxx2
-rw-r--r--sw/source/ui/fldui/flddb.cxx2
-rw-r--r--sw/source/ui/fldui/javaedit.cxx2
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx5
-rw-r--r--sw/source/ui/index/cnttab.cxx11
-rw-r--r--sw/source/ui/misc/glossary.cxx3
-rw-r--r--sw/source/uibase/app/docsh2.cxx10
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx4
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx4
-rw-r--r--sw/source/uibase/docvw/romenu.cxx4
-rw-r--r--sw/source/uibase/inc/mailmergehelper.hxx2
-rw-r--r--sw/source/uibase/shells/drawsh.cxx4
-rw-r--r--sw/source/uibase/shells/grfsh.cxx4
-rw-r--r--sw/source/uibase/uiview/srcview.cxx3
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx2
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx2
82 files changed, 208 insertions, 179 deletions
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 04d055a5537b..0186c798fff6 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1397,7 +1397,7 @@ void SfxAcceleratorConfigPage::StartFileDialog( StartFileDialogType nType, const
short nDialogType = bSave ? ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION
: ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE;
delete m_pFileDlg;
- m_pFileDlg = new sfx2::FileDialogHelper( nDialogType );
+ m_pFileDlg = new sfx2::FileDialogHelper(nDialogType, FileDialogFlags::NONE, this);
m_pFileDlg->SetTitle( rTitle );
m_pFileDlg->AddFilter( aFilterAllStr, FILEDIALOG_FILTER_ALL );
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 195517218184..94cbe5f2f724 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3196,7 +3196,7 @@ IMPL_LINK_NOARG( SvxIconSelectorDialog, ImportHdl, Button *, void)
{
sfx2::FileDialogHelper aImportDialog(
css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- FileDialogFlags::Graphic | FileDialogFlags::MultiSelection );
+ FileDialogFlags::Graphic | FileDialogFlags::MultiSelection, this);
// disable the link checkbox in the dialog
uno::Reference< css::ui::dialogs::XFilePickerControlAccess >
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index 599ec984b70f..063e311f2b66 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -1086,7 +1086,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickTakeHdl, Button*, void)
if( !m_pLbxFound->GetSelectEntryCount() || !bEntriesFound )
{
- SvxOpenGraphicDialog aDlg("Gallery");
+ SvxOpenGraphicDialog aDlg("Gallery", this);
aDlg.EnableLink(false);
aDlg.AsLink(false);
diff --git a/cui/source/dialogs/insdlg.cxx b/cui/source/dialogs/insdlg.cxx
index 0bb974c0799e..a1a14b327c6a 100644
--- a/cui/source/dialogs/insdlg.cxx
+++ b/cui/source/dialogs/insdlg.cxx
@@ -621,7 +621,8 @@ IMPL_LINK_NOARG( SfxInsertFloatingFrameDialog, OpenHdl, Button*, void)
{
// create the file dialog
sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, OUString() );
+ ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, OUString(),
+ SfxFilterFlags::NONE, SfxFilterFlags::NONE, this);
// set the title
aFileDlg.SetTitle(CuiResId(RID_SVXSTR_SELECT_FILE_IFRAME));
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index c7ab9a2983e9..f57cd6210ebd 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -159,11 +159,10 @@ namespace svx
EndDialog(RET_OK);
}
-
IMPL_LINK_NOARG(ODocumentLinkDialog, OnBrowseFile, Button*, void)
{
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, FileDialogFlags::NONE, this);
std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName("StarOffice XML (Base)");
if ( pFilter )
{
@@ -203,7 +202,6 @@ namespace svx
validate();
}
-
IMPL_LINK_NOARG(ODocumentLinkDialog, OnTextModified, Edit&, void)
{
validate( );
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 25d705ab30c3..126017e2f9b8 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -1012,7 +1012,7 @@ IMPL_LINK( SvxEMailTabPage, FileDialogHdl_Impl, Button*, pButton, void )
{
if (m_pMailerURLPB == pButton && !pImpl->bROProgram)
{
- FileDialogHelper aHelper( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ FileDialogHelper aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, this);
OUString sPath = m_pMailerURLED->GetText();
if ( sPath.isEmpty() )
sPath = "/usr/bin";
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index f8345e7b93fb..a23b5d5942c5 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -908,7 +908,7 @@ void SvxJavaClassPathDlg::dispose()
IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, Button*, void)
{
- sfx2::FileDialogHelper aDlg( TemplateDescription::FILEOPEN_SIMPLE );
+ sfx2::FileDialogHelper aDlg(TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, this);
aDlg.SetTitle( CuiResId( RID_SVXSTR_ARCHIVE_TITLE ) );
aDlg.AddFilter( CuiResId( RID_SVXSTR_ARCHIVE_HEADLINE ), "*.jar;*.zip" );
OUString sFolder;
diff --git a/cui/source/tabpages/backgrnd.cxx b/cui/source/tabpages/backgrnd.cxx
index ffa76d28fed2..d38f5bfe67fb 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1135,7 +1135,7 @@ IMPL_LINK_NOARG(SvxBackgroundTabPage, BrowseHdl_Impl, Button*, void)
bool bHtml = 0 != ( nHtmlMode & HTMLMODE_ON );
OUString aStrBrowse(get<vcl::Window>("findgraphicsft")->GetText());
- pImportDlg = new SvxOpenGraphicDialog( aStrBrowse );
+ pImportDlg = new SvxOpenGraphicDialog(aStrBrowse, this);
if ( bHtml )
pImportDlg->EnableLink(false);
pImportDlg->SetPath( aBgdGraphicPath, m_pBtnLink->IsChecked() );
diff --git a/cui/source/tabpages/numpages.cxx b/cui/source/tabpages/numpages.cxx
index 7e6cfcfc1dc6..a50dba3c49e4 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -986,8 +986,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, DoubleClickHdl_Impl, ValueSet*, void)
IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, Button*, void)
{
-
- sfx2::FileDialogHelper aFileDialog(0);
+ sfx2::FileDialogHelper aFileDialog(0, FileDialogFlags::NONE, this);
aFileDialog.SetTitle(CuiResId(RID_SVXSTR_ADD_IMAGE));
if ( aFileDialog.Execute() != ERRCODE_NONE )
return;
@@ -1947,7 +1946,7 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton, void )
OUString aGrfName;
Size aSize;
bool bSucc(false);
- SvxOpenGraphicDialog aGrfDlg( CuiResId(RID_SVXSTR_EDIT_GRAPHIC) );
+ SvxOpenGraphicDialog aGrfDlg(CuiResId(RID_SVXSTR_EDIT_GRAPHIC), this);
if(MN_GALLERY_ENTRY <= nItemId )
{
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index c6667bf53a02..ddf6e0b69c4b 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -758,7 +758,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyTileOffsetHdl, Edit&, void)
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, Button*, void)
{
- SvxOpenGraphicDialog aDlg( "Import" );
+ SvxOpenGraphicDialog aDlg("Import", this);
aDlg.EnableLink(false);
long nCount = m_pBitmapList->Count();
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 01a0417e50d7..809a5dd0a778 100644
--- a/cui/source/tabpages/tpline.cxx
+++ b/cui/source/tabpages/tpline.cxx
@@ -463,7 +463,7 @@ void SvxLineTabPage::SymbolSelected(MenuButton const * pButton)
break;
default:
{
- SvxOpenGraphicDialog aGrfDlg(CuiResId(RID_SVXSTR_EDIT_GRAPHIC));
+ SvxOpenGraphicDialog aGrfDlg(CuiResId(RID_SVXSTR_EDIT_GRAPHIC), this);
aGrfDlg.EnableLink(false);
aGrfDlg.AsLink(false);
if( !aGrfDlg.Execute() )
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 28984fa50ec7..49e2bb8a028e 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -710,7 +710,6 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickDeleteHdl_Impl, Button*, void)
}
}
-
IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void)
{
sal_uInt16 nReturn = RET_YES;
@@ -727,7 +726,8 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
OUString aStrFilterType( "*.sod" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
OUString aPalettePath(SvtPathOptions().GetPalettePath());
@@ -790,10 +790,9 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void)
}
}
-
IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl, Button*, void)
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
+ ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, FileDialogFlags::NONE, this);
OUString aStrFilterType( "*.sod" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
@@ -843,7 +842,6 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickSaveHdl_Impl, Button*, void)
}
}
-
void SvxLineDefTabPage::FillDash_Impl()
{
css::drawing::DashStyle eXDS;
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index bb52e85621d7..4ac321a6e65c 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -539,7 +539,8 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
- ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
OUString aStrFilterType( "*.soe" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
@@ -606,7 +607,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, Button*, void)
IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickSaveHdl_Impl, Button*, void)
{
- ::sfx2::FileDialogHelper aDlg( css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
+ ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, FileDialogFlags::NONE, this);
OUString aStrFilterType( "*.soe" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index c35461411c0b..33f6fd0faba9 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -220,7 +220,7 @@ namespace dbaui
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
FileDialogFlags::NONE,
aModule.GetFactoryEmptyDocumentURL(SvtModuleOptions::EFactory::CALC)
- ,SfxFilterFlags::IMPORT);
+ ,SfxFilterFlags::IMPORT, SfxFilterFlags::NONE, this);
askForFileName(aFileDlg);
}
break;
@@ -230,8 +230,8 @@ namespace dbaui
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
FileDialogFlags::NONE,
- aModule.GetFactoryEmptyDocumentURL(SvtModuleOptions::EFactory::WRITER)
- ,SfxFilterFlags::IMPORT);
+ aModule.GetFactoryEmptyDocumentURL(SvtModuleOptions::EFactory::WRITER),
+ SfxFilterFlags::IMPORT, SfxFilterFlags::NONE, this);
askForFileName(aFileDlg);
}
break;
@@ -240,7 +240,8 @@ namespace dbaui
const OUString sExt("*.mdb;*.mde");
OUString sFilterName(DBA_RES (STR_MSACCESS_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
+ FileDialogFlags::NONE, this);
aFileDlg.AddFilter(sFilterName,sExt);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
@@ -251,7 +252,8 @@ namespace dbaui
const OUString sAccdb("*.accdb;*.accde");
OUString sFilterName2(DBA_RES (STR_MSACCESS_2007_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
+ FileDialogFlags::NONE, this);
aFileDlg.AddFilter(sFilterName2,sAccdb);
aFileDlg.SetCurrentFilter(sFilterName2);
askForFileName(aFileDlg);
@@ -331,7 +333,8 @@ namespace dbaui
const OUString sExt("*.fdb");
OUString sFilterName(DBA_RES (STR_FIREBIRD_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE);
+ ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
aFileDlg.AddFilter(sFilterName,sExt);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
@@ -355,7 +358,8 @@ namespace dbaui
const OUString sExt("*.fdb");
OUString sFilterName(DBA_RES (STR_FIREBIRD_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION);
+ ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
+ FileDialogFlags::NONE, this);
aFileDlg.AddFilter(sFilterName,sExt);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 08032871052f..3cdadd9c3e78 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -705,7 +705,7 @@ namespace dbaui
{
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::NONE, "sdatabase" );
+ FileDialogFlags::NONE, "sdatabase", SfxFilterFlags::NONE, SfxFilterFlags::NONE, this);
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
if ( pFilter )
{
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index c7e78ec28f7b..680335d96e34 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -205,7 +205,8 @@ namespace dbp
IMPL_LINK_NOARG( OTableSelectionPage, OnSearchClicked, Button*, void )
{
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
+ FileDialogFlags::NONE, this);
aFileDlg.SetDisplayDirectory( SvtPathOptions().GetWorkPath() );
std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName("StarOffice XML (Base)");
diff --git a/extensions/source/propctrlr/formcomponenthandler.cxx b/extensions/source/propctrlr/formcomponenthandler.cxx
index cfd0ce7cf7d0..d37bc2c345fb 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2716,7 +2716,6 @@ namespace pcr
return bChanged;
}
-
bool FormComponentPropertyHandler::impl_browseForImage_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
bool bIsLink = true;// reflect the legacy behavior
@@ -2724,7 +2723,7 @@ namespace pcr
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- FileDialogFlags::Graphic);
+ FileDialogFlags::Graphic, impl_getDefaultDialogParent_nothrow());
aFileDlg.SetTitle(aStrTrans);
// non-linked images ( e.g. those located in the document
@@ -2787,11 +2786,11 @@ namespace pcr
return bSuccess;
}
-
bool FormComponentPropertyHandler::impl_browseForTargetURL_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
+ FileDialogFlags::NONE, impl_getDefaultDialogParent_nothrow());
OUString sURL;
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_TARGET_URL ) >>= sURL );
@@ -2808,7 +2807,6 @@ namespace pcr
return bSuccess;
}
-
bool FormComponentPropertyHandler::impl_executeFontDialog_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
bool bSuccess = false;
@@ -2846,7 +2844,7 @@ namespace pcr
{
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, FileDialogFlags::NONE,
- "sdatabase");
+ "sdatabase", SfxFilterFlags::NONE, SfxFilterFlags::NONE, impl_getDefaultDialogParent_nothrow());
OUString sDataSource;
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_DATASOURCE ) >>= sDataSource );
diff --git a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
index b8efe9dc4bb4..60045efce674 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -871,7 +871,8 @@ void XMLFilterSettingsDialog::onSave()
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION );
+ css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
+ FileDialogFlags::NONE, this);
OUString aExtensions( "*.jar" );
OUString aFilterName(XsltResId(STR_FILTER_PACKAGE));
@@ -913,7 +914,8 @@ void XMLFilterSettingsDialog::onOpen()
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
OUString aExtensions( "*.jar" );
OUString aFilterName(XsltResId(STR_FILTER_PACKAGE));
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
index 7d3128a77204..d8a7d596c7bc 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -167,7 +167,8 @@ IMPL_LINK ( XMLFilterTabPageXSLT, ClickBrowseHdl_Impl, Button *, pButton, void )
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
aDlg.SetDisplayDirectory( GetURL( pURLBox ) );
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 3b29bd7727b5..cf06ebce3c17 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -308,7 +308,8 @@ void XMLFilterTestDialog::onExportBrowse()
{
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
Reference< XNameAccess > xFilterContainer( mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.FilterFactory", mxContext ), UNO_QUERY );
Reference< XNameAccess > xTypeDetection( mxContext->getServiceManager()->createInstanceWithContext( "com.sun.star.document.TypeDetection", mxContext ), UNO_QUERY );
@@ -540,7 +541,8 @@ void XMLFilterTestDialog::onImportBrowse()
{
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
OUString aFilterName( m_pFilterInfo->maInterfaceName );
OUString aExtensions;
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 );
diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx
index a7b7302a795f..5ab0d9b73bd0 100644
--- a/include/sfx2/docinsert.hxx
+++ b/include/sfx2/docinsert.hxx
@@ -39,6 +39,7 @@ namespace sfx2 {
class SFX2_DLLPUBLIC DocumentInserter
{
private:
+ VclPtr<vcl::Window> m_xParent;
OUString m_sDocFactory;
OUString m_sFilter;
Link<sfx2::FileDialogHelper*,void> m_aDialogClosedLink;
@@ -60,7 +61,7 @@ public:
Compare,
Merge
};
- DocumentInserter(const OUString& rFactory, const Mode mode = Mode::Insert);
+ DocumentInserter(vcl::Window* pParent, const OUString& rFactory, const Mode mode = Mode::Insert);
~DocumentInserter();
void StartExecuteModal( const Link<sfx2::FileDialogHelper*,void>& _rDialogClosedLink );
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index acdf03f0b4b3..6c6a4f090c3f 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -101,33 +101,34 @@ private:
public:
- FileDialogHelper( sal_Int16 nDialogType,
- FileDialogFlags nFlags = FileDialogFlags::NONE,
- const vcl::Window* _pPreferredParent = nullptr );
-
- FileDialogHelper( sal_Int16 nDialogType,
- FileDialogFlags nFlags,
- const OUString& rFactory,
- SfxFilterFlags nMust = SfxFilterFlags::NONE,
- SfxFilterFlags nDont = SfxFilterFlags::NONE );
-
- FileDialogHelper( sal_Int16 nDialogType,
- FileDialogFlags nFlags,
- const OUString& rFactory,
- sal_Int16 nDialog,
- SfxFilterFlags nMust,
- SfxFilterFlags nDont,
- const OUString& rStandardDir,
- const css::uno::Sequence< OUString >& rBlackList,
- const vcl::Window* _pPreferredParent = nullptr);
-
- FileDialogHelper( sal_Int16 nDialogType,
- FileDialogFlags nFlags,
- const OUString& aFilterUIName,
- const OUString& aExtName,
- const OUString& rStandardDir,
- const css::uno::Sequence< OUString >& rBlackList,
- const vcl::Window* _pPreferredParent = nullptr );
+ FileDialogHelper(sal_Int16 nDialogType,
+ FileDialogFlags nFlags,
+ const vcl::Window* _pPreferredParent);
+
+ FileDialogHelper(sal_Int16 nDialogType,
+ FileDialogFlags nFlags,
+ const OUString& rFactory,
+ SfxFilterFlags nMust,
+ SfxFilterFlags nDont,
+ const vcl::Window* _pPreferredParent);
+
+ FileDialogHelper(sal_Int16 nDialogType,
+ FileDialogFlags nFlags,
+ const OUString& rFactory,
+ sal_Int16 nDialog,
+ SfxFilterFlags nMust,
+ SfxFilterFlags nDont,
+ const OUString& rStandardDir,
+ const css::uno::Sequence< OUString >& rBlackList,
+ const vcl::Window* _pPreferredParent);
+
+ FileDialogHelper(sal_Int16 nDialogType,
+ FileDialogFlags nFlags,
+ const OUString& aFilterUIName,
+ const OUString& aExtName,
+ const OUString& rStandardDir,
+ const css::uno::Sequence< OUString >& rBlackList,
+ const vcl::Window* _pPreferredParent);
virtual ~FileDialogHelper();
diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx
index 542e573304cf..498ccdb7f9a8 100644
--- a/include/sfx2/opengrf.hxx
+++ b/include/sfx2/opengrf.hxx
@@ -28,8 +28,8 @@ struct SvxOpenGrf_Impl;
class SFX2_DLLPUBLIC SvxOpenGraphicDialog
{
public:
- SvxOpenGraphicDialog ( const OUString& rTitle );
- ~SvxOpenGraphicDialog ();
+ SvxOpenGraphicDialog(const OUString& rTitle, const vcl::Window* pPreferredParent);
+ ~SvxOpenGraphicDialog();
ErrCode Execute();
diff --git a/include/svx/graphichelper.hxx b/include/svx/graphichelper.hxx
index 9056d92dedde..72f13e70f56c 100644
--- a/include/svx/graphichelper.hxx
+++ b/include/svx/graphichelper.hxx
@@ -30,8 +30,8 @@ class SVX_DLLPUBLIC GraphicHelper
public:
static void GetPreferredExtension( OUString& rExtension, const Graphic& rGraphic );
- static OUString ExportGraphic( const Graphic& rGraphic, const OUString& rGraphicName );
- static void SaveShapeAsGraphic( const css::uno::Reference< css::drawing::XShape >& xShape );
+ static OUString ExportGraphic(const vcl::Window* pWin, const Graphic& rGraphic, const OUString& rGraphicName);
+ static void SaveShapeAsGraphic(const vcl::Window* pWin, const css::uno::Reference< css::drawing::XShape >& xShape);
static short HasToSaveTransformedImage(vcl::Window* pWin);
};
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index ccf428881469..e102bcd00160 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2991,7 +2991,7 @@ void OReportController::insertGraphic()
try
{
uno::Reference< report::XSection> xSection = getDesignView()->getCurrentSection();
- ::sfx2::FileDialogHelper aDialog( ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic );
+ ::sfx2::FileDialogHelper aDialog(ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic, getView());
aDialog.SetTitle( sTitle );
uno::Reference< ui::dialogs::XFilePickerControlAccess > xController(aDialog.GetFilePicker(), UNO_QUERY_THROW);
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index e70fb68f3abd..9dc6b4bd97af 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -727,7 +727,11 @@ void ScDocShell::Execute( SfxRequest& rReq )
delete pImpl->pRequest;
pImpl->pRequest = new SfxRequest( rReq );
delete pImpl->pDocInserter;
- pImpl->pDocInserter = new ::sfx2::DocumentInserter(
+
+ ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
+ vcl::Window* pParent = pViewSh ? pViewSh->GetDialogParent() : nullptr;
+
+ pImpl->pDocInserter = new ::sfx2::DocumentInserter(pParent,
ScDocShell::Factory().GetFactoryName(), mode );
pImpl->pDocInserter->StartExecuteModal( LINK( this, ScDocShell, DialogClosedHdl ) );
return ;
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index e82cbfe4fa6e..d3b870bb15d7 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -36,6 +36,7 @@
#include "document.hxx"
#include "docpool.hxx"
#include "drawview.hxx"
+#include "gridwin.hxx"
#include "scresid.hxx"
#define ScChartShell
@@ -96,8 +97,9 @@ void ScChartShell::ExecuteExportAsGraphic( SfxRequest& )
if( pObject && dynamic_cast<const SdrOle2Obj*>( pObject) != nullptr )
{
+ vcl::Window* pWin = GetViewData()->GetActiveWin();
Reference< drawing::XShape > xSourceDoc( pObject->getUnoShape(), UNO_QUERY_THROW );
- GraphicHelper::SaveShapeAsGraphic( xSourceDoc );
+ GraphicHelper::SaveShapeAsGraphic(pWin, xSourceDoc);
}
}
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index 00a612e2eefe..37aa583be912 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -219,7 +219,7 @@ static void lcl_InsertMedia( const OUString& rMediaURL, bool bApi,
}
FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
- vcl::Window* pWin,
+ vcl::Window* pWin,
ScDrawView* pViewP,
SdrModel* pDoc,
SfxRequest& rReq )
@@ -249,7 +249,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
}
else
{
- SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC));
+ SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin);
if( aDlg.Execute() == ERRCODE_NONE )
{
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 44a21ded58b7..3a55971f4dd4 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -266,9 +266,9 @@ void ScGraphicShell::ExecuteSaveGraphic( SAL_UNUSED_PARAMETER SfxRequest& /*rReq
{
GraphicAttr aGraphicAttr = pObj->GetGraphicAttr();
short nState = RET_CANCEL;
+ vcl::Window* pWin = GetViewData()->GetActiveWin();
if (aGraphicAttr != GraphicAttr()) // the image has been modified
{
- vcl::Window* pWin = GetViewData()->GetActiveWin();
if (pWin)
{
nState = GraphicHelper::HasToSaveTransformedImage(pWin);
@@ -281,12 +281,12 @@ void ScGraphicShell::ExecuteSaveGraphic( SAL_UNUSED_PARAMETER SfxRequest& /*rReq
if (nState == RET_YES)
{
- GraphicHelper::ExportGraphic( pObj->GetTransformedGraphic(), "" );
+ GraphicHelper::ExportGraphic(pWin, pObj->GetTransformedGraphic(), "");
}
else if (nState == RET_NO)
{
GraphicObject aGraphicObject(pObj->GetGraphicObject());
- GraphicHelper::ExportGraphic( aGraphicObject.GetGraphic(), "" );
+ GraphicHelper::ExportGraphic(pWin, aGraphicObject.GetGraphic(), "");
}
}
}
@@ -323,7 +323,8 @@ void ScGraphicShell::ExecuteChangePicture( SAL_UNUSED_PARAMETER SfxRequest& /*rR
if( pObj && nullptr != dynamic_cast<const SdrGrafObj*>( pObj) && static_cast<SdrGrafObj*>(pObj)->GetGraphicType() == GraphicType::Bitmap )
{
SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj);
- SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC));
+ vcl::Window* pWin = GetViewData()->GetActiveWin();
+ SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin);
if( aDlg.Execute() == ERRCODE_NONE )
{
diff --git a/sc/source/ui/miscdlgs/dataproviderdlg.cxx b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
index 7d1bd6150dd3..14cec83a8c68 100644
--- a/sc/source/ui/miscdlgs/dataproviderdlg.cxx
+++ b/sc/source/ui/miscdlgs/dataproviderdlg.cxx
@@ -57,7 +57,7 @@ void DataProviderDlg::dispose()
IMPL_LINK_NOARG(DataProviderDlg, BrowseHdl, Button*, void)
{
- sfx2::FileDialogHelper aFileDialog(0);
+ sfx2::FileDialogHelper aFileDialog(0, FileDialogFlags::NONE, this);
if ( aFileDialog.Execute() != ERRCODE_NONE )
return;
diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx
index b746d6051845..8a657492c29d 100644
--- a/sc/source/ui/miscdlgs/datastreamdlg.cxx
+++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx
@@ -81,7 +81,7 @@ void DataStreamDlg::dispose()
IMPL_LINK_NOARG(DataStreamDlg, BrowseHdl, Button*, void)
{
- sfx2::FileDialogHelper aFileDialog(0);
+ sfx2::FileDialogHelper aFileDialog(0, FileDialogFlags::NONE, this);
if ( aFileDialog.Execute() != ERRCODE_NONE )
return;
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 1dd51b7774b5..04acdf5e530a 100644
--- a/sc/source/ui/miscdlgs/instbdlg.cxx
+++ b/sc/source/ui/miscdlgs/instbdlg.cxx
@@ -274,7 +274,7 @@ IMPL_LINK_NOARG(ScInsertTableDlg, ChoiceHdl_Impl, Button*, void)
IMPL_LINK_NOARG(ScInsertTableDlg, BrowseHdl_Impl, Button*, void)
{
delete pDocInserter;
- pDocInserter = new ::sfx2::DocumentInserter(ScDocShell::Factory().GetFactoryName());
+ pDocInserter = new ::sfx2::DocumentInserter(this, ScDocShell::Factory().GetFactoryName());
pDocInserter->StartExecuteModal( LINK( this, ScInsertTableDlg, DialogClosedHdl ) );
}
diff --git a/sc/source/ui/miscdlgs/linkarea.cxx b/sc/source/ui/miscdlgs/linkarea.cxx
index 1fdf02ac7e0e..2de2133121cd 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -84,7 +84,7 @@ void ScLinkedAreaDlg::dispose()
IMPL_LINK_NOARG(ScLinkedAreaDlg, BrowseHdl, Button*, void)
{
if ( !pDocInserter )
- pDocInserter = new sfx2::DocumentInserter(ScDocShell::Factory().GetFactoryName());
+ pDocInserter = new sfx2::DocumentInserter(this, ScDocShell::Factory().GetFactoryName());
pDocInserter->StartExecuteModal( LINK( this, ScLinkedAreaDlg, DialogClosedHdl ) );
}
diff --git a/sc/source/ui/view/tabvwshb.cxx b/sc/source/ui/view/tabvwshb.cxx
index e709aa738c3e..5946da5c5ecd 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -349,7 +349,8 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
try
{
sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, "com.sun.star.chart2.ChartDocument");
+ FileDialogFlags::NONE, "com.sun.star.chart2.ChartDocument",
+ SfxFilterFlags::NONE, SfxFilterFlags::NONE, pWin);
if(aDlg.Execute() == ERRCODE_NONE )
{
INetURLObject aURLObj( aDlg.GetPath() );
diff --git a/sd/source/ui/animations/CustomAnimationDialog.cxx b/sd/source/ui/animations/CustomAnimationDialog.cxx
index 8f697fc0b9e7..e8b332424b1c 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1478,7 +1478,7 @@ sal_Int32 CustomAnimationEffectTabPage::getSoundObject( const OUString& rStr )
void CustomAnimationEffectTabPage::openSoundFileDialog()
{
- SdOpenSoundFileDialog aFileDialog;
+ SdOpenSoundFileDialog aFileDialog(this);
OUString aFile( SvtPathOptions().GetWorkPath() );
aFileDialog.SetPath( aFile );
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index 8763f095c2ba..2d9c135fbf6f 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -725,7 +725,7 @@ void SlideTransitionPane::openSoundFileDialog()
if( ! mpLB_SOUND->IsEnabled())
return;
- SdOpenSoundFileDialog aFileDialog;
+ SdOpenSoundFileDialog aFileDialog(this);
OUString aFile;
DBG_ASSERT( mpLB_SOUND->GetSelectEntryPos() == 2,
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index b70c7c7b7b92..89dae96b6ce9 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -501,7 +501,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, Button*, void)
{
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_PREVIEW,
- FileDialogFlags::Graphic | FileDialogFlags::MultiSelection
+ FileDialogFlags::Graphic | FileDialogFlags::MultiSelection, this
);
// Read configuration
OUString sUrl(officecfg::Office::Impress::Pictures::Path::get());
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index 852dcad4fecc..f042354d3b7f 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -59,7 +59,7 @@ private:
DECL_LINK( IsMusicStoppedHdl, Timer *, void );
public:
- explicit SdFileDialog_Imp();
+ explicit SdFileDialog_Imp(const vcl::Window *pParent);
virtual ~SdFileDialog_Imp() override;
// overwritten from FileDialogHelper, to receive user feedback
@@ -174,8 +174,8 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl, Timer *, void)
}
}
-SdFileDialog_Imp::SdFileDialog_Imp() :
- FileDialogHelper( css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY ),
+SdFileDialog_Imp::SdFileDialog_Imp(const vcl::Window* pParent) :
+ FileDialogHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY, FileDialogFlags::NONE, pParent),
mnPlaySoundEvent( nullptr ),
mbLabelPlaying(false)
{
@@ -212,8 +212,8 @@ SdFileDialog_Imp::~SdFileDialog_Imp()
// ----------- SdOpenSoundFileDialog -----------------------
// these are simple forwarders
-SdOpenSoundFileDialog::SdOpenSoundFileDialog() :
- mpImpl( new SdFileDialog_Imp() )
+SdOpenSoundFileDialog::SdOpenSoundFileDialog(const vcl::Window *pParent) :
+ mpImpl( new SdFileDialog_Imp(pParent) )
{
OUString aDescr;
aDescr = SdResId(STR_ALL_FILES);
diff --git a/sd/source/ui/dlg/tpaction.cxx b/sd/source/ui/dlg/tpaction.cxx
index 9f0d25a4641c..9f6b8f24bc3e 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -411,7 +411,7 @@ void SdTPAction::OpenFileDialog()
if (bSound)
{
- SdOpenSoundFileDialog aFileDialog;
+ SdOpenSoundFileDialog aFileDialog(this);
if( aFile.isEmpty() )
aFile = SvtPathOptions().GetWorkPath();
@@ -437,7 +437,8 @@ void SdTPAction::OpenFileDialog()
else
{
sfx2::FileDialogHelper aFileDialog(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
+ FileDialogFlags::NONE, this);
if (bDocument && aFile.isEmpty())
aFile = SvtPathOptions().GetWorkPath();
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 67efed274d2b..99b653e283c5 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -140,7 +140,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
}
else
{
- SvxOpenGraphicDialog aDlg(SdResId(STR_INSERTGRAPHIC));
+ SvxOpenGraphicDialog aDlg(SdResId(STR_INSERTGRAPHIC), mpWindow);
if( aDlg.Execute() != ERRCODE_NONE )
return; // cancel dialog
@@ -775,7 +775,8 @@ rtl::Reference<FuPoor> FuInsert3DModel::Create( ViewShell* pViewSh, ::sd::Window
void FuInsert3DModel::DoExecute( SfxRequest& )
{
- sfx2::FileDialogHelper aDlg( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, mpWindow);
aDlg.SetTitle( SdResId( STR_INSERT_3D_MODEL_TITLE ) );
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index d72701c527e9..210d8d95a4cd 100644
--- a/sd/source/ui/func/fuinsfil.cxx
+++ b/sd/source/ui/func/fuinsfil.cxx
@@ -138,7 +138,7 @@ void FuInsertFile::DoExecute( SfxRequest& rReq )
{
sfx2::FileDialogHelper aFileDialog(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::Insert );
+ FileDialogFlags::Insert, mpWindow);
Reference< XFilePicker > xFilePicker( aFileDialog.GetFilePicker(), UNO_QUERY );
Reference< XFilterManager > xFilterManager( xFilePicker, UNO_QUERY );
OUString aOwnCont;
diff --git a/sd/source/ui/func/fupage.cxx b/sd/source/ui/func/fupage.cxx
index e02551a325e4..3b97ae868e91 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -301,12 +301,12 @@ const SfxItemSet* FuPage::ExecuteDialog( vcl::Window* pParent )
const XFillBitmapItem& rBitmap =
static_cast<const XFillBitmapItem&>(aMergedAttr.Get(XATTR_FILLBITMAP));
const GraphicObject& rGraphicObj = rBitmap.GetGraphicObject();
- GraphicHelper::ExportGraphic(rGraphicObj.GetGraphic(), "");
+ GraphicHelper::ExportGraphic(pParent, rGraphicObj.GetGraphic(), "");
}
}
else if (nId == SID_SELECT_BACKGROUND)
{
- SvxOpenGraphicDialog aDlg(SdResId(STR_SET_BACKGROUND_PICTURE));
+ SvxOpenGraphicDialog aDlg(SdResId(STR_SET_BACKGROUND_PICTURE), pParent);
if( aDlg.Execute() == ERRCODE_NONE )
{
diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx
index 7712bb58eaf9..cd68b6cd7fd6 100644
--- a/sd/source/ui/inc/filedlg.hxx
+++ b/sd/source/ui/inc/filedlg.hxx
@@ -44,7 +44,7 @@ class SD_DLLPUBLIC SdOpenSoundFileDialog
SdOpenSoundFileDialog & operator= (const SdOpenSoundFileDialog &) = delete;
public:
- SdOpenSoundFileDialog();
+ SdOpenSoundFileDialog(const vcl::Window* pParent);
~SdOpenSoundFileDialog();
ErrCode Execute();
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index cbfb9c01a6c0..cbd8088f8e8d 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -927,11 +927,11 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
const SdrGrafObj* pObj = dynamic_cast<const SdrGrafObj*>(rMarkList.GetMark(0)->GetMarkedSdrObj());
if (pObj && pObj->GetGraphicType() == GraphicType::Bitmap)
{
+ vcl::Window* pWin = GetActiveWindow();
GraphicAttr aGraphicAttr = pObj->GetGraphicAttr();
short nState = RET_CANCEL;
if (aGraphicAttr != GraphicAttr()) // the image has been modified
{
- vcl::Window* pWin = GetActiveWindow();
if (pWin)
{
nState = GraphicHelper::HasToSaveTransformedImage(pWin);
@@ -944,12 +944,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (nState == RET_YES)
{
- GraphicHelper::ExportGraphic( pObj->GetTransformedGraphic(), "" );
+ GraphicHelper::ExportGraphic(pWin, pObj->GetTransformedGraphic(), "");
}
else if (nState == RET_NO)
{
GraphicObject aGraphicObject(pObj->GetGraphicObject());
- GraphicHelper::ExportGraphic( aGraphicObject.GetGraphic(), "" );
+ GraphicHelper::ExportGraphic(pWin, aGraphicObject.GetGraphic(), "");
}
}
}
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index 8ad8fba7c44c..fa7e8e03acac 100644
--- a/sfx2/source/appl/fileobj.cxx
+++ b/sfx2/source/appl/fileobj.cxx
@@ -389,7 +389,7 @@ OUString impl_getFilter( const OUString& _rURL )
return sFilter;
}
-void SvFileObject::Edit( vcl::Window* /*pParent*/, sfx2::SvBaseLink* pLink, const Link<const OUString&, void>& rEndEditHdl )
+void SvFileObject::Edit(vcl::Window* pParent, sfx2::SvBaseLink* pLink, const Link<const OUString&, void>& rEndEditHdl)
{
aEndEditLink = rEndEditHdl;
OUString sFile, sRange, sTmpFilter;
@@ -403,7 +403,7 @@ void SvFileObject::Edit( vcl::Window* /*pParent*/, sfx2::SvBaseLink* pLink, cons
{
nType = FILETYPE_GRF; // If not set already
- SvxOpenGraphicDialog aDlg(SfxResId(RID_SVXSTR_EDITGRFLINK));
+ SvxOpenGraphicDialog aDlg(SfxResId(RID_SVXSTR_EDITGRFLINK), pParent);
aDlg.EnableLink(false);
aDlg.SetPath( sFile, true );
aDlg.SetCurrentFilter( sTmpFilter );
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 1634ddd835b9..9b9def09f213 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -536,7 +536,7 @@ FileDialogHelper & SvBaseLink::GetInsertFileDialog(const OUString& rFactory) con
{
pImpl->m_pFileDlg.reset( new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::Insert, rFactory) );
+ FileDialogFlags::Insert, rFactory, SfxFilterFlags::NONE, SfxFilterFlags::NONE, pImpl->m_pParentWin) );
return *pImpl->m_pFileDlg;
}
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 56ff31c2a357..16e0b0de5008 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -54,7 +54,6 @@ using namespace ::com::sun::star::ui::dialogs;
using namespace ::com::sun::star::uno;
using namespace ::cppu;
-
const char* SvxOpenGrfErr2ResId( ErrCode err )
{
if (err == ERRCODE_GRFILTER_OPENERROR)
@@ -69,37 +68,34 @@ const char* SvxOpenGrfErr2ResId( ErrCode err )
return RID_SVXSTR_GRFILTER_FORMATERROR;
}
-
struct SvxOpenGrf_Impl
{
- SvxOpenGrf_Impl ();
+ SvxOpenGrf_Impl(const vcl::Window* pPreferredParent);
sfx2::FileDialogHelper aFileDlg;
uno::Reference < XFilePickerControlAccess > xCtrlAcc;
};
-SvxOpenGrf_Impl::SvxOpenGrf_Impl()
+SvxOpenGrf_Impl::SvxOpenGrf_Impl(const vcl::Window* pPreferredParent)
: aFileDlg(ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- FileDialogFlags::Graphic)
+ FileDialogFlags::Graphic, pPreferredParent)
{
uno::Reference < XFilePicker3 > xFP = aFileDlg.GetFilePicker();
xCtrlAcc.set(xFP, UNO_QUERY);
}
-SvxOpenGraphicDialog::SvxOpenGraphicDialog( const OUString& rTitle ) :
- mpImpl( new SvxOpenGrf_Impl )
+SvxOpenGraphicDialog::SvxOpenGraphicDialog(const OUString& rTitle, const vcl::Window* pPreferredParent)
+ : mpImpl(new SvxOpenGrf_Impl(pPreferredParent))
{
mpImpl->aFileDlg.SetTitle(rTitle);
}
-
SvxOpenGraphicDialog::~SvxOpenGraphicDialog()
{
}
-
ErrCode SvxOpenGraphicDialog::Execute()
{
ErrCode nImpRet;
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 4a0582d03d2e..9bc7812cc35a 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -329,7 +329,7 @@ void ShutdownIcon::StartFileDialog()
if ( !m_pFileDlg )
m_pFileDlg = new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::MultiSelection, OUString() );
+ FileDialogFlags::MultiSelection, OUString(), SfxFilterFlags::NONE, SfxFilterFlags::NONE, nullptr );
m_pFileDlg->StartExecuteModal( LINK( this, ShutdownIcon, DialogClosedHdl_Impl ) );
}
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index a4e05ce41483..45d840854e79 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -2247,9 +2247,10 @@ FileDialogHelper::FileDialogHelper(
FileDialogFlags nFlags,
const OUString& rFact,
SfxFilterFlags nMust,
- SfxFilterFlags nDont )
+ SfxFilterFlags nDont,
+ const vcl::Window* _pPreferredParent)
: m_nError(0),
- mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags ) )
+ mpImpl(new FileDialogHelper_Impl(this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, _pPreferredParent))
{
// create the list of filters
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index a251f8558e09..b7aae374dfcd 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -170,8 +170,8 @@ namespace sfx2
FileDialogHelper* _pAntiImpl,
const short nDialogType,
FileDialogFlags nFlags,
- sal_Int16 nDialog = SFX2_IMPL_DIALOG_CONFIG,
- const vcl::Window* _pPreferredParentWindow = nullptr,
+ sal_Int16 nDialog,
+ const vcl::Window* _pPreferredParentWindow,
const OUString& sStandardDir = OUString(),
const css::uno::Sequence< OUString >& rBlackList = css::uno::Sequence< OUString >()
);
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index e6b2504bfae3..4be520f4d1fc 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -74,10 +74,9 @@ FileDialogFlags lcl_map_mode_to_flags(const sfx2::DocumentInserter::Mode mode)
namespace sfx2 {
-DocumentInserter::DocumentInserter(
- const OUString& rFactory, const Mode mode) :
-
- m_sDocFactory ( rFactory )
+DocumentInserter::DocumentInserter(vcl::Window* pParent, const OUString& rFactory, const Mode mode)
+ : m_xParent ( pParent )
+ , m_sDocFactory ( rFactory )
, m_nDlgFlags ( lcl_map_mode_to_flags(mode) )
, m_nError ( ERRCODE_NONE )
, m_pFileDlg ( nullptr )
@@ -97,7 +96,7 @@ void DocumentInserter::StartExecuteModal( const Link<sfx2::FileDialogHelper*,voi
{
m_pFileDlg.reset( new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- m_nDlgFlags, m_sDocFactory ) );
+ m_nDlgFlags, m_sDocFactory, SfxFilterFlags::NONE, SfxFilterFlags::NONE, m_xParent ) );
}
m_pFileDlg->StartExecuteModal( LINK( this, DocumentInserter, DialogClosedHdl ) );
}
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index f951f000dcf6..fbaaa1b70aa0 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -887,7 +887,7 @@ void SfxTemplateManagerDlg::OnTemplateState (const ThumbnailViewItem *pItem)
void SfxTemplateManagerDlg::OnTemplateImportCategory(const OUString& sCategory)
{
sfx2::FileDialogHelper aFileDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::MultiSelection);
+ FileDialogFlags::MultiSelection, this);
// add "All" filter
aFileDlg.AddFilter( SfxResId(STR_SFX_FILTERNAME_ALL),
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 5da095811a68..7e2cf6c79c62 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1576,7 +1576,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SID_IMPORT_FORMULA:
{
mpImpl->pRequest.reset(new SfxRequest( rReq ));
- mpImpl->pDocInserter.reset(new ::sfx2::DocumentInserter(
+ mpImpl->pDocInserter.reset(new ::sfx2::DocumentInserter(pWin,
GetDoc()->GetFactory().GetFactoryName()));
mpImpl->pDocInserter->StartExecuteModal( LINK( this, SmViewShell, DialogClosedHdl ) );
break;
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index e5f09eda0622..cc1e725c0eb9 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -179,12 +179,12 @@ bool lcl_ExecuteFilterDialog( const Sequence< PropertyValue >& rPropsForDialog,
}
} // anonymous ns
-OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString& rGraphicName )
+OUString GraphicHelper::ExportGraphic(const vcl::Window* pParent, const Graphic& rGraphic, const OUString& rGraphicName)
{
SvtPathOptions aPathOpt;
OUString sGraphicsPath( aPathOpt.GetGraphicPath() );
- FileDialogHelper aDialogHelper( TemplateDescription::FILESAVE_AUTOEXTENSION );
+ FileDialogHelper aDialogHelper(TemplateDescription::FILESAVE_AUTOEXTENSION, FileDialogFlags::NONE, pParent);
Reference < XFilePicker3 > xFilePicker = aDialogHelper.GetFilePicker();
INetURLObject aPath;
@@ -336,7 +336,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString&
return OUString();
}
-void GraphicHelper::SaveShapeAsGraphic( const Reference< drawing::XShape >& xShape )
+void GraphicHelper::SaveShapeAsGraphic(const vcl::Window* pParent, const Reference< drawing::XShape >& xShape)
{
try
{
@@ -346,7 +346,7 @@ void GraphicHelper::SaveShapeAsGraphic( const Reference< drawing::XShape >& xSha
SvtPathOptions aPathOpt;
OUString sGraphicPath( aPathOpt.GetGraphicPath() );
- FileDialogHelper aDialogHelper( TemplateDescription::FILESAVE_AUTOEXTENSION );
+ FileDialogHelper aDialogHelper(TemplateDescription::FILESAVE_AUTOEXTENSION, FileDialogFlags::NONE, pParent);
Reference < XFilePicker3 > xFilePicker = aDialogHelper.GetFilePicker();
aDialogHelper.SetTitle( SvxResId(RID_SVXSTR_SAVEAS_IMAGE) );
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index ecc61ecaf7b8..65a25fc87fe6 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -448,7 +448,8 @@ IMPL_LINK( SvxIMapDlg, TbxClickHdl, ToolBox*, pTbx, void )
void SvxIMapDlg::DoOpen()
{
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
ImageMap aLoadIMap;
const OUString aFilter( IMAP_ALL_FILTER );
@@ -487,7 +488,8 @@ void SvxIMapDlg::DoOpen()
bool SvxIMapDlg::DoSave()
{
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE );
+ css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE,
+ FileDialogFlags::NONE, this);
const OUString aBinFilter( IMAP_BINARY_FILTER );
const OUString aCERNFilter( IMAP_CERN_FILTER );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index da2303afc156..ee6c7b12ed83 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -3376,7 +3376,8 @@ namespace svxform
IMPL_LINK_NOARG(AddInstanceDialog, FilePickerHdl, Button*, void)
{
::sfx2::FileDialogHelper aDlg(
- css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
INetURLObject aFile( SvtPathOptions().GetWorkPath() );
aDlg.AddFilter( m_sAllFilterName, FILEDIALOG_FILTER_ALL );
diff --git a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
index 806866c24c13..eb2980a0b195 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -198,7 +198,7 @@ void AreaPropertyPanelBase::SetTransparency(sal_uInt16 nVal)
IMPL_LINK_NOARG(AreaPropertyPanelBase, ClickImportBitmapHdl, Button*, void)
{
- SvxOpenGraphicDialog aDlg( "Import" );
+ SvxOpenGraphicDialog aDlg("Import", this);
aDlg.EnableLink(false);
if( aDlg.Execute() == ERRCODE_NONE )
{
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx
index 373ca1175215..d6ca22ef5b5c 100644
--- a/sw/inc/dbmgr.hxx
+++ b/sw/inc/dbmgr.hxx
@@ -409,7 +409,7 @@ public:
the filename returned by a file picker and additional settings dialog.
In case of success it returns the registered name, otherwise an empty string.
*/
- static OUString LoadAndRegisterDataSource(SwDocShell* pDocShell = nullptr);
+ static OUString LoadAndRegisterDataSource(const vcl::Window* pParent, SwDocShell* pDocShell = nullptr);
/**
Loads a data source from file and registers it.
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 43a93c135b34..0c07015ec6f6 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -305,7 +305,8 @@ VclPtr<SfxTabPage> SwCharURLPage::Create( vcl::Window* pParent,
IMPL_LINK_NOARG(SwCharURLPage, InsertFileHdl, Button*, void)
{
- FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE );
+ FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
if( aDlgHelper.Execute() == ERRCODE_NONE )
{
Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
diff --git a/sw/source/ui/dbui/addresslistdialog.cxx b/sw/source/ui/dbui/addresslistdialog.cxx
index 96c77cd9edd7..254bf5a1cd68 100644
--- a/sw/source/ui/dbui/addresslistdialog.cxx
+++ b/sw/source/ui/dbui/addresslistdialog.cxx
@@ -345,7 +345,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl, Button*, void)
{
SwView* pView = m_pAddressPage->GetWizard()->GetSwView();
- const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(pView ? pView->GetDocShell() : nullptr);
+ const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(this, pView ? pView->GetDocShell() : nullptr);
if(!sNewSource.isEmpty())
{
SvTreeListEntry* pNewSource = m_pListLB->InsertEntry(sNewSource);
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index 1303d8da3207..ea59468ae7b6 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -623,7 +623,8 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl, Button*, void)
{
if(m_sURL.isEmpty())
{
- sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE );
+ sfx2::FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_SIMPLE,
+ FileDialogFlags::NONE, this);
uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
const OUString sPath( SvtPathOptions().SubstituteVariable("$(userurl)/database") );
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index 4a9184446dbb..e8df54a1838c 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -135,7 +135,8 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, Button*, pButton, void)
if(!bTemplate)
{
- sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE );
+ sfx2::FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
xFP->setDisplayDirectory( SvtPathOptions().GetWorkPath() );
diff --git a/sw/source/ui/dbui/mmresultdialogs.cxx b/sw/source/ui/dbui/mmresultdialogs.cxx
index 1c3f17b4b52a..a53affbf99d2 100644
--- a/sw/source/ui/dbui/mmresultdialogs.cxx
+++ b/sw/source/ui/dbui/mmresultdialogs.cxx
@@ -581,7 +581,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void)
if(m_pSaveAsOneRB->IsChecked())
{
OUString sFilter;
- const OUString sPath = SwMailMergeHelper::CallSaveAsDialog(sFilter);
+ const OUString sPath = SwMailMergeHelper::CallSaveAsDialog(this, sFilter);
if (sPath.isEmpty())
{
// just return back to the dialog
@@ -631,7 +631,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void)
nEnd = documentCount;
}
OUString sFilter;
- OUString sPath = SwMailMergeHelper::CallSaveAsDialog(sFilter);
+ OUString sPath = SwMailMergeHelper::CallSaveAsDialog(this, sFilter);
if (sPath.isEmpty())
{
// just return back to the dialog
diff --git a/sw/source/ui/dialog/uiregionsw.cxx b/sw/source/ui/dialog/uiregionsw.cxx
index 076b69ddf930..5607fb67b061 100644
--- a/sw/source/ui/dialog/uiregionsw.cxx
+++ b/sw/source/ui/dialog/uiregionsw.cxx
@@ -1033,8 +1033,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, FileSearchHdl, Button*, void)
if(!CheckPasswd())
return;
delete m_pDocInserter;
- m_pDocInserter =
- new ::sfx2::DocumentInserter( "swriter" );
+ m_pDocInserter = new ::sfx2::DocumentInserter(this, "swriter");
m_pDocInserter->StartExecuteModal( LINK( this, SwEditRegionDlg, DlgClosedHdl ) );
}
@@ -1752,7 +1751,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void )
IMPL_LINK_NOARG(SwInsertSectionTabPage, FileSearchHdl, Button*, void)
{
delete m_pDocInserter;
- m_pDocInserter = new ::sfx2::DocumentInserter( "swriter" );
+ m_pDocInserter = new ::sfx2::DocumentInserter(this, "swriter");
m_pDocInserter->StartExecuteModal( LINK( this, SwInsertSectionTabPage, DlgClosedHdl ) );
}
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index f2a77592c2db..76d8422f4406 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -522,7 +522,7 @@ bool SwMailMergeDlg::ExecQryShell()
pModOpt->SetNameFromColumn(OUString());
//start save as dialog
OUString sFilter;
- m_sFilename = SwMailMergeHelper::CallSaveAsDialog(sFilter);
+ m_sFilename = SwMailMergeHelper::CallSaveAsDialog(this, sFilter);
if (m_sFilename.isEmpty())
return false;
m_sSaveFilter = sFilter;
diff --git a/sw/source/ui/fldui/changedb.cxx b/sw/source/ui/fldui/changedb.cxx
index 0f95651e139d..acbe41e0fc5e 100644
--- a/sw/source/ui/fldui/changedb.cxx
+++ b/sw/source/ui/fldui/changedb.cxx
@@ -257,7 +257,7 @@ void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData)
IMPL_LINK_NOARG(SwChangeDBDlg, AddDBHdl, Button*, void)
{
- const OUString sNewDB = SwDBManager::LoadAndRegisterDataSource();
+ const OUString sNewDB = SwDBManager::LoadAndRegisterDataSource(this);
if (!sNewDB.isEmpty())
m_pAvailDBTLB->AddDataSource(sNewDB);
}
diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx
index fe37026e3b99..34eae4c72523 100644
--- a/sw/source/ui/fldui/flddb.cxx
+++ b/sw/source/ui/fldui/flddb.cxx
@@ -476,7 +476,7 @@ IMPL_LINK( SwFieldDBPage, TreeSelectHdl, SvTreeListBox *, pBox, void )
IMPL_LINK_NOARG(SwFieldDBPage, AddDBHdl, Button*, void)
{
- OUString sNewDB = SwDBManager::LoadAndRegisterDataSource();
+ OUString sNewDB = SwDBManager::LoadAndRegisterDataSource(this);
if(!sNewDB.isEmpty())
{
m_pDatabaseTLB->AddDataSource(sNewDB);
diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx
index fc1c6a2b98e3..269877ceb3fe 100644
--- a/sw/source/ui/fldui/javaedit.cxx
+++ b/sw/source/ui/fldui/javaedit.cxx
@@ -255,7 +255,7 @@ IMPL_LINK_NOARG( SwJavaEditDialog, InsertFileHdl, Button *, void )
{
pFileDlg = new ::sfx2::FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::Insert, "swriter" );
+ FileDialogFlags::Insert, "swriter", SfxFilterFlags::NONE, SfxFilterFlags::NONE, this);
}
pFileDlg->StartExecuteModal( LINK( this, SwJavaEditDialog, DlgClosedHdl ) );
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index 443adad9e538..9a7bdbad64ba 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -2574,7 +2574,7 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl, Button*, void)
{
pGrfDlg = new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- FileDialogFlags::Graphic );
+ FileDialogFlags::Graphic, this);
pGrfDlg->SetTitle(get<VclFrame>("linkframe")->get_label());
}
pGrfDlg->SetDisplayDirectory( m_pConnectED->GetText() );
@@ -2840,7 +2840,8 @@ VclPtr<SfxTabPage> SwFrameURLPage::Create(vcl::Window *pParent, const SfxItemSet
IMPL_LINK_NOARG(SwFrameURLPage, InsertFileHdl, Button*, void)
{
- FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
uno::Reference < ui::dialogs::XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
try
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index f0d957f99f7d..0cf1e58a0e63 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -92,13 +92,14 @@ using namespace ::sfx2;
static const sal_Unicode aDeliStart = '['; // for the form
static const sal_Unicode aDeliEnd = ']'; // for the form
-static OUString lcl_CreateAutoMarkFileDlg( const OUString& rURL,
- const OUString& rFileString, bool bOpen )
+static OUString lcl_CreateAutoMarkFileDlg(const vcl::Window* pParent, const OUString& rURL,
+ const OUString& rFileString, bool bOpen)
{
OUString sRet;
FileDialogHelper aDlgHelper( bOpen ?
- TemplateDescription::FILEOPEN_SIMPLE : TemplateDescription::FILESAVE_AUTOEXTENSION );
+ TemplateDescription::FILEOPEN_SIMPLE : TemplateDescription::FILESAVE_AUTOEXTENSION,
+ FileDialogFlags::NONE, pParent);
uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
@@ -1489,7 +1490,7 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, pMenu, bool)
if (sIdent == "open")
{
- sAutoMarkURL = lcl_CreateAutoMarkFileDlg(
+ sAutoMarkURL = lcl_CreateAutoMarkFileDlg(this,
sAutoMarkURL, sAutoMarkType, true);
}
else if ((sIdent == "new") || (sIdent == "edit"))
@@ -1497,7 +1498,7 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, pMenu, bool)
bool bNew = (sIdent == "new");
if (bNew)
{
- sAutoMarkURL = lcl_CreateAutoMarkFileDlg(
+ sAutoMarkURL = lcl_CreateAutoMarkFileDlg(this,
sAutoMarkURL, sAutoMarkType, false);
if( sAutoMarkURL.isEmpty() )
return false;
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 3fc4a6c093c0..8b6d9a04693f 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -555,7 +555,8 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
else if (sItemIdent == "import")
{
// call the FileOpenDialog do find WinWord - Files with templates
- FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE );
+ FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, this);
uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
SvtPathOptions aPathOpt;
diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx
index 88ddfca433c1..dbcb99cb4bfc 100644
--- a/sw/source/uibase/app/docsh2.cxx
+++ b/sw/source/uibase/app/docsh2.cxx
@@ -503,7 +503,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
nRet = pNewFileDlg->Execute();
if(RET_TEMPLATE_LOAD == nRet)
{
- FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE );
+ FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE,
+ FileDialogFlags::NONE, &GetView()->GetViewFrame()->GetWindow());
uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
xFP->setDisplayDirectory( aPathOpt.GetWorkPath() );
@@ -615,7 +616,9 @@ void SwDocShell::Execute(SfxRequest& rReq)
}
if(!bLocalHasName)
{
- FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION );
+ FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_AUTOEXTENSION,
+ FileDialogFlags::NONE,
+ &GetView()->GetViewFrame()->GetWindow());
aDlgHelper.AddFilter( pHtmlFlt->GetFilterName(), pHtmlFlt->GetDefaultExtension() );
aDlgHelper.SetCurrentFilter( pHtmlFlt->GetFilterName() );
if( ERRCODE_NONE != aDlgHelper.Execute())
@@ -874,7 +877,8 @@ void SwDocShell::Execute(SfxRequest& rReq)
{
bool bError = false;
- FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE );
+ FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE, FileDialogFlags::NONE,
+ &GetView()->GetViewFrame()->GetWindow());
const sal_Int16 nControlIds[] = {
CommonFilePickerElementIds::PUSHBUTTON_OK,
diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx
index 6cac7eb100a6..12e91f75b047 100644
--- a/sw/source/uibase/dbui/dbmgr.cxx
+++ b/sw/source/uibase/dbui/dbmgr.cxx
@@ -2557,9 +2557,9 @@ uno::Sequence<OUString> SwDBManager::GetExistingDatabaseNames()
return xDBContext->getElementNames();
}
-OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell)
+OUString SwDBManager::LoadAndRegisterDataSource(const vcl::Window* pParent, SwDocShell* pDocShell)
{
- sfx2::FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE );
+ sfx2::FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, pParent);
uno::Reference < ui::dialogs::XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
OUString sHomePath(SvtPathOptions().GetWorkPath());
diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx
index 2e3d9b25ed0d..37081794c21b 100644
--- a/sw/source/uibase/dbui/mailmergehelper.cxx
+++ b/sw/source/uibase/dbui/mailmergehelper.cxx
@@ -53,11 +53,11 @@ using namespace ::com::sun::star::sdbcx;
namespace SwMailMergeHelper
{
-OUString CallSaveAsDialog(OUString& rFilter)
+OUString CallSaveAsDialog(const vcl::Window* pParent, OUString& rFilter)
{
::sfx2::FileDialogHelper aDialog( ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
FileDialogFlags::NONE,
- SwDocShell::Factory().GetFactoryName() );
+ SwDocShell::Factory().GetFactoryName(), SfxFilterFlags::NONE, SfxFilterFlags::NONE, pParent);
if (aDialog.Execute()!=ERRCODE_NONE)
{
diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx
index ae242fd7586e..514b28ecb9fa 100644
--- a/sw/source/uibase/docvw/romenu.cxx
+++ b/sw/source/uibase/docvw/romenu.cxx
@@ -353,7 +353,7 @@ void SwReadOnlyPopup::Execute( vcl::Window* pWin, sal_uInt16 nId )
if( pClipCntnr && pClipCntnr->HasAnyData() )
{
- pClipCntnr->CopyToClipboard( pWin );
+ pClipCntnr->CopyToClipboard( pWin );
}
}
@@ -374,7 +374,7 @@ OUString SwReadOnlyPopup::SaveGraphic(sal_uInt16 nId)
else
return OUString();
}
- return GraphicHelper::ExportGraphic( aGraphic, sGrfName );
+ return GraphicHelper::ExportGraphic(rView.GetWindow(), aGraphic, sGrfName);
}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/sw/source/uibase/inc/mailmergehelper.hxx b/sw/source/uibase/inc/mailmergehelper.hxx
index 616e02fe4909..6037d32cf3c2 100644
--- a/sw/source/uibase/inc/mailmergehelper.hxx
+++ b/sw/source/uibase/inc/mailmergehelper.hxx
@@ -42,7 +42,7 @@ namespace com { namespace sun { namespace star { namespace mail {
namespace SwMailMergeHelper
{
- SW_DLLPUBLIC OUString CallSaveAsDialog(OUString& rFilter);
+ SW_DLLPUBLIC OUString CallSaveAsDialog(const vcl::Window* pParent, OUString& rFilter);
SW_DLLPUBLIC bool CheckMailAddress(const OUString& rMailAddress);
SW_DLLPUBLIC css::uno::Reference<css::mail::XSmtpService> ConnectToSmtpServer(
SwMailMergeConfigItem const & rConfigItem,
diff --git a/sw/source/uibase/shells/drawsh.cxx b/sw/source/uibase/shells/drawsh.cxx
index b73a4f3e1ded..f2d3a461a8ca 100644
--- a/sw/source/uibase/shells/drawsh.cxx
+++ b/sw/source/uibase/shells/drawsh.cxx
@@ -123,9 +123,9 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject)
if(pSdrView)
{
- SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC));
+ SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC), &GetView().GetViewFrame()->GetWindow());
- if(ERRCODE_NONE == aDlg.Execute())
+ if (ERRCODE_NONE == aDlg.Execute())
{
Graphic aGraphic;
ErrCode nError = aDlg.GetGraphic(aGraphic);
diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx
index adcbaaf07f14..3e3e1bafa821 100644
--- a/sw/source/uibase/shells/grfsh.cxx
+++ b/sw/source/uibase/shells/grfsh.cxx
@@ -157,7 +157,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
OUString sGrfNm;
OUString sFilterNm;
rSh.GetGrfNms( &sGrfNm, &sFilterNm );
- GraphicHelper::ExportGraphic( aGraphic, sGrfNm );
+ GraphicHelper::ExportGraphic(&GetView().GetViewFrame()->GetWindow(), aGraphic, sGrfNm);
}
}
else if (nState == RET_NO)
@@ -168,7 +168,7 @@ void SwGrfShell::Execute(SfxRequest &rReq)
OUString sGrfNm;
OUString sFilterNm;
rSh.GetGrfNms( &sGrfNm, &sFilterNm );
- GraphicHelper::ExportGraphic( *pGraphic, sGrfNm );
+ GraphicHelper::ExportGraphic(&GetView().GetViewFrame()->GetWindow(), *pGraphic, sGrfNm);
}
}
}
diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx
index 3147acf9e962..678c08b4c89d 100644
--- a/sw/source/uibase/uiview/srcview.cxx
+++ b/sw/source/uibase/uiview/srcview.cxx
@@ -292,7 +292,8 @@ void SwSrcView::Execute(SfxRequest& rReq)
SvtPathOptions aPathOpt;
// filesave dialog with autoextension
FileDialogHelper aDlgHelper(
- TemplateDescription::FILESAVE_AUTOEXTENSION );
+ TemplateDescription::FILESAVE_AUTOEXTENSION,
+ FileDialogFlags::NONE, aEditWin);
uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker();
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
diff --git a/sw/source/uibase/uiview/uivwimp.cxx b/sw/source/uibase/uiview/uivwimp.cxx
index df09349063b0..939dbc01513b 100644
--- a/sw/source/uibase/uiview/uivwimp.cxx
+++ b/sw/source/uibase/uiview/uivwimp.cxx
@@ -261,7 +261,7 @@ void SwView_Impl::StartDocumentInserter(
}
delete m_pDocInserter;
- m_pDocInserter = new ::sfx2::DocumentInserter( rFactory, mode );
+ m_pDocInserter = new ::sfx2::DocumentInserter(pView->GetWindow(), rFactory, mode);
m_pDocInserter->StartExecuteModal( rEndDialogHdl );
}
diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx
index 371e645bddcc..110ba9ab0b61 100644
--- a/sw/source/uibase/utlui/glbltree.cxx
+++ b/sw/source/uibase/utlui/glbltree.cxx
@@ -742,7 +742,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const OUString*
if ( !pFileName )
{
delete m_pDocInserter;
- m_pDocInserter = new ::sfx2::DocumentInserter( "swriter", sfx2::DocumentInserter::Mode::InsertMulti );
+ m_pDocInserter = new ::sfx2::DocumentInserter(this, "swriter", sfx2::DocumentInserter::Mode::InsertMulti);
m_pDocInserter->StartExecuteModal( LINK( this, SwGlobalTree, DialogClosedHdl ) );
}
else if ( !pFileName->isEmpty() )