summaryrefslogtreecommitdiff
path: root/sw/source/ui
diff options
context:
space:
mode:
authorJulien Nabet <serval2412@yahoo.fr>2015-10-05 23:27:44 +0200
committerJulien Nabet <serval2412@yahoo.fr>2015-10-07 05:05:47 +0000
commit8273350ff48f198efc9dc9c5de5519b8cbdc0cb3 (patch)
treed1587fc960b3b0a7bf30403f240d64b66de2a53d /sw/source/ui
parentf830600ece806ec365a4839e79afabe183c5e36d (diff)
Prefer getSelectedFiles to getFiles (sfx2+sw)
+ tweak files of other modules which needed it Change-Id: Ibb673eba6609734addd233ac1477698c01b94678 Reviewed-on: https://gerrit.libreoffice.org/19180 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Diffstat (limited to 'sw/source/ui')
-rw-r--r--sw/source/ui/chrdlg/chardlg.cxx6
-rw-r--r--sw/source/ui/dbui/createaddresslistdialog.cxx6
-rw-r--r--sw/source/ui/dbui/mmdocselectpage.cxx6
-rw-r--r--sw/source/ui/frmdlg/frmpage.cxx8
-rw-r--r--sw/source/ui/index/cnttab.cxx6
-rw-r--r--sw/source/ui/misc/glossary.cxx6
6 files changed, 19 insertions, 19 deletions
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 64cd58edfdae..81be5088c0f0 100644
--- a/sw/source/ui/chrdlg/chardlg.cxx
+++ b/sw/source/ui/chrdlg/chardlg.cxx
@@ -44,7 +44,7 @@
#include <chrdlg.hrc>
#include <chrdlgmodes.hxx>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
#include <SwStyleNameMapper.hxx>
#include <sfx2/filedlghelper.hxx>
#include <sfx2/viewfrm.hxx>
@@ -305,8 +305,8 @@ IMPL_LINK_NOARG_TYPED(SwCharURLPage, InsertFileHdl, Button*, void)
FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
if( aDlgHelper.Execute() == ERRCODE_NONE )
{
- Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
- m_pURLED->SetText(xFP->getFiles().getConstArray()[0]);
+ Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
+ m_pURLED->SetText(xFP->getSelectedFiles().getConstArray()[0]);
}
}
diff --git a/sw/source/ui/dbui/createaddresslistdialog.cxx b/sw/source/ui/dbui/createaddresslistdialog.cxx
index ca48c63f8e5d..dd7e599afe13 100644
--- a/sw/source/ui/dbui/createaddresslistdialog.cxx
+++ b/sw/source/ui/dbui/createaddresslistdialog.cxx
@@ -34,7 +34,7 @@
#include <sfx2/docfile.hxx>
#include <rtl/textenc.h>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <tools/urlobj.hxx>
#include <dbui.hrc>
@@ -625,7 +625,7 @@ IMPL_LINK_NOARG_TYPED(SwCreateAddressListDialog, OkHdl_Impl, Button*, void)
if(m_sURL.isEmpty())
{
sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_SIMPLE, 0 );
- uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
+ uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
const OUString sPath( SvtPathOptions().SubstituteVariable("$(userurl)/database") );
aDlgHelper.SetDisplayDirectory( sPath );
@@ -635,7 +635,7 @@ IMPL_LINK_NOARG_TYPED(SwCreateAddressListDialog, OkHdl_Impl, Button*, void)
if( ERRCODE_NONE == aDlgHelper.Execute() )
{
- m_sURL = xFP->getFiles().getConstArray()[0];
+ m_sURL = xFP->getSelectedFiles().getConstArray()[0];
INetURLObject aResult( m_sURL );
aResult.setExtension("csv");
m_sURL = aResult.GetMainURL(INetURLObject::NO_DECODE);
diff --git a/sw/source/ui/dbui/mmdocselectpage.cxx b/sw/source/ui/dbui/mmdocselectpage.cxx
index c9efadf3c8b6..2617a0cf61ee 100644
--- a/sw/source/ui/dbui/mmdocselectpage.cxx
+++ b/sw/source/ui/dbui/mmdocselectpage.cxx
@@ -35,7 +35,7 @@
#include <dbui.hrc>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
using namespace ::com::sun::star::ui::dialogs;
@@ -136,7 +136,7 @@ IMPL_LINK_TYPED(SwMailMergeDocSelectPage, FileSelectHdl, Button*, pButton, void)
if(!bTemplate)
{
sfx2::FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
- Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
+ Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
xFP->setDisplayDirectory( SvtPathOptions().GetWorkPath() );
@@ -162,7 +162,7 @@ IMPL_LINK_TYPED(SwMailMergeDocSelectPage, FileSelectHdl, Button*, pButton, void)
if( ERRCODE_NONE == aDlgHelper.Execute() )
{
- m_sLoadFileName = xFP->getFiles().getConstArray()[0];
+ m_sLoadFileName = xFP->getSelectedFiles().getConstArray()[0];
}
}
m_pWizard->UpdateRoadmap();
diff --git a/sw/source/ui/frmdlg/frmpage.cxx b/sw/source/ui/frmdlg/frmpage.cxx
index bc0ae4dc741b..9e3097c17db1 100644
--- a/sw/source/ui/frmdlg/frmpage.cxx
+++ b/sw/source/ui/frmdlg/frmpage.cxx
@@ -64,7 +64,7 @@
#include <frmui.hrc>
#include <sfx2/filedlghelper.hxx>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
#include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
#include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
#include <vcl/graphicfilter.hxx>
@@ -2584,7 +2584,7 @@ IMPL_LINK_NOARG_TYPED(SwGrfExtPage, BrowseHdl, Button*, void)
pGrfDlg->SetTitle(get<VclFrame>("linkframe")->get_label());
}
pGrfDlg->SetDisplayDirectory( m_pConnectED->GetText() );
- uno::Reference < ui::dialogs::XFilePicker > xFP = pGrfDlg->GetFilePicker();
+ uno::Reference < ui::dialogs::XFilePicker2 > xFP = pGrfDlg->GetFilePicker();
uno::Reference < ui::dialogs::XFilePickerControlAccess > xCtrlAcc(xFP, uno::UNO_QUERY);
xCtrlAcc->setValue( ui::dialogs::ExtendedFilePickerElementIds::CHECKBOX_LINK, 0, uno::makeAny(true) );
@@ -2849,7 +2849,7 @@ VclPtr<SfxTabPage> SwFrmURLPage::Create(vcl::Window *pParent, const SfxItemSet *
IMPL_LINK_NOARG_TYPED(SwFrmURLPage, InsertFileHdl, Button*, void)
{
FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 );
- uno::Reference < ui::dialogs::XFilePicker > xFP = aDlgHelper.GetFilePicker();
+ uno::Reference < ui::dialogs::XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
try
{
@@ -2863,7 +2863,7 @@ IMPL_LINK_NOARG_TYPED(SwFrmURLPage, InsertFileHdl, Button*, void)
}
if( aDlgHelper.Execute() == ERRCODE_NONE )
{
- pURLED->SetText( xFP->getFiles().getConstArray()[0] );
+ pURLED->SetText( xFP->getSelectedFiles().getConstArray()[0] );
}
}
diff --git a/sw/source/ui/index/cnttab.cxx b/sw/source/ui/index/cnttab.cxx
index 7e06bccacc77..695387b30e69 100644
--- a/sw/source/ui/index/cnttab.cxx
+++ b/sw/source/ui/index/cnttab.cxx
@@ -37,7 +37,7 @@
#include <svx/svxdlg.hxx>
#include <svx/flagsdef.hxx>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <svtools/indexentryres.hxx>
#include <editeng/unolingu.hxx>
@@ -100,7 +100,7 @@ static OUString lcl_CreateAutoMarkFileDlg( const OUString& rURL,
FileDialogHelper aDlgHelper( bOpen ?
TemplateDescription::FILEOPEN_SIMPLE : TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
- uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
+ uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY);
xFltMgr->appendFilter( rFileString, "*.sdi" );
@@ -119,7 +119,7 @@ static OUString lcl_CreateAutoMarkFileDlg( const OUString& rURL,
if( aDlgHelper.Execute() == ERRCODE_NONE )
{
- sRet = xFP->getFiles().getConstArray()[0];
+ sRet = xFP->getSelectedFiles().getConstArray()[0];
}
rLastSaveDir = sSaveDir;
return sRet;
diff --git a/sw/source/ui/misc/glossary.cxx b/sw/source/ui/misc/glossary.cxx
index 77586e83fb5d..41ddb5a73564 100644
--- a/sw/source/ui/misc/glossary.cxx
+++ b/sw/source/ui/misc/glossary.cxx
@@ -39,7 +39,7 @@
#include <comphelper/string.hxx>
#include <ucbhelper/content.hxx>
#include <com/sun/star/text/AutoTextContainer.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
#include <com/sun/star/ui/dialogs/XFilterManager.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
#include <svl/urihelper.hxx>
@@ -574,7 +574,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
{
// call the FileOpenDialog do find WinWord - Files with templates
FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 );
- uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker();
+ uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker();
SvtPathOptions aPathOpt;
xFP->setDisplayDirectory(aPathOpt.GetWorkPath() );
@@ -597,7 +597,7 @@ IMPL_LINK_TYPED( SwGlossaryDlg, MenuHdl, Menu *, pMn, bool )
if( aDlgHelper.Execute() == ERRCODE_NONE )
{
- if( pGlossaryHdl->ImportGlossaries( xFP->getFiles().getConstArray()[0] ))
+ if( pGlossaryHdl->ImportGlossaries( xFP->getSelectedFiles().getConstArray()[0] ))
Init();
else
{