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 /sw | |
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 'sw')
24 files changed, 49 insertions, 39 deletions
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() ) |