summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2018-04-04 14:33:16 +0100
committerCaolán McNamara <caolanm@redhat.com>2018-04-06 16:48:12 +0200
commit8ed2fb306ffa8c7fef336b858fc5074c309c3c9f (patch)
tree8699322ccfd3bfef66af56437bb9dabfa249a719
parent79ae6cc6b3b19252473f6987106ea7d8aa17a5ea (diff)
weld linkeditdialog
which enables changing FileDialogHelper over to welded Change-Id: I988342a6574cb7ed09b2724929e8c7117474a56c Reviewed-on: https://gerrit.libreoffice.org/52388 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--avmedia/source/framework/mediacontrol.cxx2
-rw-r--r--avmedia/source/viewer/mediawindow.cxx4
-rw-r--r--basctl/source/basicide/moduldl2.cxx4
-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/hldoctp.cxx2
-rw-r--r--cui/source/dialogs/linkdlg.cxx2
-rw-r--r--cui/source/options/doclinkdialog.cxx2
-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.cxx4
-rw-r--r--cui/source/tabpages/tpbitmap.cxx2
-rw-r--r--cui/source/tabpages/tpline.cxx2
-rw-r--r--cui/source/tabpages/tplnedef.cxx4
-rw-r--r--cui/source/tabpages/tplneend.cxx4
-rw-r--r--dbaccess/source/ui/app/AppController.cxx2
-rw-r--r--dbaccess/source/ui/dlg/ConnectionHelper.cxx12
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx2
-rw-r--r--dbaccess/source/ui/dlg/generalpage.cxx2
-rw-r--r--desktop/source/deployment/gui/dp_gui_dialog2.cxx2
-rw-r--r--extensions/source/dbpilots/commonpagesdbp.cxx2
-rw-r--r--extensions/source/propctrlr/formcomponenthandler.cxx9
-rw-r--r--filter/source/xsltdialog/xmlfiltersettingsdialog.cxx4
-rw-r--r--filter/source/xsltdialog/xmlfiltertabpagexslt.cxx2
-rw-r--r--filter/source/xsltdialog/xmlfiltertestdialog.cxx4
-rw-r--r--forms/source/component/ImageControl.cxx3
-rw-r--r--forms/source/richtext/richtextvclcontrol.cxx2
-rw-r--r--include/avmedia/mediawindow.hxx7
-rw-r--r--include/sfx2/docinsert.hxx5
-rw-r--r--include/sfx2/filedlghelper.hxx21
-rw-r--r--include/sfx2/linksrc.hxx4
-rw-r--r--include/sfx2/lnkbase.hxx2
-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/inc/arealink.hxx2
-rw-r--r--sc/inc/externalrefmgr.hxx2
-rw-r--r--sc/inc/tablink.hxx2
-rw-r--r--sc/source/ui/docshell/arealink.cxx5
-rw-r--r--sc/source/ui/docshell/docsh4.cxx2
-rw-r--r--sc/source/ui/docshell/externalrefmgr.cxx2
-rw-r--r--sc/source/ui/docshell/tablink.cxx2
-rw-r--r--sc/source/ui/drawfunc/chartsh.cxx2
-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/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.cxx2
-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.cxx3
-rw-r--r--sd/source/ui/dlg/filedlg.cxx14
-rw-r--r--sd/source/ui/dlg/tpaction.cxx4
-rw-r--r--sd/source/ui/func/fuinsert.cxx4
-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/inc/fupage.hxx2
-rw-r--r--sd/source/ui/view/drviews2.cxx5
-rw-r--r--sfx2/source/appl/appopen.cxx4
-rw-r--r--sfx2/source/appl/fileobj.cxx2
-rw-r--r--sfx2/source/appl/fileobj.hxx2
-rw-r--r--sfx2/source/appl/impldde.cxx82
-rw-r--r--sfx2/source/appl/impldde.hxx2
-rw-r--r--sfx2/source/appl/linksrc.cxx2
-rw-r--r--sfx2/source/appl/lnkbase2.cxx6
-rw-r--r--sfx2/source/appl/opengrf.cxx8
-rw-r--r--sfx2/source/appl/shutdownicon.cxx2
-rw-r--r--sfx2/source/dialog/filedlghelper.cxx45
-rw-r--r--sfx2/source/dialog/filedlgimpl.hxx12
-rw-r--r--sfx2/source/doc/docinsert.cxx8
-rw-r--r--sfx2/source/doc/guisaveas.cxx9
-rw-r--r--sfx2/source/doc/templatedlg.cxx2
-rw-r--r--sfx2/uiconfig/ui/linkeditdialog.ui5
-rw-r--r--starmath/source/view.cxx2
-rw-r--r--svx/source/core/graphichelper.cxx4
-rw-r--r--svx/source/dialog/imapdlg.cxx4
-rw-r--r--svx/source/form/databaselocationinput.cxx2
-rw-r--r--svx/source/form/datanavi.cxx2
-rw-r--r--svx/source/sidebar/area/AreaPropertyPanelBase.cxx2
-rw-r--r--sw/inc/dbmgr.hxx4
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx2
-rw-r--r--sw/source/ui/dbui/addresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx2
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx2
-rw-r--r--sw/source/ui/dbui/mmresultdialogs.cxx4
-rw-r--r--sw/source/ui/dialog/uiregionsw.cxx4
-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.cxx4
-rw-r--r--sw/source/ui/index/cnttab.cxx6
-rw-r--r--sw/source/ui/misc/glossary.cxx2
-rw-r--r--sw/source/uibase/app/docsh2.cxx6
-rw-r--r--sw/source/uibase/dbui/dbmgr.cxx2
-rw-r--r--sw/source/uibase/dbui/mailmergehelper.cxx2
-rw-r--r--sw/source/uibase/docvw/romenu.cxx2
-rw-r--r--sw/source/uibase/inc/mailmergehelper.hxx2
-rw-r--r--sw/source/uibase/shells/drawsh.cxx2
-rw-r--r--sw/source/uibase/shells/grfsh.cxx4
-rw-r--r--sw/source/uibase/shells/grfshex.cxx22
-rw-r--r--sw/source/uibase/uiview/srcview.cxx2
-rw-r--r--sw/source/uibase/uiview/uivwimp.cxx2
-rw-r--r--sw/source/uibase/uiview/view2.cxx2
-rw-r--r--sw/source/uibase/utlui/glbltree.cxx2
-rw-r--r--writerperfect/source/writer/EPUBExportDialog.cxx2
110 files changed, 226 insertions, 296 deletions
diff --git a/avmedia/source/framework/mediacontrol.cxx b/avmedia/source/framework/mediacontrol.cxx
index 23cf4944e11c..dd9a02cb5c89 100644
--- a/avmedia/source/framework/mediacontrol.cxx
+++ b/avmedia/source/framework/mediacontrol.cxx
@@ -297,7 +297,7 @@ IMPL_LINK( MediaControl, implSelectHdl, ToolBox*, p, void )
{
OUString aURL;
- if (MediaWindow::executeMediaURLDialog(this, aURL, nullptr))
+ if (MediaWindow::executeMediaURLDialog(GetFrameWeld(), aURL, nullptr))
{
if( !MediaWindow::isMediaURL( aURL, ""/*TODO?*/, true ) )
MediaWindow::executeFormatErrorBox(GetFrameWeld());
diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index b14148ea37e0..2b2f0937f562 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -209,7 +209,7 @@ void MediaWindow::getMediaFilters( FilterNameVector& rFilterNameVector )
}
-bool MediaWindow::executeMediaURLDialog(const vcl::Window* pParent, OUString& rURL, bool *const o_pbLink)
+bool MediaWindow::executeMediaURLDialog(weld::Window* pParent, OUString& rURL, bool *const o_pbLink)
{
::sfx2::FileDialogHelper aDlg(o_pbLink
? ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW
@@ -295,7 +295,7 @@ bool MediaWindow::executeMediaURLDialog(const vcl::Window* pParent, OUString& rU
return !rURL.isEmpty();
}
-void MediaWindow::executeFormatErrorBox(weld::Widget* pParent)
+void MediaWindow::executeFormatErrorBox(weld::Window* pParent)
{
std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pParent,
VclMessageType::Warning, VclButtonsType::Ok, AvmResId(AVMEDIA_STR_ERR_URL)));
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index aa9269714ad4..a1d3761001a6 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -725,7 +725,7 @@ void LibPage::InsertLib()
{
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
// file open dialog
- sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, pTabDlg);
+ sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, pTabDlg ? pTabDlg->GetFrameWeld() : nullptr);
Reference <XFilePicker3> xFP = aDlg.GetFilePicker();
xFP->setTitle(IDEResId(RID_STR_APPENDLIBS));
@@ -1182,7 +1182,7 @@ Reference< XProgressHandler > OLibCommandEnvironment::getProgressHandler()
void LibPage::ExportAsPackage( const OUString& aLibName )
{
// file open dialog
- sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, FileDialogFlags::NONE, pTabDlg);
+ sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, FileDialogFlags::NONE, pTabDlg ? pTabDlg->GetFrameWeld() : nullptr);
Reference <XFilePicker3> xFP = aDlg.GetFilePicker();
Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 46f42b400f3b..033e895e8328 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -1399,7 +1399,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, FileDialogFlags::NONE, this);
+ m_pFileDlg = new sfx2::FileDialogHelper(nDialogType, FileDialogFlags::NONE, GetFrameWeld());
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 8b7a2b814bed..9378072e4e54 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -3052,7 +3052,7 @@ IMPL_LINK_NOARG( SvxIconSelectorDialog, ImportHdl, Button *, void)
{
sfx2::FileDialogHelper aImportDialog(
css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- FileDialogFlags::Graphic | FileDialogFlags::MultiSelection, this);
+ FileDialogFlags::Graphic | FileDialogFlags::MultiSelection, GetFrameWeld());
// 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 c24ef1bc2567..9ed4eca36c27 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->GetSelectedEntryCount() || !bEntriesFound )
{
- SvxOpenGraphicDialog aDlg("Gallery", this);
+ SvxOpenGraphicDialog aDlg("Gallery", GetFrameWeld());
aDlg.EnableLink(false);
aDlg.AsLink(false);
diff --git a/cui/source/dialogs/hldoctp.cxx b/cui/source/dialogs/hldoctp.cxx
index 19c26bb741f7..e0dc67de6695 100644
--- a/cui/source/dialogs/hldoctp.cxx
+++ b/cui/source/dialogs/hldoctp.cxx
@@ -197,7 +197,7 @@ IMPL_LINK_NOARG(SvxHyperlinkDocTp, ClickFileopenHdl_Impl, Button*, void)
// Open Fileopen-Dialog
sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE,
- GetParent() );
+ GetFrameWeld() );
OUString aOldURL( GetCurrentURL() );
if( aOldURL.startsWithIgnoreAsciiCase( sFileScheme ) )
{
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index e4501d4dc837..ff0a1dfa3a3c 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -401,7 +401,7 @@ IMPL_LINK_NOARG( SvBaseLinksDlg, ChangeSourceClickHdl, Button *, void )
sal_uLong nPos;
SvBaseLink* pLink = GetSelEntry( &nPos );
if ( pLink && !pLink->GetLinkSourceName().isEmpty() )
- pLink->Edit( this, LINK( this, SvBaseLinksDlg, EndEditHdl ) );
+ pLink->Edit( GetFrameWeld(), LINK( this, SvBaseLinksDlg, EndEditHdl ) );
}
}
diff --git a/cui/source/options/doclinkdialog.cxx b/cui/source/options/doclinkdialog.cxx
index abaabd906b90..2da00f389325 100644
--- a/cui/source/options/doclinkdialog.cxx
+++ b/cui/source/options/doclinkdialog.cxx
@@ -166,7 +166,7 @@ namespace svx
IMPL_LINK_NOARG(ODocumentLinkDialog, OnBrowseFile, Button*, void)
{
::sfx2::FileDialogHelper aFileDlg(
- ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, FileDialogFlags::NONE, this);
+ ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, FileDialogFlags::NONE, GetFrameWeld());
std::shared_ptr<const SfxFilter> pFilter = SfxFilter::GetFilterByName("StarOffice XML (Base)");
if ( pFilter )
{
diff --git a/cui/source/options/optinet2.cxx b/cui/source/options/optinet2.cxx
index 16d62d4acaa5..e2e3ef807b8c 100644
--- a/cui/source/options/optinet2.cxx
+++ b/cui/source/options/optinet2.cxx
@@ -1042,7 +1042,7 @@ IMPL_LINK( SvxEMailTabPage, FileDialogHdl_Impl, Button*, pButton, void )
{
if (m_pMailerURLPB == pButton && !pImpl->bROProgram)
{
- FileDialogHelper aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, this);
+ FileDialogHelper aHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
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 79df56db16b4..2d9618f7f128 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -910,7 +910,7 @@ void SvxJavaClassPathDlg::dispose()
IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, Button*, void)
{
- sfx2::FileDialogHelper aDlg(TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, this);
+ sfx2::FileDialogHelper aDlg(TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
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 3742c34d9c00..ebac89286d83 100644
--- a/cui/source/tabpages/backgrnd.cxx
+++ b/cui/source/tabpages/backgrnd.cxx
@@ -1136,7 +1136,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, this);
+ pImportDlg = new SvxOpenGraphicDialog(aStrBrowse, GetFrameWeld());
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 8b1a57cac64d..8f1a169f59d3 100644
--- a/cui/source/tabpages/numpages.cxx
+++ b/cui/source/tabpages/numpages.cxx
@@ -984,7 +984,7 @@ IMPL_LINK_NOARG(SvxBitmapPickTabPage, DoubleClickHdl_Impl, ValueSet*, void)
IMPL_LINK_NOARG(SvxBitmapPickTabPage, ClickAddBrowseHdl_Impl, Button*, void)
{
- sfx2::FileDialogHelper aFileDialog(0, FileDialogFlags::NONE, this);
+ sfx2::FileDialogHelper aFileDialog(0, FileDialogFlags::NONE, GetFrameWeld());
aFileDialog.SetTitle(CuiResId(RID_SVXSTR_ADD_IMAGE));
if ( aFileDialog.Execute() != ERRCODE_NONE )
return;
@@ -1909,7 +1909,7 @@ IMPL_LINK( SvxNumOptionsTabPage, GraphicHdl_Impl, MenuButton *, pButton, void )
OUString aGrfName;
Size aSize;
bool bSucc(false);
- SvxOpenGraphicDialog aGrfDlg(CuiResId(RID_SVXSTR_EDIT_GRAPHIC), this);
+ SvxOpenGraphicDialog aGrfDlg(CuiResId(RID_SVXSTR_EDIT_GRAPHIC), GetFrameWeld());
if(MN_GALLERY_ENTRY <= nItemId )
{
diff --git a/cui/source/tabpages/tpbitmap.cxx b/cui/source/tabpages/tpbitmap.cxx
index 5b46a5ba2fbf..4d4093f210a8 100644
--- a/cui/source/tabpages/tpbitmap.cxx
+++ b/cui/source/tabpages/tpbitmap.cxx
@@ -757,7 +757,7 @@ IMPL_LINK_NOARG(SvxBitmapTabPage, ModifyTileOffsetHdl, Edit&, void)
IMPL_LINK_NOARG(SvxBitmapTabPage, ClickImportHdl, Button*, void)
{
- SvxOpenGraphicDialog aDlg("Import", this);
+ SvxOpenGraphicDialog aDlg("Import", GetFrameWeld());
aDlg.EnableLink(false);
long nCount = m_pBitmapList->Count();
diff --git a/cui/source/tabpages/tpline.cxx b/cui/source/tabpages/tpline.cxx
index 36fae228bc34..85f2d856ecfc 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), this);
+ SvxOpenGraphicDialog aGrfDlg(CuiResId(RID_SVXSTR_EDIT_GRAPHIC), GetFrameWeld());
aGrfDlg.EnableLink(false);
aGrfDlg.AsLink(false);
if( !aGrfDlg.Execute() )
diff --git a/cui/source/tabpages/tplnedef.cxx b/cui/source/tabpages/tplnedef.cxx
index 2d55e7beb9e3..ab7b9ac74998 100644
--- a/cui/source/tabpages/tplnedef.cxx
+++ b/cui/source/tabpages/tplnedef.cxx
@@ -719,7 +719,7 @@ IMPL_LINK_NOARG(SvxLineDefTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
OUString aStrFilterType( "*.sod" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
OUString aPalettePath(SvtPathOptions().GetPalettePath());
@@ -785,7 +785,7 @@ 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, FileDialogFlags::NONE, this);
+ ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
OUString aStrFilterType( "*.sod" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/cui/source/tabpages/tplneend.cxx b/cui/source/tabpages/tplneend.cxx
index cc9b679c84e1..1f1629fbe20f 100644
--- a/cui/source/tabpages/tplneend.cxx
+++ b/cui/source/tabpages/tplneend.cxx
@@ -534,7 +534,7 @@ IMPL_LINK_NOARG(SvxLineEndDefTabPage, ClickLoadHdl_Impl, Button*, void)
if ( nReturn != RET_CANCEL )
{
::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
OUString aStrFilterType( "*.soe" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
@@ -603,7 +603,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, FileDialogFlags::NONE, this);
+ ::sfx2::FileDialogHelper aDlg(css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
OUString aStrFilterType( "*.soe" );
aDlg.AddFilter( aStrFilterType, aStrFilterType );
diff --git a/dbaccess/source/ui/app/AppController.cxx b/dbaccess/source/ui/app/AppController.cxx
index 092d5448dd78..2c18a2c7cb7e 100644
--- a/dbaccess/source/ui/app/AppController.cxx
+++ b/dbaccess/source/ui/app/AppController.cxx
@@ -1113,7 +1113,7 @@ void OApplicationController::Execute(sal_uInt16 _nId, const Sequence< PropertyVa
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
- FileDialogFlags::NONE, getView());
+ FileDialogFlags::NONE, getFrameWeld());
aFileDlg.SetDisplayDirectory( sUrl );
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
diff --git a/dbaccess/source/ui/dlg/ConnectionHelper.cxx b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
index 9cdbf996afc1..f25f0cde10e5 100644
--- a/dbaccess/source/ui/dlg/ConnectionHelper.cxx
+++ b/dbaccess/source/ui/dlg/ConnectionHelper.cxx
@@ -219,7 +219,7 @@ namespace dbaui
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
FileDialogFlags::NONE,
aModule.GetFactoryEmptyDocumentURL(SvtModuleOptions::EFactory::CALC)
- ,SfxFilterFlags::IMPORT, SfxFilterFlags::NONE, this);
+ ,SfxFilterFlags::IMPORT, SfxFilterFlags::NONE, GetFrameWeld());
askForFileName(aFileDlg);
}
break;
@@ -230,7 +230,7 @@ namespace dbaui
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
FileDialogFlags::NONE,
aModule.GetFactoryEmptyDocumentURL(SvtModuleOptions::EFactory::WRITER),
- SfxFilterFlags::IMPORT, SfxFilterFlags::NONE, this);
+ SfxFilterFlags::IMPORT, SfxFilterFlags::NONE, GetFrameWeld());
askForFileName(aFileDlg);
}
break;
@@ -240,7 +240,7 @@ namespace dbaui
OUString sFilterName(DBA_RES (STR_MSACCESS_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
aFileDlg.AddFilter(sFilterName,sExt);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
@@ -252,7 +252,7 @@ namespace dbaui
OUString sFilterName2(DBA_RES (STR_MSACCESS_2007_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
aFileDlg.AddFilter(sFilterName2,sAccdb);
aFileDlg.SetCurrentFilter(sFilterName2);
askForFileName(aFileDlg);
@@ -333,7 +333,7 @@ namespace dbaui
OUString sFilterName(DBA_RES (STR_FIREBIRD_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
aFileDlg.AddFilter(sFilterName,sExt);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
@@ -358,7 +358,7 @@ namespace dbaui
OUString sFilterName(DBA_RES (STR_FIREBIRD_FILTERNAME));
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
aFileDlg.AddFilter(sFilterName,sExt);
aFileDlg.SetCurrentFilter(sFilterName);
askForFileName(aFileDlg);
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 03a2e67d7092..3403203c2e33 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -782,7 +782,7 @@ bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
bool bRet = false;
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
if ( pFilter )
{
diff --git a/dbaccess/source/ui/dlg/generalpage.cxx b/dbaccess/source/ui/dlg/generalpage.cxx
index 738b33af880b..6f6d3be85b6b 100644
--- a/dbaccess/source/ui/dlg/generalpage.cxx
+++ b/dbaccess/source/ui/dlg/generalpage.cxx
@@ -701,7 +701,7 @@ namespace dbaui
{
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::NONE, "sdatabase", SfxFilterFlags::NONE, SfxFilterFlags::NONE, this);
+ FileDialogFlags::NONE, "sdatabase", SfxFilterFlags::NONE, SfxFilterFlags::NONE, GetFrameWeld());
std::shared_ptr<const SfxFilter> pFilter = getStandardDatabaseFilter();
if ( pFilter )
{
diff --git a/desktop/source/deployment/gui/dp_gui_dialog2.cxx b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
index 1364ab48a94c..13f34f66f5f8 100644
--- a/desktop/source/deployment/gui/dp_gui_dialog2.cxx
+++ b/desktop/source/deployment/gui/dp_gui_dialog2.cxx
@@ -673,7 +673,7 @@ bool ExtMgrDialog::acceptLicense( const uno::Reference< deployment::XPackage > &
uno::Sequence< OUString > ExtMgrDialog::raiseAddPicker()
{
- sfx2::FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, this);
+ sfx2::FileDialogHelper aDlgHelper(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, FileDialogFlags::NONE, GetFrameWeld());
const uno::Reference<ui::dialogs::XFilePicker3> xFilePicker = aDlgHelper.GetFilePicker();
xFilePicker->setTitle( m_sAddPackages );
diff --git a/extensions/source/dbpilots/commonpagesdbp.cxx b/extensions/source/dbpilots/commonpagesdbp.cxx
index 4c2d7890c9c1..c811a0f90d8d 100644
--- a/extensions/source/dbpilots/commonpagesdbp.cxx
+++ b/extensions/source/dbpilots/commonpagesdbp.cxx
@@ -206,7 +206,7 @@ namespace dbp
{
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
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 5f94899b054e..9d8a6f43292b 100644
--- a/extensions/source/propctrlr/formcomponenthandler.cxx
+++ b/extensions/source/propctrlr/formcomponenthandler.cxx
@@ -2692,9 +2692,10 @@ namespace pcr
bool bIsLink = true;// reflect the legacy behavior
OUString aStrTrans = m_pInfoService->getPropertyTranslation( PROPERTY_ID_IMAGE_URL );
+ vcl::Window* pWin = impl_getDefaultDialogParent_nothrow();
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
- FileDialogFlags::Graphic, impl_getDefaultDialogParent_nothrow());
+ FileDialogFlags::Graphic, pWin ? pWin->GetFrameWeld() : nullptr);
aFileDlg.SetTitle(aStrTrans);
// non-linked images ( e.g. those located in the document
@@ -2759,9 +2760,10 @@ namespace pcr
bool FormComponentPropertyHandler::impl_browseForTargetURL_nothrow( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
+ vcl::Window* pWin = impl_getDefaultDialogParent_nothrow();
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::NONE, impl_getDefaultDialogParent_nothrow());
+ FileDialogFlags::NONE, pWin ? pWin->GetFrameWeld() : nullptr);
OUString sURL;
OSL_VERIFY( impl_getPropertyValue_throw( PROPERTY_TARGET_URL ) >>= sURL );
@@ -2813,9 +2815,10 @@ namespace pcr
bool FormComponentPropertyHandler::impl_browseForDatabaseDocument_throw( Any& _out_rNewValue, ::osl::ClearableMutexGuard& _rClearBeforeDialog ) const
{
+ vcl::Window* pWin = impl_getDefaultDialogParent_nothrow();
::sfx2::FileDialogHelper aFileDlg(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION, FileDialogFlags::NONE,
- "sdatabase", SfxFilterFlags::NONE, SfxFilterFlags::NONE, impl_getDefaultDialogParent_nothrow());
+ "sdatabase", SfxFilterFlags::NONE, SfxFilterFlags::NONE, pWin ? pWin->GetFrameWeld() : nullptr);
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 0806d605ebf4..8e83b862c989 100644
--- a/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltersettingsdialog.cxx
@@ -874,7 +874,7 @@ void XMLFilterSettingsDialog::onSave()
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
OUString aExtensions( "*.jar" );
OUString aFilterName(XsltResId(STR_FILTER_PACKAGE));
@@ -919,7 +919,7 @@ void XMLFilterSettingsDialog::onOpen()
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
OUString aExtensions( "*.jar" );
OUString aFilterName(XsltResId(STR_FILTER_PACKAGE));
diff --git a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
index de12925ebb99..80b6a65a5bba 100644
--- a/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
+++ b/filter/source/xsltdialog/xmlfiltertabpagexslt.cxx
@@ -168,7 +168,7 @@ IMPL_LINK ( XMLFilterTabPageXSLT, ClickBrowseHdl_Impl, Button *, pButton, void )
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
aDlg.SetDisplayDirectory( GetURL( pURLBox ) );
diff --git a/filter/source/xsltdialog/xmlfiltertestdialog.cxx b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
index 5e26875c2f09..c06f0072696e 100644
--- a/filter/source/xsltdialog/xmlfiltertestdialog.cxx
+++ b/filter/source/xsltdialog/xmlfiltertestdialog.cxx
@@ -309,7 +309,7 @@ void XMLFilterTestDialog::onExportBrowse()
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
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 );
@@ -543,7 +543,7 @@ void XMLFilterTestDialog::onImportBrowse()
// Open Fileopen-Dialog
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
OUString aFilterName( m_pFilterInfo->maInterfaceName );
OUString aExtensions;
diff --git a/forms/source/component/ImageControl.cxx b/forms/source/component/ImageControl.cxx
index 1f0c99bdf5e7..8e76aefc7d52 100644
--- a/forms/source/component/ImageControl.cxx
+++ b/forms/source/component/ImageControl.cxx
@@ -774,8 +774,9 @@ bool OImageControlControl::implInsertGraphics()
try
{
Reference< XWindowPeer > xWindowPeer = getPeer();
+ VclPtr<vcl::Window> xWin = VCLUnoHelper::GetWindow(xWindowPeer);
::sfx2::FileDialogHelper aDialog(TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic,
- VCLUnoHelper::GetWindow(xWindowPeer));
+ xWin ? xWin->GetFrameWeld() : nullptr);
aDialog.SetTitle( sTitle );
Reference< XFilePickerControlAccess > xController( aDialog.GetFilePicker(), UNO_QUERY_THROW );
diff --git a/forms/source/richtext/richtextvclcontrol.cxx b/forms/source/richtext/richtextvclcontrol.cxx
index 230f1cfe1510..fd466cf25b2c 100644
--- a/forms/source/richtext/richtextvclcontrol.cxx
+++ b/forms/source/richtext/richtextvclcontrol.cxx
@@ -234,7 +234,7 @@ namespace frm
{ "Text (*.txt)", "*.txt", EETextFormat::Text }
};
- ::sfx2::FileDialogHelper aFP( bLoad ? css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE : css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, FileDialogFlags::NONE, this );
+ ::sfx2::FileDialogHelper aFP( bLoad ? css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE : css::ui::dialogs::TemplateDescription::FILESAVE_AUTOEXTENSION, FileDialogFlags::NONE, GetFrameWeld() );
for (auto & aExportFormat : aExportFormats)
{
diff --git a/include/avmedia/mediawindow.hxx b/include/avmedia/mediawindow.hxx
index 2b93d411e194..da97ec8c5fd0 100644
--- a/include/avmedia/mediawindow.hxx
+++ b/include/avmedia/mediawindow.hxx
@@ -33,8 +33,7 @@
#define AVMEDIA_FRAMEGRABBER_DEFAULTFRAME -1.0
-namespace vcl { class Window; }
-namespace weld { class Widget; }
+namespace weld { class Window; }
class KeyEvent;
class MouseEvent;
class CommandEvent;
@@ -99,8 +98,8 @@ namespace avmedia
static void getMediaFilters( FilterNameVector& rFilterNameVector );
/// @param o_pbLink if not 0, this is an "insert" dialog: display link
/// checkbox and store its state in *o_pbLink
- static bool executeMediaURLDialog(const vcl::Window* pParent, OUString& rURL, bool *const o_pbLink);
- static void executeFormatErrorBox(weld::Widget* pParent);
+ static bool executeMediaURLDialog(weld::Window* pParent, OUString& rURL, bool *const o_pbLink);
+ static void executeFormatErrorBox(weld::Window* pParent);
static bool isMediaURL( const OUString& rURL, const OUString& rReferer, bool bDeep = false, Size* pPreferredSizePixel = nullptr );
static css::uno::Reference< css::media::XPlayer > createPlayer( const OUString& rURL, const OUString& rReferer, const OUString* pMimeType = nullptr );
diff --git a/include/sfx2/docinsert.hxx b/include/sfx2/docinsert.hxx
index 5ab0d9b73bd0..bacf00ec47de 100644
--- a/include/sfx2/docinsert.hxx
+++ b/include/sfx2/docinsert.hxx
@@ -28,6 +28,7 @@
#include <vector>
namespace sfx2 { class FileDialogHelper; }
+namespace weld { class Window; }
class SfxMedium;
class SfxItemSet;
enum class FileDialogFlags;
@@ -39,7 +40,7 @@ namespace sfx2 {
class SFX2_DLLPUBLIC DocumentInserter
{
private:
- VclPtr<vcl::Window> m_xParent;
+ weld::Window* m_pParent;
OUString m_sDocFactory;
OUString m_sFilter;
Link<sfx2::FileDialogHelper*,void> m_aDialogClosedLink;
@@ -61,7 +62,7 @@ public:
Compare,
Merge
};
- DocumentInserter(vcl::Window* pParent, const OUString& rFactory, const Mode mode = Mode::Insert);
+ DocumentInserter(weld::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 8a5b0015a705..02cc6f15c9a9 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -103,25 +103,14 @@ private:
public:
FileDialogHelper(sal_Int16 nDialogType,
FileDialogFlags nFlags,
- const vcl::Window* _pPreferredParent);
-
- FileDialogHelper(sal_Int16 nDialogType,
- FileDialogFlags nFlags,
- weld::Window* _pPreferredParent);
-
- FileDialogHelper(sal_Int16 nDialogType,
- FileDialogFlags nFlags,
- const OUString& rFactory,
- SfxFilterFlags nMust,
- SfxFilterFlags nDont,
- const vcl::Window* _pPreferredParent);
+ weld::Window* pPreferredParent);
FileDialogHelper(sal_Int16 nDialogType,
FileDialogFlags nFlags,
const OUString& rFactory,
SfxFilterFlags nMust,
SfxFilterFlags nDont,
- weld::Window* _pPreferredParent);
+ weld::Window* pPreferredParent);
FileDialogHelper(sal_Int16 nDialogType,
FileDialogFlags nFlags,
@@ -131,7 +120,7 @@ public:
SfxFilterFlags nDont,
const OUString& rStandardDir,
const css::uno::Sequence< OUString >& rBlackList,
- const vcl::Window* _pPreferredParent);
+ weld::Window* pPreferredParent);
FileDialogHelper(sal_Int16 nDialogType,
FileDialogFlags nFlags,
@@ -139,7 +128,7 @@ public:
const OUString& aExtName,
const OUString& rStandardDir,
const css::uno::Sequence< OUString >& rBlackList,
- const vcl::Window* _pPreferredParent);
+ weld::Window* pPreferredParent);
virtual ~FileDialogHelper();
@@ -254,7 +243,7 @@ public:
#define SFX2_IMPL_DIALOG_OOO 2
#define SFX2_IMPL_DIALOG_REMOTE 3
-ErrCode FileOpenDialog_Impl( const vcl::Window* pParent,
+ErrCode FileOpenDialog_Impl( weld::Window* pParent,
sal_Int16 nDialogType,
FileDialogFlags nFlags,
std::vector<OUString>& rpURLList,
diff --git a/include/sfx2/linksrc.hxx b/include/sfx2/linksrc.hxx
index 8eff0afd0376..3471dde4d10a 100644
--- a/include/sfx2/linksrc.hxx
+++ b/include/sfx2/linksrc.hxx
@@ -31,7 +31,7 @@ namespace com { namespace sun { namespace star { namespace uno
{
class Any;
}}}}
-namespace vcl { class Window; }
+namespace weld { class Window; }
namespace rtl {
class OUString;
}
@@ -83,7 +83,7 @@ public:
// sal_True => data complete loaded
virtual bool IsDataComplete() const;
- virtual void Edit( vcl::Window *, SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl );
+ virtual void Edit(weld::Window *, SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl);
void AddDataAdvise( SvBaseLink *, const rtl::OUString & rMimeType,
diff --git a/include/sfx2/lnkbase.hxx b/include/sfx2/lnkbase.hxx
index 6809a1d5ded6..09f14b3a1723 100644
--- a/include/sfx2/lnkbase.hxx
+++ b/include/sfx2/lnkbase.hxx
@@ -144,7 +144,7 @@ public:
bool Update();
void Disconnect();
- virtual void Edit( vcl::Window*, const Link<SvBaseLink&,void>& rEndEditHdl );
+ virtual void Edit(weld::Window*, const Link<SvBaseLink&,void>& rEndEditHdl);
// should the link appear in the dialog? (to the left in the link in the...)
bool IsVisible() const { return bVisible; }
diff --git a/include/sfx2/opengrf.hxx b/include/sfx2/opengrf.hxx
index 775750c0895b..0178cc0bb745 100644
--- a/include/sfx2/opengrf.hxx
+++ b/include/sfx2/opengrf.hxx
@@ -31,8 +31,8 @@ struct SvxOpenGrf_Impl;
class SFX2_DLLPUBLIC SvxOpenGraphicDialog
{
public:
- SvxOpenGraphicDialog(const OUString& rTitle, const vcl::Window* pPreferredParent);
- SvxOpenGraphicDialog(const OUString& rTitle, const vcl::Window* pPreferredParent,
+ SvxOpenGraphicDialog(const OUString& rTitle, weld::Window* pPreferredParent);
+ SvxOpenGraphicDialog(const OUString& rTitle, weld::Window* pPreferredParent,
sal_Int16 nDialogType);
~SvxOpenGraphicDialog();
diff --git a/include/svx/graphichelper.hxx b/include/svx/graphichelper.hxx
index 2a833aa9f9c5..cf7babc26c65 100644
--- a/include/svx/graphichelper.hxx
+++ b/include/svx/graphichelper.hxx
@@ -31,8 +31,8 @@ class SVX_DLLPUBLIC GraphicHelper
public:
static void GetPreferredExtension( OUString& rExtension, const Graphic& rGraphic );
- 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 OUString ExportGraphic(weld::Window* pWin, const Graphic& rGraphic, const OUString& rGraphicName);
+ static void SaveShapeAsGraphic(weld::Window* pWin, const css::uno::Reference< css::drawing::XShape >& xShape);
static short HasToSaveTransformedImage(weld::Widget* pWin);
};
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index 8a82ef78f5ff..10e813dae9b9 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -2983,7 +2983,7 @@ void OReportController::insertGraphic()
try
{
uno::Reference< report::XSection> xSection = getDesignView()->getCurrentSection();
- ::sfx2::FileDialogHelper aDialog(ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic, getView());
+ ::sfx2::FileDialogHelper aDialog(ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW, FileDialogFlags::Graphic, getFrameWeld());
aDialog.SetTitle( sTitle );
uno::Reference< ui::dialogs::XFilePickerControlAccess > xController(aDialog.GetFilePicker(), UNO_QUERY_THROW);
diff --git a/sc/inc/arealink.hxx b/sc/inc/arealink.hxx
index 9c8c33b9fff0..ae503c0a7f2e 100644
--- a/sc/inc/arealink.hxx
+++ b/sc/inc/arealink.hxx
@@ -54,7 +54,7 @@ public:
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue ) override;
- virtual void Edit( vcl::Window*, const Link<SvBaseLink&,void>& rEndEditHdl ) override;
+ virtual void Edit(weld::Window*, const Link<SvBaseLink&,void>& rEndEditHdl) override;
bool Refresh( const OUString& rNewFile, const OUString& rNewFilter,
const OUString& rNewArea, sal_uLong nNewRefresh );
diff --git a/sc/inc/externalrefmgr.hxx b/sc/inc/externalrefmgr.hxx
index 70cf8f99a65f..028dcdf67cb6 100644
--- a/sc/inc/externalrefmgr.hxx
+++ b/sc/inc/externalrefmgr.hxx
@@ -70,7 +70,7 @@ public:
virtual void Closed() override;
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue) override;
- virtual void Edit(vcl::Window* pParent, const Link<SvBaseLink&,void>& rEndEditHdl) override;
+ virtual void Edit(weld::Window* pParent, const Link<SvBaseLink&,void>& rEndEditHdl) override;
void SetDoReferesh(bool b);
diff --git a/sc/inc/tablink.hxx b/sc/inc/tablink.hxx
index 54b13940db67..04c13f0a5580 100644
--- a/sc/inc/tablink.hxx
+++ b/sc/inc/tablink.hxx
@@ -53,7 +53,7 @@ public:
virtual ::sfx2::SvBaseLink::UpdateResult DataChanged(
const OUString& rMimeType, const css::uno::Any & rValue ) override;
- virtual void Edit( vcl::Window*, const Link<SvBaseLink&,void>& rEndEditHdl ) override;
+ virtual void Edit(weld::Window*, const Link<SvBaseLink&,void>& rEndEditHdl) override;
bool Refresh(const OUString& rNewFile, const OUString& rNewFilter,
const OUString* pNewOptions /* = NULL */, sal_uLong nNewRefresh );
diff --git a/sc/source/ui/docshell/arealink.cxx b/sc/source/ui/docshell/arealink.cxx
index 3e719dfb68f9..8a75234cc686 100644
--- a/sc/source/ui/docshell/arealink.cxx
+++ b/sc/source/ui/docshell/arealink.cxx
@@ -73,13 +73,14 @@ ScAreaLink::~ScAreaLink()
StopRefreshTimer();
}
-void ScAreaLink::Edit(vcl::Window* pParent, const Link<SvBaseLink&,void>& /* rEndEditHdl */ )
+void ScAreaLink::Edit(weld::Window*, const Link<SvBaseLink&,void>& /* rEndEditHdl */ )
{
// use own dialog instead of SvBaseLink::Edit...
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
OSL_ENSURE(pFact, "ScAbstractFactory create fail!");
- ScopedVclPtr<AbstractScLinkedAreaDlg> pDlg(pFact->CreateScLinkedAreaDlg(pParent));
+//TODO ScopedVclPtr<AbstractScLinkedAreaDlg> pDlg(pFact->CreateScLinkedAreaDlg(pParent));
+ ScopedVclPtr<AbstractScLinkedAreaDlg> pDlg(pFact->CreateScLinkedAreaDlg(nullptr));
OSL_ENSURE(pDlg, "Dialog create fail!");
pDlg->InitFromOldLink( aFileName, aFilterName, aOptions, aSourceArea, GetRefreshDelay() );
if ( pDlg->Execute() == RET_OK )
diff --git a/sc/source/ui/docshell/docsh4.cxx b/sc/source/ui/docshell/docsh4.cxx
index ebd9651ff537..a0b2cf8b8678 100644
--- a/sc/source/ui/docshell/docsh4.cxx
+++ b/sc/source/ui/docshell/docsh4.cxx
@@ -770,7 +770,7 @@ void ScDocShell::Execute( SfxRequest& rReq )
ScTabViewShell* pViewSh = ScTabViewShell::GetActiveViewShell();
vcl::Window* pParent = pViewSh ? pViewSh->GetDialogParent() : nullptr;
- pImpl->pDocInserter = new ::sfx2::DocumentInserter(pParent,
+ pImpl->pDocInserter = new ::sfx2::DocumentInserter(pParent ? pParent->GetFrameWeld() : nullptr,
ScDocShell::Factory().GetFactoryName(), mode );
pImpl->pDocInserter->StartExecuteModal( LINK( this, ScDocShell, DialogClosedHdl ) );
return ;
diff --git a/sc/source/ui/docshell/externalrefmgr.cxx b/sc/source/ui/docshell/externalrefmgr.cxx
index 4ca3df975a36..a41052fc3124 100644
--- a/sc/source/ui/docshell/externalrefmgr.cxx
+++ b/sc/source/ui/docshell/externalrefmgr.cxx
@@ -1496,7 +1496,7 @@ void ScExternalRefLink::Closed()
return SUCCESS;
}
-void ScExternalRefLink::Edit(vcl::Window* pParent, const Link<SvBaseLink&,void>& /*rEndEditHdl*/)
+void ScExternalRefLink::Edit(weld::Window* pParent, const Link<SvBaseLink&,void>& /*rEndEditHdl*/)
{
SvBaseLink::Edit(pParent, Link<SvBaseLink&,void>());
}
diff --git a/sc/source/ui/docshell/tablink.cxx b/sc/source/ui/docshell/tablink.cxx
index 8c0e3d5c6c1a..9074786c919e 100644
--- a/sc/source/ui/docshell/tablink.cxx
+++ b/sc/source/ui/docshell/tablink.cxx
@@ -108,7 +108,7 @@ ScTableLink::~ScTableLink()
rDoc.SetLink( nTab, ScLinkMode::NONE, "", "", "", "", 0 );
}
-void ScTableLink::Edit( vcl::Window* pParent, const Link<SvBaseLink&,void>& rEndEditHdl )
+void ScTableLink::Edit(weld::Window* pParent, const Link<SvBaseLink&,void>& rEndEditHdl)
{
pImpl->m_aEndEditLink = rEndEditHdl;
diff --git a/sc/source/ui/drawfunc/chartsh.cxx b/sc/source/ui/drawfunc/chartsh.cxx
index 054cce77a439..bc6e2bb48c74 100644
--- a/sc/source/ui/drawfunc/chartsh.cxx
+++ b/sc/source/ui/drawfunc/chartsh.cxx
@@ -98,7 +98,7 @@ void ScChartShell::ExecuteExportAsGraphic( SfxRequest& )
{
vcl::Window* pWin = GetViewData()->GetActiveWin();
Reference< drawing::XShape > xSourceDoc( pObject->getUnoShape(), UNO_QUERY_THROW );
- GraphicHelper::SaveShapeAsGraphic(pWin, xSourceDoc);
+ GraphicHelper::SaveShapeAsGraphic(pWin ? pWin->GetFrameWeld() : nullptr, xSourceDoc);
}
}
diff --git a/sc/source/ui/drawfunc/fuins1.cxx b/sc/source/ui/drawfunc/fuins1.cxx
index b7c4ed8d5e8b..5574a6f5b6cc 100644
--- a/sc/source/ui/drawfunc/fuins1.cxx
+++ b/sc/source/ui/drawfunc/fuins1.cxx
@@ -282,7 +282,7 @@ FuInsertGraphic::FuInsertGraphic( ScTabViewShell* pViewSh,
}
else
{
- SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin,
+ SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin ? pWin->GetFrameWeld() : nullptr,
ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW_IMAGE_ANCHOR);
Reference<ui::dialogs::XFilePickerControlAccess> xCtrlAcc = aDlg.GetFilePickerControlAccess();
@@ -388,7 +388,7 @@ FuInsertMedia::FuInsertMedia( ScTabViewShell* pViewSh,
bool bLink(true);
if (bAPI
#if HAVE_FEATURE_AVMEDIA
- || ::avmedia::MediaWindow::executeMediaURLDialog(pWin, aURL, &bLink)
+ || ::avmedia::MediaWindow::executeMediaURLDialog(pWin ? pWin->GetFrameWeld() : nullptr, aURL, &bLink)
#endif
)
{
diff --git a/sc/source/ui/drawfunc/graphsh.cxx b/sc/source/ui/drawfunc/graphsh.cxx
index 641d3854ebb3..9855beee0125 100644
--- a/sc/source/ui/drawfunc/graphsh.cxx
+++ b/sc/source/ui/drawfunc/graphsh.cxx
@@ -266,11 +266,12 @@ void ScGraphicShell::ExecuteSaveGraphic( SAL_UNUSED_PARAMETER SfxRequest& /*rReq
GraphicAttr aGraphicAttr = pObj->GetGraphicAttr();
short nState = RET_CANCEL;
vcl::Window* pWin = GetViewData()->GetActiveWin();
+ weld::Window* pWinFrame = pWin ? pWin->GetFrameWeld() : nullptr;
if (aGraphicAttr != GraphicAttr()) // the image has been modified
{
if (pWin)
{
- nState = GraphicHelper::HasToSaveTransformedImage(pWin->GetFrameWeld());
+ nState = GraphicHelper::HasToSaveTransformedImage(pWinFrame);
}
}
else
@@ -280,12 +281,12 @@ void ScGraphicShell::ExecuteSaveGraphic( SAL_UNUSED_PARAMETER SfxRequest& /*rReq
if (nState == RET_YES)
{
- GraphicHelper::ExportGraphic(pWin, pObj->GetTransformedGraphic(), "");
+ GraphicHelper::ExportGraphic(pWinFrame, pObj->GetTransformedGraphic(), "");
}
else if (nState == RET_NO)
{
GraphicObject aGraphicObject(pObj->GetGraphicObject());
- GraphicHelper::ExportGraphic(pWin, aGraphicObject.GetGraphic(), "");
+ GraphicHelper::ExportGraphic(pWinFrame, aGraphicObject.GetGraphic(), "");
}
}
}
@@ -323,7 +324,7 @@ void ScGraphicShell::ExecuteChangePicture( SAL_UNUSED_PARAMETER SfxRequest& /*rR
{
SdrGrafObj* pGraphicObj = static_cast<SdrGrafObj*>(pObj);
vcl::Window* pWin = GetViewData()->GetActiveWin();
- SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin);
+ SvxOpenGraphicDialog aDlg(ScResId(STR_INSERTGRAPHIC), pWin ? pWin->GetFrameWeld() : nullptr);
if( aDlg.Execute() == ERRCODE_NONE )
{
diff --git a/sc/source/ui/miscdlgs/datastreamdlg.cxx b/sc/source/ui/miscdlgs/datastreamdlg.cxx
index f447f48dc277..6164037b1c34 100644
--- a/sc/source/ui/miscdlgs/datastreamdlg.cxx
+++ b/sc/source/ui/miscdlgs/datastreamdlg.cxx
@@ -74,7 +74,7 @@ void DataStreamDlg::dispose()
IMPL_LINK_NOARG(DataStreamDlg, BrowseHdl, Button*, void)
{
- sfx2::FileDialogHelper aFileDialog(0, FileDialogFlags::NONE, this);
+ sfx2::FileDialogHelper aFileDialog(0, FileDialogFlags::NONE, GetFrameWeld());
if ( aFileDialog.Execute() != ERRCODE_NONE )
return;
diff --git a/sc/source/ui/miscdlgs/instbdlg.cxx b/sc/source/ui/miscdlgs/instbdlg.cxx
index 3e66652d76f2..83a301ceff1c 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(this, ScDocShell::Factory().GetFactoryName());
+ pDocInserter = new ::sfx2::DocumentInserter(GetFrameWeld(), 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 e984045ab5ed..257f07f24747 100644
--- a/sc/source/ui/miscdlgs/linkarea.cxx
+++ b/sc/source/ui/miscdlgs/linkarea.cxx
@@ -83,7 +83,7 @@ void ScLinkedAreaDlg::dispose()
IMPL_LINK_NOARG(ScLinkedAreaDlg, BrowseHdl, Button*, void)
{
- pDocInserter.reset( new sfx2::DocumentInserter(this, ScDocShell::Factory().GetFactoryName()) );
+ pDocInserter.reset( new sfx2::DocumentInserter(GetFrameWeld(), 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 062a02f82247..af3602bc9471 100644
--- a/sc/source/ui/view/tabvwshb.cxx
+++ b/sc/source/ui/view/tabvwshb.cxx
@@ -350,7 +350,7 @@ void ScTabViewShell::ExecDrawIns(SfxRequest& rReq)
{
sfx2::FileDialogHelper aDlg(ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
FileDialogFlags::NONE, "com.sun.star.chart2.ChartDocument",
- SfxFilterFlags::NONE, SfxFilterFlags::NONE, pWin);
+ SfxFilterFlags::NONE, SfxFilterFlags::NONE, pWin ? pWin->GetFrameWeld() : nullptr);
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 05cc70385499..457ab8c8ba9e 100644
--- a/sd/source/ui/animations/CustomAnimationDialog.cxx
+++ b/sd/source/ui/animations/CustomAnimationDialog.cxx
@@ -1494,7 +1494,7 @@ sal_Int32 CustomAnimationEffectTabPage::getSoundObject( const OUString& rStr )
void CustomAnimationEffectTabPage::openSoundFileDialog()
{
- SdOpenSoundFileDialog aFileDialog(this);
+ SdOpenSoundFileDialog aFileDialog(GetFrameWeld());
OUString aFile( SvtPathOptions().GetWorkPath() );
aFileDialog.SetPath( aFile );
diff --git a/sd/source/ui/animations/SlideTransitionPane.cxx b/sd/source/ui/animations/SlideTransitionPane.cxx
index f830ecc8c355..1ada6a56eac5 100644
--- a/sd/source/ui/animations/SlideTransitionPane.cxx
+++ b/sd/source/ui/animations/SlideTransitionPane.cxx
@@ -733,7 +733,7 @@ void SlideTransitionPane::openSoundFileDialog()
if( ! mpLB_SOUND->IsEnabled())
return;
- SdOpenSoundFileDialog aFileDialog(this);
+ SdOpenSoundFileDialog aFileDialog(GetFrameWeld());
OUString aFile;
DBG_ASSERT( mpLB_SOUND->GetSelectedEntryPos() == 2,
diff --git a/sd/source/ui/dlg/PhotoAlbumDialog.cxx b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
index 739548ce570d..513dc00781c5 100644
--- a/sd/source/ui/dlg/PhotoAlbumDialog.cxx
+++ b/sd/source/ui/dlg/PhotoAlbumDialog.cxx
@@ -547,8 +547,7 @@ IMPL_LINK_NOARG(SdPhotoAlbumDialog, FileHdl, Button*, void)
{
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_PREVIEW,
- FileDialogFlags::Graphic | FileDialogFlags::MultiSelection, this
- );
+ FileDialogFlags::Graphic | FileDialogFlags::MultiSelection, GetFrameWeld());
// 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 2b41dbb4886a..25f07dca28e3 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -57,7 +57,7 @@ private:
DECL_LINK( IsMusicStoppedHdl, Timer *, void );
public:
- explicit SdFileDialog_Imp(const vcl::Window *pParent);
+ explicit SdFileDialog_Imp(weld::Window *pParent);
virtual ~SdFileDialog_Imp() override;
// overwritten from FileDialogHelper, to receive user feedback
@@ -172,10 +172,10 @@ IMPL_LINK_NOARG(SdFileDialog_Imp, IsMusicStoppedHdl, Timer *, void)
}
}
-SdFileDialog_Imp::SdFileDialog_Imp(const vcl::Window* pParent) :
- FileDialogHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY, FileDialogFlags::NONE, pParent),
- mnPlaySoundEvent( nullptr ),
- mbLabelPlaying(false)
+SdFileDialog_Imp::SdFileDialog_Imp(weld::Window* pParent)
+ : FileDialogHelper(css::ui::dialogs::TemplateDescription::FILEOPEN_LINK_PLAY, FileDialogFlags::NONE, pParent)
+ , mnPlaySoundEvent(nullptr)
+ , mbLabelPlaying(false)
{
maUpdateIdle.SetInvokeHandler(LINK(this, SdFileDialog_Imp, IsMusicStoppedHdl));
maUpdateIdle.SetDebugName( "SdFileDialog_Imp maUpdateIdle" );
@@ -210,8 +210,8 @@ SdFileDialog_Imp::~SdFileDialog_Imp()
// ----------- SdOpenSoundFileDialog -----------------------
// these are simple forwarders
-SdOpenSoundFileDialog::SdOpenSoundFileDialog(const vcl::Window *pParent) :
- mpImpl( new SdFileDialog_Imp(pParent) )
+SdOpenSoundFileDialog::SdOpenSoundFileDialog(weld::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 d0d31a001f26..643a7c6fa460 100644
--- a/sd/source/ui/dlg/tpaction.cxx
+++ b/sd/source/ui/dlg/tpaction.cxx
@@ -409,7 +409,7 @@ void SdTPAction::OpenFileDialog()
if (bSound)
{
- SdOpenSoundFileDialog aFileDialog(this);
+ SdOpenSoundFileDialog aFileDialog(GetFrameWeld());
if( aFile.isEmpty() )
aFile = SvtPathOptions().GetWorkPath();
@@ -436,7 +436,7 @@ void SdTPAction::OpenFileDialog()
{
sfx2::FileDialogHelper aFileDialog(
ui::dialogs::TemplateDescription::FILEOPEN_READONLY_VERSION,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
if (bDocument && aFile.isEmpty())
aFile = SvtPathOptions().GetWorkPath();
diff --git a/sd/source/ui/func/fuinsert.cxx b/sd/source/ui/func/fuinsert.cxx
index 312a03d4c557..0cdd22da3807 100644
--- a/sd/source/ui/func/fuinsert.cxx
+++ b/sd/source/ui/func/fuinsert.cxx
@@ -139,7 +139,7 @@ void FuInsertGraphic::DoExecute( SfxRequest& rReq )
}
else
{
- SvxOpenGraphicDialog aDlg(SdResId(STR_INSERTGRAPHIC), mpWindow);
+ SvxOpenGraphicDialog aDlg(SdResId(STR_INSERTGRAPHIC), mpWindow ? mpWindow->GetFrameWeld() : nullptr);
if( aDlg.Execute() != ERRCODE_NONE )
return; // cancel dialog
@@ -707,7 +707,7 @@ void FuInsertAVMedia::DoExecute( SfxRequest& rReq )
bool bLink(true);
if (bAPI
#if HAVE_FEATURE_AVMEDIA
- || ::avmedia::MediaWindow::executeMediaURLDialog(mpWindow, aURL, & bLink)
+ || ::avmedia::MediaWindow::executeMediaURLDialog(mpWindow ? mpWindow->GetFrameWeld() : nullptr, aURL, & bLink)
#endif
)
{
diff --git a/sd/source/ui/func/fuinsfil.cxx b/sd/source/ui/func/fuinsfil.cxx
index bc1956e2993a..fae84526e97f 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, mpWindow);
+ FileDialogFlags::Insert, mpWindow ? mpWindow->GetFrameWeld() : nullptr);
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 18931db2369a..17527c912d3f 100644
--- a/sd/source/ui/func/fupage.cxx
+++ b/sd/source/ui/func/fupage.cxx
@@ -145,7 +145,7 @@ void FuPage::DoExecute( SfxRequest& )
if( !mpArgs )
{
mpView->SdrEndTextEdit();
- mpArgs = ExecuteDialog(mpWindow);
+ mpArgs = ExecuteDialog(mpWindow ? mpWindow->GetFrameWeld() : nullptr);
}
// if we now have arguments, apply them to current page
@@ -203,7 +203,7 @@ void MergePageBackgroundFilling(SdPage *pPage, SdStyleSheet *pStyleSheet, bool b
}
}
-const SfxItemSet* FuPage::ExecuteDialog( vcl::Window const * pParent )
+const SfxItemSet* FuPage::ExecuteDialog(weld::Window* pParent)
{
if (!mpDrawViewShell)
return nullptr;
diff --git a/sd/source/ui/inc/filedlg.hxx b/sd/source/ui/inc/filedlg.hxx
index 619195e01089..36da05e13933 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(const vcl::Window* pParent);
+ SdOpenSoundFileDialog(weld::Window* pParent);
~SdOpenSoundFileDialog();
ErrCode Execute();
diff --git a/sd/source/ui/inc/fupage.hxx b/sd/source/ui/inc/fupage.hxx
index b1912e3576fa..b2e19efa4245 100644
--- a/sd/source/ui/inc/fupage.hxx
+++ b/sd/source/ui/inc/fupage.hxx
@@ -41,7 +41,7 @@ class FuPage
virtual void Activate() override;
virtual void Deactivate() override;
- const SfxItemSet* ExecuteDialog( vcl::Window const * pParent );
+ const SfxItemSet* ExecuteDialog(weld::Window* pParent);
protected:
virtual ~FuPage() override;
diff --git a/sd/source/ui/view/drviews2.cxx b/sd/source/ui/view/drviews2.cxx
index 04631d87f861..f61052b4cb68 100644
--- a/sd/source/ui/view/drviews2.cxx
+++ b/sd/source/ui/view/drviews2.cxx
@@ -1286,7 +1286,6 @@ 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();
weld::Window* pFrame = GetFrameWeld();
GraphicAttr aGraphicAttr = pObj->GetGraphicAttr();
short nState = RET_CANCEL;
@@ -1304,12 +1303,12 @@ void DrawViewShell::FuTemporary(SfxRequest& rReq)
if (nState == RET_YES)
{
- GraphicHelper::ExportGraphic(pWin, pObj->GetTransformedGraphic(), "");
+ GraphicHelper::ExportGraphic(pFrame, pObj->GetTransformedGraphic(), "");
}
else if (nState == RET_NO)
{
GraphicObject aGraphicObject(pObj->GetGraphicObject());
- GraphicHelper::ExportGraphic(pWin, aGraphicObject.GetGraphic(), "");
+ GraphicHelper::ExportGraphic(pFrame, aGraphicObject.GetGraphic(), "");
}
}
}
diff --git a/sfx2/source/appl/appopen.cxx b/sfx2/source/appl/appopen.cxx
index e1cf3a6944a3..24bfc02def63 100644
--- a/sfx2/source/appl/appopen.cxx
+++ b/sfx2/source/appl/appopen.cxx
@@ -648,8 +648,8 @@ void SfxApplication::OpenDocExec_Impl( SfxRequest& rReq )
if ( pBlackListItem )
pBlackListItem->GetStringList( aBlackList );
-
- ErrCode nErr = sfx2::FileOpenDialog_Impl(GetTopWindow(),
+ vcl::Window* pTopWindow = GetTopWindow();
+ ErrCode nErr = sfx2::FileOpenDialog_Impl(pTopWindow ? pTopWindow->GetFrameWeld() : nullptr,
nDialogType,
eDialogFlags, aURLList,
aFilter, pSet, &aPath, nDialog, sStandardDir, aBlackList);
diff --git a/sfx2/source/appl/fileobj.cxx b/sfx2/source/appl/fileobj.cxx
index ebe5b37de43c..5918ba7a6c09 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(weld::Window* pParent, sfx2::SvBaseLink* pLink, const Link<const OUString&, void>& rEndEditHdl)
{
aEndEditLink = rEndEditHdl;
OUString sFile, sRange, sTmpFilter;
diff --git a/sfx2/source/appl/fileobj.hxx b/sfx2/source/appl/fileobj.hxx
index 1b735e0c4414..f55e7885713d 100644
--- a/sfx2/source/appl/fileobj.hxx
+++ b/sfx2/source/appl/fileobj.hxx
@@ -68,7 +68,7 @@ public:
bool bSynchron = false ) override;
virtual bool Connect( sfx2::SvBaseLink* ) override;
- virtual void Edit( vcl::Window *, sfx2::SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl ) override;
+ virtual void Edit(weld::Window *, sfx2::SvBaseLink *, const Link<const OUString&, void>& rEndEditHdl) override;
// Ask whether you can access data directly or whether it has to be triggered
virtual bool IsPending() const override;
diff --git a/sfx2/source/appl/impldde.cxx b/sfx2/source/appl/impldde.cxx
index 280cd6da21c1..9280b36381c8 100644
--- a/sfx2/source/appl/impldde.cxx
+++ b/sfx2/source/appl/impldde.cxx
@@ -27,10 +27,7 @@
#include <comphelper/string.hxx>
#include <vcl/svapp.hxx>
-#include <vcl/fixed.hxx>
-#include <vcl/edit.hxx>
-#include <vcl/button.hxx>
-#include <vcl/dialog.hxx>
+#include <vcl/weld.hxx>
#include <sot/exchange.hxx>
#include <rtl/strbuf.hxx>
#include <rtl/ustring.hxx>
@@ -52,69 +49,52 @@ using namespace ::com::sun::star::uno;
namespace sfx2
{
-class SvDDELinkEditDialog : public ModalDialog
+class SvDDELinkEditDialog : public weld::GenericDialogController
{
- VclPtr<Edit> m_pEdDdeApp;
- VclPtr<Edit> m_pEdDdeTopic;
- VclPtr<Edit> m_pEdDdeItem;
- VclPtr<OKButton> m_pOKButton;
+ std::unique_ptr<weld::Entry> m_xEdDdeApp;
+ std::unique_ptr<weld::Entry> m_xEdDdeTopic;
+ std::unique_ptr<weld::Entry> m_xEdDdeItem;
+ std::unique_ptr<weld::Button> m_xOKButton;
- DECL_LINK( EditHdl_Impl, Edit&, void );
+ DECL_LINK(EditHdl_Impl, weld::Entry&, void);
public:
- SvDDELinkEditDialog( vcl::Window* pParent, SvBaseLink const * );
- virtual ~SvDDELinkEditDialog() override;
- virtual void dispose() override;
+ SvDDELinkEditDialog(weld::Window* pParent, SvBaseLink const*);
OUString GetCmd() const;
};
-SvDDELinkEditDialog::SvDDELinkEditDialog( vcl::Window* pParent, SvBaseLink const * pLink )
- : ModalDialog( pParent, "LinkEditDialog", "sfx/ui/linkeditdialog.ui" )
+SvDDELinkEditDialog::SvDDELinkEditDialog(weld::Window* pParent, SvBaseLink const * pLink)
+ : GenericDialogController(pParent, "sfx/ui/linkeditdialog.ui", "LinkEditDialog")
+ , m_xEdDdeApp(m_xBuilder->weld_entry("app"))
+ , m_xEdDdeTopic(m_xBuilder->weld_entry("file"))
+ , m_xEdDdeItem(m_xBuilder->weld_entry("category"))
+ , m_xOKButton(m_xBuilder->weld_button("ok"))
{
- get(m_pOKButton, "ok");
- get(m_pEdDdeApp, "app");
- get(m_pEdDdeTopic, "file");
- get(m_pEdDdeItem, "category");
-
OUString sServer, sTopic, sItem;
sfx2::LinkManager::GetDisplayNames( pLink, &sServer, &sTopic, &sItem );
- m_pEdDdeApp->SetText( sServer );
- m_pEdDdeTopic->SetText( sTopic );
- m_pEdDdeItem->SetText( sItem );
-
- m_pEdDdeApp->SetModifyHdl( LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
- m_pEdDdeTopic->SetModifyHdl( LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
- m_pEdDdeItem->SetModifyHdl( LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
+ m_xEdDdeApp->set_text( sServer );
+ m_xEdDdeTopic->set_text( sTopic );
+ m_xEdDdeItem->set_text( sItem );
- m_pOKButton->Enable( !sServer.isEmpty() && !sTopic.isEmpty() && !sItem.isEmpty() );
-}
+ m_xEdDdeApp->connect_changed( LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
+ m_xEdDdeTopic->connect_changed( LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
+ m_xEdDdeItem->connect_changed( LINK( this, SvDDELinkEditDialog, EditHdl_Impl));
-SvDDELinkEditDialog::~SvDDELinkEditDialog()
-{
- disposeOnce();
-}
-
-void SvDDELinkEditDialog::dispose()
-{
- m_pEdDdeApp.clear();
- m_pEdDdeTopic.clear();
- m_pEdDdeItem.clear();
- m_pOKButton.clear();
- ModalDialog::dispose();
+ m_xOKButton->set_sensitive(!sServer.isEmpty() && !sTopic.isEmpty() && !sItem.isEmpty());
}
OUString SvDDELinkEditDialog::GetCmd() const
{
- OUString sCmd( m_pEdDdeApp->GetText() ), sRet;
- ::sfx2::MakeLnkName( sRet, &sCmd, m_pEdDdeTopic->GetText(), m_pEdDdeItem->GetText() );
+ OUString sCmd( m_xEdDdeApp->get_text() ), sRet;
+ ::sfx2::MakeLnkName( sRet, &sCmd, m_xEdDdeTopic->get_text(), m_xEdDdeItem->get_text() );
return sRet;
}
-IMPL_LINK_NOARG( SvDDELinkEditDialog, EditHdl_Impl, Edit&, void)
+IMPL_LINK_NOARG( SvDDELinkEditDialog, EditHdl_Impl, weld::Entry&, void)
{
- m_pOKButton->Enable( !m_pEdDdeApp->GetText().isEmpty() &&
- !m_pEdDdeTopic->GetText().isEmpty() &&
- !m_pEdDdeItem->GetText().isEmpty() );
+ m_xOKButton->set_sensitive(!m_xEdDdeApp->get_text().isEmpty() &&
+ !m_xEdDdeTopic->get_text().isEmpty() &&
+ !m_xEdDdeItem->get_text().isEmpty() );
}
SvDDEObject::SvDDEObject()
@@ -251,12 +231,12 @@ bool SvDDEObject::Connect( SvBaseLink * pSvLink )
return true;
}
-void SvDDEObject::Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<const OUString&, void>& rEndEditHdl )
+void SvDDEObject::Edit(weld::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<const OUString&, void>& rEndEditHdl)
{
- ScopedVclPtrInstance< SvDDELinkEditDialog > aDlg(pParent, pBaseLink);
- if ( RET_OK == aDlg->Execute() && rEndEditHdl.IsSet() )
+ SvDDELinkEditDialog aDlg(pParent, pBaseLink);
+ if (RET_OK == aDlg.run() && rEndEditHdl.IsSet())
{
- OUString sCommand = aDlg->GetCmd();
+ OUString sCommand = aDlg.GetCmd();
rEndEditHdl.Call( sCommand );
}
}
diff --git a/sfx2/source/appl/impldde.hxx b/sfx2/source/appl/impldde.hxx
index d161a783fa61..68bb0cd113d2 100644
--- a/sfx2/source/appl/impldde.hxx
+++ b/sfx2/source/appl/impldde.hxx
@@ -58,7 +58,7 @@ public:
bool bSynchron = false ) override;
virtual bool Connect( SvBaseLink * ) override;
- virtual void Edit( vcl::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<const OUString&, void>& rEndEditHdl ) override;
+ virtual void Edit(weld::Window* pParent, sfx2::SvBaseLink* pBaseLink, const Link<const OUString&, void>& rEndEditHdl) override;
virtual bool IsPending() const override;
virtual bool IsDataComplete() const override;
diff --git a/sfx2/source/appl/linksrc.cxx b/sfx2/source/appl/linksrc.cxx
index ca97b745a814..6d172d202f79 100644
--- a/sfx2/source/appl/linksrc.cxx
+++ b/sfx2/source/appl/linksrc.cxx
@@ -404,7 +404,7 @@ bool SvLinkSource::GetData( css::uno::Any &, const OUString &, bool )
return false;
}
-void SvLinkSource::Edit( vcl::Window *, SvBaseLink *, const Link<const OUString&, void>& )
+void SvLinkSource::Edit(weld::Window *, SvBaseLink *, const Link<const OUString&, void>&)
{
}
diff --git a/sfx2/source/appl/lnkbase2.cxx b/sfx2/source/appl/lnkbase2.cxx
index 82c6129b11bf..1c5b6154db73 100644
--- a/sfx2/source/appl/lnkbase2.cxx
+++ b/sfx2/source/appl/lnkbase2.cxx
@@ -47,7 +47,7 @@ struct BaseLink_Impl
{
Link<SvBaseLink&,void> m_aEndEditLink;
LinkManager* m_pLinkMgr;
- VclPtr<vcl::Window> m_pParentWin;
+ weld::Window* m_pParentWin;
std::unique_ptr<FileDialogHelper>
m_pFileDlg;
bool m_bIsConnect;
@@ -447,7 +447,7 @@ SvBaseLink::UpdateResult SvBaseLink::DataChanged( const OUString &, const css::u
return SUCCESS;
}
-void SvBaseLink::Edit( vcl::Window* pParent, const Link<SvBaseLink&,void>& rEndEditHdl )
+void SvBaseLink::Edit(weld::Window* pParent, const Link<SvBaseLink&,void>& rEndEditHdl )
{
pImpl->m_pParentWin = pParent;
pImpl->m_aEndEditLink = rEndEditHdl;
@@ -516,7 +516,7 @@ bool SvBaseLink::ExecuteEdit( const OUString& _rNewName )
else
return false;
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pImpl->m_pParentWin->GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(pImpl->m_pParentWin,
VclMessageType::Warning, VclButtonsType::Ok, sError));
xBox->run();
}
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index a43d8eb53100..d1775a8a5940 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -70,7 +70,7 @@ const char* SvxOpenGrfErr2ResId( ErrCode err )
struct SvxOpenGrf_Impl
{
- SvxOpenGrf_Impl(const vcl::Window* pPreferredParent,
+ SvxOpenGrf_Impl(weld::Window* pPreferredParent,
sal_Int16 nDialogType);
sfx2::FileDialogHelper aFileDlg;
@@ -79,7 +79,7 @@ struct SvxOpenGrf_Impl
};
-SvxOpenGrf_Impl::SvxOpenGrf_Impl(const vcl::Window* pPreferredParent,
+SvxOpenGrf_Impl::SvxOpenGrf_Impl(weld::Window* pPreferredParent,
sal_Int16 nDialogType)
: aFileDlg(nDialogType, FileDialogFlags::Graphic, pPreferredParent)
{
@@ -88,13 +88,13 @@ SvxOpenGrf_Impl::SvxOpenGrf_Impl(const vcl::Window* pPreferredParent,
}
-SvxOpenGraphicDialog::SvxOpenGraphicDialog(const OUString& rTitle, const vcl::Window* pPreferredParent)
+SvxOpenGraphicDialog::SvxOpenGraphicDialog(const OUString& rTitle, weld::Window* pPreferredParent)
: mpImpl(new SvxOpenGrf_Impl(pPreferredParent, ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW))
{
mpImpl->aFileDlg.SetTitle(rTitle);
}
-SvxOpenGraphicDialog::SvxOpenGraphicDialog(const OUString& rTitle, const vcl::Window* pPreferredParent,
+SvxOpenGraphicDialog::SvxOpenGraphicDialog(const OUString& rTitle, weld::Window* pPreferredParent,
sal_Int16 nDialogType)
: mpImpl(new SvxOpenGrf_Impl(pPreferredParent, nDialogType))
{
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index 60b279fe2d0a..be129dabac5f 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(), SfxFilterFlags::NONE, SfxFilterFlags::NONE, static_cast<const vcl::Window*>(nullptr) );
+ 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 c8f2ad762e85..5e4055195eb5 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -851,8 +851,6 @@ css::uno::Reference<css::awt::XWindow> FileDialogHelper_Impl::GetFrameInterface(
{
if (mpFrameWeld)
return mpFrameWeld->GetXWindow();
- if (mpPreferredParentWindow)
- return VCLUnoHelper::GetInterface(mpPreferredParentWindow);
return css::uno::Reference<css::awt::XWindow>();
}
@@ -861,7 +859,6 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
sal_Int16 nDialogType,
FileDialogFlags nFlags,
sal_Int16 nDialog,
- const vcl::Window* pPreferredParentWindow,
weld::Window* pFrameWeld,
const OUString& sStandardDir,
const css::uno::Sequence< OUString >& rBlackList
@@ -891,7 +888,6 @@ FileDialogHelper_Impl::FileDialogHelper_Impl(
// create the file open dialog
// the flags can be SFXWB_INSERT or SFXWB_MULTISELECTION
- mpPreferredParentWindow = pPreferredParentWindow ? pPreferredParentWindow->GetSystemWindow() : nullptr;
mpFrameWeld = pFrameWeld;
mpAntiImpl = _pAntiImpl;
mbHasAutoExt = false;
@@ -1550,7 +1546,7 @@ ErrCode FileDialogHelper_Impl::execute( std::vector<OUString>& rpURLList,
}
catch( const IllegalArgumentException& )
{
- std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(GetFrameWeld(),
+ std::unique_ptr<weld::MessageDialog> xBox(Application::CreateMessageDialog(mpFrameWeld,
VclMessageType::Warning, VclButtonsType::Ok,
SfxResId(RID_SVXSTR_GPG_ENCRYPT_FAILURE)));
xBox->run();
@@ -2284,25 +2280,9 @@ FileDialogHelper::FileDialogHelper(
const OUString& rFact,
SfxFilterFlags nMust,
SfxFilterFlags nDont,
- const vcl::Window* pPreferredParent)
- : m_nError(0),
- mpImpl(new FileDialogHelper_Impl(this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, pPreferredParent, nullptr))
-{
-
- // create the list of filters
- mpImpl->addFilters(
- SfxObjectShell::GetServiceNameFromFactory(rFact), nMust, nDont );
-}
-
-FileDialogHelper::FileDialogHelper(
- sal_Int16 nDialogType,
- FileDialogFlags nFlags,
- const OUString& rFact,
- SfxFilterFlags nMust,
- SfxFilterFlags nDont,
weld::Window* pPreferredParent)
: m_nError(0),
- mpImpl(new FileDialogHelper_Impl(this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, nullptr, pPreferredParent))
+ mpImpl(new FileDialogHelper_Impl(this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, pPreferredParent))
{
// create the list of filters
@@ -2319,27 +2299,18 @@ FileDialogHelper::FileDialogHelper(
SfxFilterFlags nDont,
const OUString& rStandardDir,
const css::uno::Sequence< OUString >& rBlackList,
- const vcl::Window* pPreferredParent)
+ weld::Window* pPreferredParent)
: m_nError(0),
- mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, nDialog, pPreferredParent, nullptr, rStandardDir, rBlackList ) )
+ mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, nDialog, pPreferredParent, rStandardDir, rBlackList ) )
{
// create the list of filters
mpImpl->addFilters(
SfxObjectShell::GetServiceNameFromFactory(rFact), nMust, nDont );
}
-FileDialogHelper::FileDialogHelper(
- sal_Int16 nDialogType,
- FileDialogFlags nFlags,
- const vcl::Window* pPreferredParent )
- : m_nError(0),
- mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, pPreferredParent, nullptr ) )
-{
-}
-
FileDialogHelper::FileDialogHelper(sal_Int16 nDialogType, FileDialogFlags nFlags, weld::Window* pPreferredParent)
: m_nError(0),
- mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, nullptr, pPreferredParent ) )
+ mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, pPreferredParent ) )
{
}
@@ -2350,9 +2321,9 @@ FileDialogHelper::FileDialogHelper(
const OUString& aExtName,
const OUString& rStandardDir,
const css::uno::Sequence< OUString >& rBlackList,
- const vcl::Window* pPreferredParent )
+ weld::Window* pPreferredParent )
: m_nError(0),
- mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, pPreferredParent, nullptr, rStandardDir, rBlackList ) )
+ mpImpl( new FileDialogHelper_Impl( this, nDialogType, nFlags, SFX2_IMPL_DIALOG_CONFIG, pPreferredParent, rStandardDir, rBlackList ) )
{
// the wildcard here is expected in form "*.extension"
OUString aWildcard;
@@ -2661,7 +2632,7 @@ void FileDialogHelper::DialogClosed( const DialogClosedEvent& _rEvent )
m_aDialogClosedLink.Call( this );
}
-ErrCode FileOpenDialog_Impl( const vcl::Window* pParent,
+ErrCode FileOpenDialog_Impl( weld::Window* pParent,
sal_Int16 nDialogType,
FileDialogFlags nFlags,
std::vector<OUString>& rpURLList,
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 0d7de0b2cf22..f2313ebff134 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -52,7 +52,6 @@ namespace sfx2
SfxFilterMatcher* mpMatcher;
std::unique_ptr<GraphicFilter> mpGraphicFilter;
FileDialogHelper* mpAntiImpl;
- VclPtr<vcl::Window> mpPreferredParentWindow;
weld::Window* mpFrameWeld;
::std::vector< OUString > mlLastURLs;
@@ -172,7 +171,7 @@ namespace sfx2
const short nDialogType,
FileDialogFlags nFlags,
sal_Int16 nDialog,
- const vcl::Window* _pPreferredParentWindow, weld::Window* pFrameWeld,
+ weld::Window* pFrameWeld,
const OUString& sStandardDir = OUString(),
const css::uno::Sequence< OUString >& rBlackList = css::uno::Sequence< OUString >()
);
@@ -211,15 +210,6 @@ namespace sfx2
bool isSystemFilePicker() const { return mbSystemPicker; }
bool isPasswordEnabled() const { return mbIsPwdEnabled; }
- weld::Window* GetFrameWeld()
- {
- if (mpFrameWeld)
- return mpFrameWeld;
- if (mpPreferredParentWindow)
- return mpPreferredParentWindow->GetFrameWeld();
- return nullptr;
- }
-
css::uno::Reference<css::awt::XWindow> GetFrameInterface();
};
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 33ff0c1a1099..ad262468313e 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -73,8 +73,8 @@ FileDialogFlags lcl_map_mode_to_flags(const sfx2::DocumentInserter::Mode mode)
namespace sfx2 {
-DocumentInserter::DocumentInserter(vcl::Window* pParent, const OUString& rFactory, const Mode mode)
- : m_xParent ( pParent )
+DocumentInserter::DocumentInserter(weld::Window* pParent, const OUString& rFactory, const Mode mode)
+ : m_pParent ( pParent )
, m_sDocFactory ( rFactory )
, m_nDlgFlags ( lcl_map_mode_to_flags(mode) )
, m_nError ( ERRCODE_NONE )
@@ -95,7 +95,7 @@ void DocumentInserter::StartExecuteModal( const Link<sfx2::FileDialogHelper*,voi
{
m_pFileDlg.reset( new FileDialogHelper(
ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- m_nDlgFlags, m_sDocFactory, SfxFilterFlags::NONE, SfxFilterFlags::NONE, m_xParent ) );
+ m_nDlgFlags, m_sDocFactory, SfxFilterFlags::NONE, SfxFilterFlags::NONE, m_pParent ) );
}
m_pFileDlg->StartExecuteModal( LINK( this, DocumentInserter, DialogClosedHdl ) );
}
@@ -215,7 +215,7 @@ IMPL_LINK_NOARG(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*, void
if ( ( aValue >>= bPassWord ) && bPassWord )
{
// ask for the password
- SfxPasswordDialog aPasswordDlg(m_xParent ? m_xParent->GetFrameWeld() : nullptr);
+ SfxPasswordDialog aPasswordDlg(m_pParent);
aPasswordDlg.ShowExtras( SfxShowExtras::CONFIRM );
short nRet = aPasswordDlg.execute();
if ( RET_OK == nRet )
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index cbdde2efbb52..428d9d35128f 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -867,6 +867,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int16 nStoreMode,
SfxFilterFlags nDont = getDontFlags( nStoreMode );
sfx2::FileDialogHelper::Context eCtxt = sfx2::FileDialogHelper::UNKNOWN_CONTEXT;
vcl::Window* pWin = SfxStoringHelper::GetModelWindow( m_xModel );
+ weld::Window* pFrameWin = pWin ? pWin->GetFrameWeld() : nullptr;
if ( ( nStoreMode & EXPORT_REQUESTED ) && !( nStoreMode & WIDEEXPORT_REQUESTED ) )
{
if ( ( nStoreMode & PDFEXPORT_REQUESTED ) && !aPreselectedFilterPropsHM.empty() )
@@ -874,20 +875,20 @@ bool ModelData_Impl::OutputFileDialog( sal_Int16 nStoreMode,
// this is a PDF export
// the filter options has been shown already
const OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( "UIName", OUString() );
- pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, "pdf", rStandardDir, rBlackList, pWin ));
+ pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aFilterUIName, "pdf", rStandardDir, rBlackList, pFrameWin ));
pFileDlg->SetCurrentFilter( aFilterUIName );
}
else if ((nStoreMode & EPUBEXPORT_REQUESTED) && !aPreselectedFilterPropsHM.empty())
{
// This is an EPUB export, the filter options has been shown already.
const OUString aFilterUIName = aPreselectedFilterPropsHM.getUnpackedValueOrDefault( "UIName", OUString() );
- pFileDlg.reset(new sfx2::FileDialogHelper(aDialogMode, aDialogFlags, aFilterUIName, "epub", rStandardDir, rBlackList, pWin));
+ pFileDlg.reset(new sfx2::FileDialogHelper(aDialogMode, aDialogFlags, aFilterUIName, "epub", rStandardDir, rBlackList, pFrameWin));
pFileDlg->SetCurrentFilter(aFilterUIName);
}
else
{
// This is the normal dialog
- pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, nMust, nDont, rStandardDir, rBlackList, pWin ));
+ pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog, nMust, nDont, rStandardDir, rBlackList, pFrameWin ));
}
if ( aDocServiceName == "com.sun.star.drawing.DrawingDocument" )
@@ -916,7 +917,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int16 nStoreMode,
{
// This is the normal dialog
pFileDlg.reset(new sfx2::FileDialogHelper( aDialogMode, aDialogFlags, aDocServiceName, nDialog,
- nMust, nDont, rStandardDir, rBlackList, pWin ));
+ nMust, nDont, rStandardDir, rBlackList, pFrameWin ));
pFileDlg->CreateMatcher( aDocServiceName );
}
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx
index b9c728e19475..03459cd9cfff 100644
--- a/sfx2/source/doc/templatedlg.cxx
+++ b/sfx2/source/doc/templatedlg.cxx
@@ -891,7 +891,7 @@ void SfxTemplateManagerDlg::OnTemplateState (const ThumbnailViewItem *pItem)
void SfxTemplateManagerDlg::OnTemplateImportCategory(const OUString& sCategory)
{
sfx2::FileDialogHelper aFileDlg(css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::MultiSelection, this);
+ FileDialogFlags::MultiSelection, GetFrameWeld());
// add "All" filter
aFileDlg.AddFilter( SfxResId(STR_SFX_FILTERNAME_ALL),
diff --git a/sfx2/uiconfig/ui/linkeditdialog.ui b/sfx2/uiconfig/ui/linkeditdialog.ui
index d15188d09c38..de9602b39bb9 100644
--- a/sfx2/uiconfig/ui/linkeditdialog.ui
+++ b/sfx2/uiconfig/ui/linkeditdialog.ui
@@ -1,10 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- Generated with glade 3.20.2 -->
+<!-- Generated with glade 3.20.4 -->
<interface domain="sfx">
<requires lib="gtk+" version="3.18"/>
<object class="GtkDialog" id="LinkEditDialog">
<property name="can_focus">False</property>
<property name="border_width">6</property>
+ <property name="modal">True</property>
+ <property name="default_width">0</property>
+ <property name="default_height">0</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<object class="GtkBox" id="dialog-vbox1">
diff --git a/starmath/source/view.cxx b/starmath/source/view.cxx
index 4da22fca82c9..23420cd111aa 100644
--- a/starmath/source/view.cxx
+++ b/starmath/source/view.cxx
@@ -1570,7 +1570,7 @@ void SmViewShell::Execute(SfxRequest& rReq)
case SID_IMPORT_FORMULA:
{
mpImpl->pRequest.reset(new SfxRequest( rReq ));
- mpImpl->pDocInserter.reset(new ::sfx2::DocumentInserter(pWin,
+ mpImpl->pDocInserter.reset(new ::sfx2::DocumentInserter(pWin ? pWin->GetFrameWeld() : nullptr,
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 918cb173a525..db2f885d087c 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -180,7 +180,7 @@ bool lcl_ExecuteFilterDialog( const Sequence< PropertyValue >& rPropsForDialog,
}
} // anonymous ns
-OUString GraphicHelper::ExportGraphic(const vcl::Window* pParent, const Graphic& rGraphic, const OUString& rGraphicName)
+OUString GraphicHelper::ExportGraphic(weld::Window* pParent, const Graphic& rGraphic, const OUString& rGraphicName)
{
SvtPathOptions aPathOpt;
OUString sGraphicsPath( aPathOpt.GetGraphicPath() );
@@ -337,7 +337,7 @@ OUString GraphicHelper::ExportGraphic(const vcl::Window* pParent, const Graphic&
return OUString();
}
-void GraphicHelper::SaveShapeAsGraphic(const vcl::Window* pParent, const Reference< drawing::XShape >& xShape)
+void GraphicHelper::SaveShapeAsGraphic(weld::Window* pParent, const Reference< drawing::XShape >& xShape)
{
try
{
diff --git a/svx/source/dialog/imapdlg.cxx b/svx/source/dialog/imapdlg.cxx
index 6f4a1d739e3a..3824265961b2 100644
--- a/svx/source/dialog/imapdlg.cxx
+++ b/svx/source/dialog/imapdlg.cxx
@@ -449,7 +449,7 @@ void SvxIMapDlg::DoOpen()
{
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
ImageMap aLoadIMap;
const OUString aFilter(SvxResId(RID_SVXSTR_IMAP_ALL_FILTER));
@@ -489,7 +489,7 @@ bool SvxIMapDlg::DoSave()
{
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILESAVE_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
const OUString aBinFilter( IMAP_BINARY_FILTER );
const OUString aCERNFilter( IMAP_CERN_FILTER );
diff --git a/svx/source/form/databaselocationinput.cxx b/svx/source/form/databaselocationinput.cxx
index f081ba554bb7..ad45af630a2a 100644
--- a/svx/source/form/databaselocationinput.cxx
+++ b/svx/source/form/databaselocationinput.cxx
@@ -228,7 +228,7 @@ namespace svx
::sfx2::FileDialogHelper aFileDlg(
TemplateDescription::FILESAVE_AUTOEXTENSION,
FileDialogFlags::NONE,
- m_rLocationInput.GetSystemWindow()
+ m_rLocationInput.GetFrameWeld()
);
aFileDlg.SetDisplayDirectory( impl_getCurrentURL() );
diff --git a/svx/source/form/datanavi.cxx b/svx/source/form/datanavi.cxx
index fae5749f1f0c..3afc291316e1 100644
--- a/svx/source/form/datanavi.cxx
+++ b/svx/source/form/datanavi.cxx
@@ -3387,7 +3387,7 @@ namespace svxform
{
::sfx2::FileDialogHelper aDlg(
css::ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE,
- FileDialogFlags::NONE, this);
+ FileDialogFlags::NONE, GetFrameWeld());
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 79053e69db68..d89495d9c732 100644
--- a/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
+++ b/svx/source/sidebar/area/AreaPropertyPanelBase.cxx
@@ -197,7 +197,7 @@ void AreaPropertyPanelBase::SetTransparency(sal_uInt16 nVal)
IMPL_LINK_NOARG(AreaPropertyPanelBase, ClickImportBitmapHdl, Button*, void)
{
- SvxOpenGraphicDialog aDlg("Import", this);
+ SvxOpenGraphicDialog aDlg("Import", GetFrameWeld());
aDlg.EnableLink(false);
if( aDlg.Execute() == ERRCODE_NONE )
{
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() )
diff --git a/writerperfect/source/writer/EPUBExportDialog.cxx b/writerperfect/source/writer/EPUBExportDialog.cxx
index bbd241bb7b63..c01bc32ec111 100644
--- a/writerperfect/source/writer/EPUBExportDialog.cxx
+++ b/writerperfect/source/writer/EPUBExportDialog.cxx
@@ -182,7 +182,7 @@ IMPL_LINK_NOARG(EPUBExportDialog, LayoutSelectHdl, ListBox &, void)
IMPL_LINK_NOARG(EPUBExportDialog, CoverClickHdl, Button *, void)
{
- SvxOpenGraphicDialog aDlg("Import", this);
+ SvxOpenGraphicDialog aDlg("Import", GetFrameWeld());
aDlg.EnableLink(false);
if (aDlg.Execute() == ERRCODE_NONE)
m_pCoverPath->SetText(aDlg.GetPath());