summaryrefslogtreecommitdiff
path: root/cui/source
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2021-06-21 12:30:34 +0100
committerCaolán McNamara <caolanm@redhat.com>2021-06-21 15:29:59 +0200
commita8f97e5fca148804056295db2e3910aaa5c68ce8 (patch)
tree594c079c6552ccf49e833158f07be2892e2d8622 /cui/source
parentefacb4bc357761f5d849a4905eff981aa14eb366 (diff)
bundle the FolderPicker instantiations behind a single call
in prep to add parent support Change-Id: I2aa4b9343f895ae866f600dd3260b7fdc4e1efec Reviewed-on: https://gerrit.libreoffice.org/c/core/+/117579 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'cui/source')
-rw-r--r--cui/source/dialogs/cuigaldlg.cxx3
-rw-r--r--cui/source/dialogs/hldocntp.cxx3
-rw-r--r--cui/source/dialogs/linkdlg.cxx4
-rw-r--r--cui/source/dialogs/multipat.cxx5
-rw-r--r--cui/source/options/certpath.cxx4
-rw-r--r--cui/source/options/optjava.cxx4
-rw-r--r--cui/source/options/optpath.cxx2
-rw-r--r--cui/source/options/optupdt.cxx3
8 files changed, 18 insertions, 10 deletions
diff --git a/cui/source/dialogs/cuigaldlg.cxx b/cui/source/dialogs/cuigaldlg.cxx
index aa764baff52d..3a0dcb8a69c9 100644
--- a/cui/source/dialogs/cuigaldlg.cxx
+++ b/cui/source/dialogs/cuigaldlg.cxx
@@ -30,6 +30,7 @@
#include <vcl/weld.hxx>
#include <avmedia/mediawindow.hxx>
#include <unotools/pathoptions.hxx>
+#include <sfx2/filedlghelper.hxx>
#include <sfx2/opengrf.hxx>
#include <vcl/graphicfilter.hxx>
#include <svx/gallery1.hxx>
@@ -817,7 +818,7 @@ IMPL_LINK_NOARG(TPGalleryThemeProperties, ClickSearchHdl, weld::Button&, void)
{
// setup folder picker
css::uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- xFolderPicker = FolderPicker::create(xContext);
+ xFolderPicker = sfx2::createFolderPicker(xContext, GetFrameWeld());
OUString aDlgPathName( SvtPathOptions().GetGraphicPath() );
xFolderPicker->setDisplayDirectory(aDlgPathName);
diff --git a/cui/source/dialogs/hldocntp.cxx b/cui/source/dialogs/hldocntp.cxx
index 3a582764f40e..31b3ba2d5de4 100644
--- a/cui/source/dialogs/hldocntp.cxx
+++ b/cui/source/dialogs/hldocntp.cxx
@@ -19,6 +19,7 @@
#include <hldocntp.hxx>
#include <osl/file.hxx>
+#include <sfx2/filedlghelper.hxx>
#include <sfx2/viewfrm.hxx>
#include <sfx2/docfilt.hxx>
#include <svl/stritem.hxx>
@@ -405,7 +406,7 @@ IMPL_LINK_NOARG(SvxHyperlinkNewDocTp, ClickNewHdl_Impl, weld::Button&, void)
{
DisableClose( true );
uno::Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference < XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext);
+ uno::Reference < XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, mpDialog->getDialog());
OUString aStrURL;
OUString aTempStrURL( m_xCbbPath->get_active_text() );
diff --git a/cui/source/dialogs/linkdlg.cxx b/cui/source/dialogs/linkdlg.cxx
index dedac54049d7..b4a494a20886 100644
--- a/cui/source/dialogs/linkdlg.cxx
+++ b/cui/source/dialogs/linkdlg.cxx
@@ -29,6 +29,7 @@
#include <vcl/weldutils.hxx>
#include <strings.hrc>
+#include <sfx2/filedlghelper.hxx>
#include <sfx2/linkmgr.hxx>
#include <sfx2/linksrc.hxx>
#include <sfx2/lnkbase.hxx>
@@ -297,7 +298,8 @@ IMPL_LINK_NOARG(SvBaseLinksDlg, ChangeSourceClickHdl, weld::Button&, void)
{
try
{
- uno::Reference<ui::dialogs::XFolderPicker2> xFolderPicker = ui::dialogs::FolderPicker::create(comphelper::getProcessComponentContext());
+ uno::Reference<ui::dialogs::XFolderPicker2> xFolderPicker = sfx2::createFolderPicker(
+ comphelper::getProcessComponentContext(), m_xDialog.get());
OUString sType, sFile, sLinkName;
OUString sFilter;
diff --git a/cui/source/dialogs/multipat.cxx b/cui/source/dialogs/multipat.cxx
index 249a116b1d5e..aba063eb7b13 100644
--- a/cui/source/dialogs/multipat.cxx
+++ b/cui/source/dialogs/multipat.cxx
@@ -20,6 +20,7 @@
#include <sal/config.h>
#include <osl/file.hxx>
+#include <sfx2/filedlghelper.hxx>
#include <tools/urlobj.hxx>
#include <vcl/svapp.hxx>
#include <vcl/weld.hxx>
@@ -87,7 +88,7 @@ void SvxMultiPathDialog::AppendEntry(const OUString& rText, const OUString& rId)
IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, weld::Button&, void)
{
Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- Reference < XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext);
+ Reference < XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, m_xDialog.get());
if ( xFolderPicker->execute() != ExecutableDialogResults::OK )
return;
@@ -117,7 +118,7 @@ IMPL_LINK_NOARG(SvxMultiPathDialog, AddHdl_Impl, weld::Button&, void)
IMPL_LINK_NOARG(SvxPathSelectDialog, AddHdl_Impl, weld::Button&, void)
{
Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- Reference < XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext);
+ Reference < XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, m_xDialog.get());
if ( xFolderPicker->execute() != ExecutableDialogResults::OK )
return;
diff --git a/cui/source/options/certpath.cxx b/cui/source/options/certpath.cxx
index b82065868f09..0932ac2e7a84 100644
--- a/cui/source/options/certpath.cxx
+++ b/cui/source/options/certpath.cxx
@@ -10,6 +10,7 @@
#include <officecfg/Office/Common.hxx>
#include <osl/file.hxx>
#include <osl/security.hxx>
+#include <sfx2/filedlghelper.hxx>
#include <tools/diagnose_ex.h>
#include "certpath.hxx"
@@ -208,7 +209,8 @@ IMPL_LINK_NOARG(CertPathDialog, ManualHdl_Impl, weld::Button&, void)
{
try
{
- uno::Reference<ui::dialogs::XFolderPicker2> xFolderPicker = ui::dialogs::FolderPicker::create(comphelper::getProcessComponentContext());
+ uno::Reference<ui::dialogs::XFolderPicker2> xFolderPicker = sfx2::createFolderPicker(
+ comphelper::getProcessComponentContext(), m_xDialog.get());
OUString sURL;
if (!m_sManualPath.isEmpty())
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index c074c9cf1ccb..a21c5b2b0bf8 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -153,7 +153,7 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, AddHdl_Impl, weld::Button&, void)
try
{
Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- xFolderPicker = FolderPicker::create(xContext);
+ xFolderPicker = sfx2::createFolderPicker(xContext, GetFrameWeld());
OUString sWorkFolder = SvtPathOptions().GetWorkPath();
xFolderPicker->setDisplayDirectory( sWorkFolder );
@@ -825,7 +825,7 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl, weld::Button&, void)
IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl, weld::Button&, void)
{
Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- Reference < XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext);
+ Reference < XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, m_xDialog.get());
OUString sOldFolder;
if (m_xPathList->count_selected_rows() > 0)
diff --git a/cui/source/options/optpath.cxx b/cui/source/options/optpath.cxx
index e0f940219016..0fe2ec033973 100644
--- a/cui/source/options/optpath.cxx
+++ b/cui/source/options/optpath.cxx
@@ -540,7 +540,7 @@ IMPL_LINK_NOARG(SvxPathTabPage, PathHdl_Impl, weld::Button&, void)
try
{
Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- xFolderPicker = FolderPicker::create(xContext);
+ xFolderPicker = sfx2::createFolderPicker(xContext, GetFrameWeld());
INetURLObject aURL( sWritable, INetProtocol::File );
xFolderPicker->setDisplayDirectory( aURL.GetMainURL( INetURLObject::DecodeMechanism::NONE ) );
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index c9ad541e8005..19ea53f44d23 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -37,6 +37,7 @@
#include <com/sun/star/configuration/ReadWriteAccess.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/beans/NamedValue.hpp>
+#include <sfx2/filedlghelper.hxx>
#include <officecfg/Office/Common.hxx>
#include <osl/file.hxx>
#include <osl/security.hxx>
@@ -336,7 +337,7 @@ IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, ExtrasCheckHdl_Impl, weld::Toggleable&,
IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, FileDialogHdl_Impl, weld::Button&, void)
{
uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
- uno::Reference < ui::dialogs::XFolderPicker2 > xFolderPicker = ui::dialogs::FolderPicker::create(xContext);
+ uno::Reference < ui::dialogs::XFolderPicker2 > xFolderPicker = sfx2::createFolderPicker(xContext, GetFrameWeld());
OUString aURL;
if( osl::FileBase::E_None != osl::FileBase::getFileURLFromSystemPath(m_xDestPath->get_label(), aURL) )