diff options
Diffstat (limited to 'sw')
26 files changed, 41 insertions, 49 deletions
diff --git a/sw/inc/dbmgr.hxx b/sw/inc/dbmgr.hxx index 4a8c40e8903f..2f4ee8735cd5 100644 --- a/sw/inc/dbmgr.hxx +++ b/sw/inc/dbmgr.hxx @@ -68,7 +68,7 @@ struct SwDBFormatData css::lang::Locale aLocale; }; -namespace vcl { +namespace weld { class Window; } @@ -402,7 +402,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(const vcl::Window* pParent, SwDocShell* pDocShell = nullptr); + static OUString LoadAndRegisterDataSource(weld::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 6563cd0ed56a..c0c70d3743cc 100644 --- a/sw/source/ui/chrdlg/chardlg.cxx +++ b/sw/source/ui/chrdlg/chardlg.cxx @@ -304,7 +304,7 @@ VclPtr<SfxTabPage> SwCharURLPage::Create( vcl::Window* pParent, IMPL_LINK_NOARG(SwCharURLPage, InsertFileHdl, Button*, void) { FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE, - FileDialogFlags::NONE, this); + FileDialogFlags::NONE, GetFrameWeld()); 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 abd64165f2f0..3fa3c3a262c8 100644 --- a/sw/source/ui/dbui/addresslistdialog.cxx +++ b/sw/source/ui/dbui/addresslistdialog.cxx @@ -343,7 +343,7 @@ IMPL_LINK_NOARG(SwAddressListDialog, LoadHdl_Impl, Button*, void) { SwView* pView = m_pAddressPage->GetWizard()->GetSwView(); - const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(this, pView ? pView->GetDocShell() : nullptr); + const OUString sNewSource = SwDBManager::LoadAndRegisterDataSource(GetFrameWeld(), 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 5b1bf9df0145..b0dcf5962536 100644 --- a/sw/source/ui/dbui/createaddresslistdialog.cxx +++ b/sw/source/ui/dbui/createaddresslistdialog.cxx @@ -622,7 +622,7 @@ IMPL_LINK_NOARG(SwCreateAddressListDialog, OkHdl_Impl, Button*, void) if(m_sURL.isEmpty()) { sfx2::FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_SIMPLE, - FileDialogFlags::NONE, this); + FileDialogFlags::NONE, GetFrameWeld()); 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 0a80fe3852cf..2ea8679dd9e4 100644 --- a/sw/source/ui/dbui/mmdocselectpage.cxx +++ b/sw/source/ui/dbui/mmdocselectpage.cxx @@ -135,7 +135,7 @@ IMPL_LINK(SwMailMergeDocSelectPage, FileSelectHdl, Button*, pButton, void) if(!bTemplate) { sfx2::FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE, - FileDialogFlags::NONE, this); + FileDialogFlags::NONE, GetFrameWeld()); 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 fa5ea301551f..38d4e03aa2dc 100644 --- a/sw/source/ui/dbui/mmresultdialogs.cxx +++ b/sw/source/ui/dbui/mmresultdialogs.cxx @@ -579,7 +579,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void) if(m_pSaveAsOneRB->IsChecked()) { OUString sFilter; - const OUString sPath = SwMailMergeHelper::CallSaveAsDialog(this, sFilter); + const OUString sPath = SwMailMergeHelper::CallSaveAsDialog(GetFrameWeld(), sFilter); if (sPath.isEmpty()) { // just return back to the dialog @@ -629,7 +629,7 @@ IMPL_LINK(SwMMResultSaveDialog, SaveOutputHdl_Impl, Button*, pButton, void) nEnd = documentCount; } OUString sFilter; - OUString sPath = SwMailMergeHelper::CallSaveAsDialog(this, sFilter); + OUString sPath = SwMailMergeHelper::CallSaveAsDialog(GetFrameWeld(), 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 64988bc9ca17..81765b9cdd01 100644 --- a/sw/source/ui/dialog/uiregionsw.cxx +++ b/sw/source/ui/dialog/uiregionsw.cxx @@ -1040,7 +1040,7 @@ IMPL_LINK_NOARG(SwEditRegionDlg, FileSearchHdl, Button*, void) if(!CheckPasswd()) return; delete m_pDocInserter; - m_pDocInserter = new ::sfx2::DocumentInserter(this, "swriter"); + m_pDocInserter = new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter"); m_pDocInserter->StartExecuteModal( LINK( this, SwEditRegionDlg, DlgClosedHdl ) ); } @@ -1770,7 +1770,7 @@ IMPL_LINK( SwInsertSectionTabPage, UseFileHdl, Button *, pButton, void ) IMPL_LINK_NOARG(SwInsertSectionTabPage, FileSearchHdl, Button*, void) { delete m_pDocInserter; - m_pDocInserter = new ::sfx2::DocumentInserter(this, "swriter"); + m_pDocInserter = new ::sfx2::DocumentInserter(GetFrameWeld(), "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 e674709e2092..c83bdf3b01d4 100644 --- a/sw/source/ui/envelp/mailmrge.cxx +++ b/sw/source/ui/envelp/mailmrge.cxx @@ -520,7 +520,7 @@ bool SwMailMergeDlg::ExecQryShell() pModOpt->SetNameFromColumn(OUString()); //start save as dialog OUString sFilter; - m_sFilename = SwMailMergeHelper::CallSaveAsDialog(this, sFilter); + m_sFilename = SwMailMergeHelper::CallSaveAsDialog(GetFrameWeld(), 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 fb86ec11d24e..d6eefe4b4cd6 100644 --- a/sw/source/ui/fldui/changedb.cxx +++ b/sw/source/ui/fldui/changedb.cxx @@ -256,7 +256,7 @@ void SwChangeDBDlg::ShowDBName(const SwDBData& rDBData) IMPL_LINK_NOARG(SwChangeDBDlg, AddDBHdl, Button*, void) { - const OUString sNewDB = SwDBManager::LoadAndRegisterDataSource(this); + const OUString sNewDB = SwDBManager::LoadAndRegisterDataSource(GetFrameWeld()); if (!sNewDB.isEmpty()) m_pAvailDBTLB->AddDataSource(sNewDB); } diff --git a/sw/source/ui/fldui/flddb.cxx b/sw/source/ui/fldui/flddb.cxx index fe699d92475a..681e6b800086 100644 --- a/sw/source/ui/fldui/flddb.cxx +++ b/sw/source/ui/fldui/flddb.cxx @@ -477,7 +477,7 @@ IMPL_LINK( SwFieldDBPage, TreeSelectHdl, SvTreeListBox *, pBox, void ) IMPL_LINK_NOARG(SwFieldDBPage, AddDBHdl, Button*, void) { - OUString sNewDB = SwDBManager::LoadAndRegisterDataSource(this); + OUString sNewDB = SwDBManager::LoadAndRegisterDataSource(GetFrameWeld()); if(!sNewDB.isEmpty()) { m_pDatabaseTLB->AddDataSource(sNewDB); diff --git a/sw/source/ui/fldui/javaedit.cxx b/sw/source/ui/fldui/javaedit.cxx index fc5df961b9be..847e1217ee92 100644 --- a/sw/source/ui/fldui/javaedit.cxx +++ b/sw/source/ui/fldui/javaedit.cxx @@ -254,7 +254,7 @@ IMPL_LINK_NOARG( SwJavaEditDialog, InsertFileHdl, Button *, void ) { pFileDlg = new ::sfx2::FileDialogHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, - FileDialogFlags::Insert, "swriter", SfxFilterFlags::NONE, SfxFilterFlags::NONE, this); + FileDialogFlags::Insert, "swriter", SfxFilterFlags::NONE, SfxFilterFlags::NONE, GetFrameWeld()); } pFileDlg->StartExecuteModal( LINK( this, SwJavaEditDialog, DlgClosedHdl ) ); diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx index 7f8a428ef4dc..2fcbde2a34b2 100644 --- a/sw/source/ui/frmdlg/frmpage.cxx +++ b/sw/source/ui/frmdlg/frmpage.cxx @@ -2605,7 +2605,7 @@ IMPL_LINK_NOARG(SwGrfExtPage, BrowseHdl, Button*, void) { pGrfDlg = new FileDialogHelper( ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW, - FileDialogFlags::Graphic, this); + FileDialogFlags::Graphic, GetFrameWeld()); pGrfDlg->SetTitle(get<VclFrame>("linkframe")->get_label()); } pGrfDlg->SetDisplayDirectory( m_pConnectED->GetText() ); @@ -2874,7 +2874,7 @@ VclPtr<SfxTabPage> SwFrameURLPage::Create(vcl::Window *pParent, const SfxItemSet IMPL_LINK_NOARG(SwFrameURLPage, InsertFileHdl, Button*, void) { FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, - FileDialogFlags::NONE, this); + FileDialogFlags::NONE, GetFrameWeld()); 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 e3aef8c719e9..c18a49ec2a82 100644 --- a/sw/source/ui/index/cnttab.cxx +++ b/sw/source/ui/index/cnttab.cxx @@ -91,7 +91,7 @@ using namespace ::sfx2; static const sal_Unicode aDeliStart = '['; // for the form static const sal_Unicode aDeliEnd = ']'; // for the form -static OUString lcl_CreateAutoMarkFileDlg(const vcl::Window* pParent, const OUString& rURL, +static OUString lcl_CreateAutoMarkFileDlg(weld::Window* pParent, const OUString& rURL, const OUString& rFileString, bool bOpen) { OUString sRet; @@ -1492,7 +1492,7 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, pMenu, bool) if (sIdent == "open") { - sAutoMarkURL = lcl_CreateAutoMarkFileDlg(this, + sAutoMarkURL = lcl_CreateAutoMarkFileDlg(GetFrameWeld(), sAutoMarkURL, sAutoMarkType, true); } else if ((sIdent == "new") || (sIdent == "edit")) @@ -1500,7 +1500,7 @@ IMPL_LINK(SwTOXSelectTabPage, MenuExecuteHdl, Menu*, pMenu, bool) bool bNew = (sIdent == "new"); if (bNew) { - sAutoMarkURL = lcl_CreateAutoMarkFileDlg(this, + sAutoMarkURL = lcl_CreateAutoMarkFileDlg(GetFrameWeld(), 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 2d8dcf52cd42..b38de3134e14 100644 --- a/sw/source/ui/misc/glossary.cxx +++ b/sw/source/ui/misc/glossary.cxx @@ -559,7 +559,7 @@ IMPL_LINK( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool ) { // call the FileOpenDialog do find WinWord - Files with templates FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE, - FileDialogFlags::NONE, this); + FileDialogFlags::NONE, GetFrameWeld()); 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 472c68a584eb..7f7df1db893e 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -509,7 +509,7 @@ void SwDocShell::Execute(SfxRequest& rReq) if(RET_TEMPLATE_LOAD == nRet) { FileDialogHelper aDlgHelper(TemplateDescription::FILEOPEN_SIMPLE, - FileDialogFlags::NONE, &GetView()->GetViewFrame()->GetWindow()); + FileDialogFlags::NONE, GetView()->GetViewFrame()->GetWindow().GetFrameWeld()); uno::Reference < XFilePicker3 > xFP = aDlgHelper.GetFilePicker(); xFP->setDisplayDirectory( aPathOpt.GetWorkPath() ); @@ -622,7 +622,7 @@ void SwDocShell::Execute(SfxRequest& rReq) { FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_AUTOEXTENSION, FileDialogFlags::NONE, - &GetView()->GetViewFrame()->GetWindow()); + GetView()->GetViewFrame()->GetWindow().GetFrameWeld()); aDlgHelper.AddFilter( pHtmlFlt->GetFilterName(), pHtmlFlt->GetDefaultExtension() ); aDlgHelper.SetCurrentFilter( pHtmlFlt->GetFilterName() ); if( ERRCODE_NONE != aDlgHelper.Execute()) @@ -882,7 +882,7 @@ void SwDocShell::Execute(SfxRequest& rReq) bool bError = false; FileDialogHelper aDlgHelper(TemplateDescription::FILESAVE_AUTOEXTENSION_TEMPLATE, FileDialogFlags::NONE, - &GetView()->GetViewFrame()->GetWindow()); + GetView()->GetViewFrame()->GetWindow().GetFrameWeld()); const sal_Int16 nControlIds[] = { CommonFilePickerElementIds::PUSHBUTTON_OK, diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index ff6bf6a16b2b..31925ff0ce64 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -2832,7 +2832,7 @@ OUString ConstructVndSunStarPkgUrl(const OUString& rMainURL, const OUString& rSt } } -OUString SwDBManager::LoadAndRegisterDataSource(const vcl::Window* pParent, SwDocShell* pDocShell) +OUString SwDBManager::LoadAndRegisterDataSource(weld::Window* pParent, SwDocShell* pDocShell) { sfx2::FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, pParent); uno::Reference < ui::dialogs::XFilePicker3 > xFP = aDlgHelper.GetFilePicker(); diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index f42ace586ebb..7345797b1d67 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -52,7 +52,7 @@ using namespace ::com::sun::star::sdbcx; namespace SwMailMergeHelper { -OUString CallSaveAsDialog(const vcl::Window* pParent, OUString& rFilter) +OUString CallSaveAsDialog(weld::Window* pParent, OUString& rFilter) { ::sfx2::FileDialogHelper aDialog( ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, FileDialogFlags::NONE, diff --git a/sw/source/uibase/docvw/romenu.cxx b/sw/source/uibase/docvw/romenu.cxx index 0a1e8f5b5345..d38fc606b38f 100644 --- a/sw/source/uibase/docvw/romenu.cxx +++ b/sw/source/uibase/docvw/romenu.cxx @@ -373,7 +373,7 @@ OUString SwReadOnlyPopup::SaveGraphic(sal_uInt16 nId) else return OUString(); } - return GraphicHelper::ExportGraphic(m_rView.GetWindow(), m_aGraphic, m_sGrfName); + return GraphicHelper::ExportGraphic(m_rView.GetFrameWeld(), m_aGraphic, m_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 053f409fc921..a627dc590d6d 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(const vcl::Window* pParent, OUString& rFilter); + SW_DLLPUBLIC OUString CallSaveAsDialog(weld::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 d3876b4efc58..2f84dc2fed6c 100644 --- a/sw/source/uibase/shells/drawsh.cxx +++ b/sw/source/uibase/shells/drawsh.cxx @@ -122,7 +122,7 @@ void SwDrawShell::InsertPictureFromFile(SdrObject& rObject) if(pSdrView) { - SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC), &GetView().GetViewFrame()->GetWindow()); + SvxOpenGraphicDialog aDlg(SwResId(STR_INSERT_GRAPHIC), GetView().GetViewFrame()->GetWindow().GetFrameWeld()); if (ERRCODE_NONE == aDlg.Execute()) { diff --git a/sw/source/uibase/shells/grfsh.cxx b/sw/source/uibase/shells/grfsh.cxx index a91688561fb4..b4b460cc4c82 100644 --- a/sw/source/uibase/shells/grfsh.cxx +++ b/sw/source/uibase/shells/grfsh.cxx @@ -177,7 +177,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) OUString sGrfNm; OUString sFilterNm; rSh.GetGrfNms( &sGrfNm, &sFilterNm ); - GraphicHelper::ExportGraphic(&GetView().GetViewFrame()->GetWindow(), aGraphic, sGrfNm); + GraphicHelper::ExportGraphic(GetView().GetViewFrame()->GetWindow().GetFrameWeld(), aGraphic, sGrfNm); } } else if (nState == RET_NO) @@ -188,7 +188,7 @@ void SwGrfShell::Execute(SfxRequest &rReq) OUString sGrfNm; OUString sFilterNm; rSh.GetGrfNms( &sGrfNm, &sFilterNm ); - GraphicHelper::ExportGraphic(&GetView().GetViewFrame()->GetWindow(), *pGraphic, sGrfNm); + GraphicHelper::ExportGraphic(GetView().GetViewFrame()->GetWindow().GetFrameWeld(), *pGraphic, sGrfNm); } } } diff --git a/sw/source/uibase/shells/grfshex.cxx b/sw/source/uibase/shells/grfshex.cxx index 7b2562b0ee99..6536cf576d97 100644 --- a/sw/source/uibase/shells/grfshex.cxx +++ b/sw/source/uibase/shells/grfshex.cxx @@ -60,7 +60,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) { OUString aURL; const SfxItemSet* pReqArgs = rReq.GetArgs(); - vcl::Window* pWindow = &GetView().GetViewFrame()->GetWindow(); + vcl::Window& rWindow = GetView().GetViewFrame()->GetWindow(); bool bAPI = false, bRet = false; if( pReqArgs ) @@ -74,20 +74,18 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) } bool bLink(true); - if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(pWindow, aURL, & bLink)) + if (bAPI || ::avmedia::MediaWindow::executeMediaURLDialog(rWindow.GetFrameWeld(), aURL, & bLink)) { Size aPrefSize; - if( pWindow ) - pWindow->EnterWait(); + rWindow.EnterWait(); if( !::avmedia::MediaWindow::isMediaURL( aURL, "", true, &aPrefSize ) ) { - if( pWindow ) - pWindow->LeaveWait(); + rWindow.LeaveWait(); if( !bAPI ) - ::avmedia::MediaWindow::executeFormatErrorBox(pWindow ? pWindow->GetFrameWeld() : nullptr); + ::avmedia::MediaWindow::executeFormatErrorBox(rWindow.GetFrameWeld()); } else { @@ -108,12 +106,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) aPos.setY( aDocSz.Height() / 2 + rVisArea.Top() ); if( aPrefSize.Width() && aPrefSize.Height() ) - { - if( pWindow ) - aSize = pWindow->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); - else - aSize = Application::GetDefaultDevice()->PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); - } + aSize = rWindow.PixelToLogic(aPrefSize, MapMode(MapUnit::MapTwip)); else aSize = Size( 2835, 2835 ); @@ -138,8 +131,7 @@ bool SwTextShell::InsertMediaDlg( SfxRequest const & rReq ) rSh.SwFEShell::InsertDrawObj( *pObj, aPos ); bRet = true; - if( pWindow ) - pWindow->LeaveWait(); + rWindow.LeaveWait(); } } diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 5e263e45f808..84a3dd598a72 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -291,7 +291,7 @@ void SwSrcView::Execute(SfxRequest& rReq) // filesave dialog with autoextension FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION, - FileDialogFlags::NONE, aEditWin); + FileDialogFlags::NONE, aEditWin->GetFrameWeld()); 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 4a3678340125..70d688111a4b 100644 --- a/sw/source/uibase/uiview/uivwimp.cxx +++ b/sw/source/uibase/uiview/uivwimp.cxx @@ -262,7 +262,7 @@ void SwView_Impl::StartDocumentInserter( } delete m_pDocInserter; - m_pDocInserter = new ::sfx2::DocumentInserter(pView->GetWindow(), rFactory, mode); + m_pDocInserter = new ::sfx2::DocumentInserter(pView->GetFrameWeld(), rFactory, mode); m_pDocInserter->StartExecuteModal( rEndDialogHdl ); } diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index 8e5f4c376d64..713e369d7148 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -287,7 +287,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) // when in HTML mode insert only as a link std::unique_ptr<FileDialogHelper> pFileDlg(new FileDialogHelper( ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_TEMPLATE, - FileDialogFlags::Graphic, GetWindow())); + FileDialogFlags::Graphic, GetFrameWeld())); pFileDlg->SetTitle(SwResId(STR_INSERT_GRAPHIC )); pFileDlg->SetContext( FileDialogHelper::SW_INSERT_GRAPHIC ); uno::Reference < XFilePicker3 > xFP = pFileDlg->GetFilePicker(); diff --git a/sw/source/uibase/utlui/glbltree.cxx b/sw/source/uibase/utlui/glbltree.cxx index 8c15eb15d787..65d78987406b 100644 --- a/sw/source/uibase/utlui/glbltree.cxx +++ b/sw/source/uibase/utlui/glbltree.cxx @@ -741,7 +741,7 @@ void SwGlobalTree::InsertRegion( const SwGlblDocContent* pCont, const OUString* if ( !pFileName ) { delete m_pDocInserter; - m_pDocInserter = new ::sfx2::DocumentInserter(this, "swriter", sfx2::DocumentInserter::Mode::InsertMulti); + m_pDocInserter = new ::sfx2::DocumentInserter(GetFrameWeld(), "swriter", sfx2::DocumentInserter::Mode::InsertMulti); m_pDocInserter->StartExecuteModal( LINK( this, SwGlobalTree, DialogClosedHdl ) ); } else if ( !pFileName->isEmpty() ) |