diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2015-10-05 23:27:44 +0200 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2015-10-07 05:05:47 +0000 |
commit | 8273350ff48f198efc9dc9c5de5519b8cbdc0cb3 (patch) | |
tree | d1587fc960b3b0a7bf30403f240d64b66de2a53d /sw/source | |
parent | f830600ece806ec365a4839e79afabe183c5e36d (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')
-rw-r--r-- | sw/source/ui/chrdlg/chardlg.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/dbui/createaddresslistdialog.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/dbui/mmdocselectpage.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/frmdlg/frmpage.cxx | 8 | ||||
-rw-r--r-- | sw/source/ui/index/cnttab.cxx | 6 | ||||
-rw-r--r-- | sw/source/ui/misc/glossary.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/app/docsh2.cxx | 10 | ||||
-rw-r--r-- | sw/source/uibase/dbui/dbmgr.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/dbui/mailmergehelper.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/srcview.cxx | 6 | ||||
-rw-r--r-- | sw/source/uibase/uiview/view2.cxx | 2 |
11 files changed, 34 insertions, 34 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 { diff --git a/sw/source/uibase/app/docsh2.cxx b/sw/source/uibase/app/docsh2.cxx index b6e0d127b7d2..080b36a0413b 100644 --- a/sw/source/uibase/app/docsh2.cxx +++ b/sw/source/uibase/app/docsh2.cxx @@ -105,7 +105,7 @@ #include <app.hrc> #include <poolfmt.hrc> #include <globals.hrc> -#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/XFilePickerControlAccess.hpp> #include <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp> @@ -503,7 +503,7 @@ void SwDocShell::Execute(SfxRequest& rReq) if(RET_TEMPLATE_LOAD == nRet) { FileDialogHelper aDlgHelper( TemplateDescription::FILEOPEN_SIMPLE, 0 ); - uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); + uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker(); xFP->setDisplayDirectory( aPathOpt.GetWorkPath() ); @@ -549,7 +549,7 @@ void SwDocShell::Execute(SfxRequest& rReq) if( !bError && ERRCODE_NONE == aDlgHelper.Execute() ) { - aFileName = xFP->getFiles().getConstArray()[0]; + aFileName = xFP->getSelectedFiles().getConstArray()[0]; } } else if( RET_OK == nRet) @@ -916,7 +916,7 @@ void SwDocShell::Execute(SfxRequest& rReq) const char** pHelpIds = bCreateHtml ? aHTMLHelpIds : aMasterHelpIds; aDlgHelper.SetControlHelpIds( nControlIds, pHelpIds ); - uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); + uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker(); const SfxFilter* pFlt; sal_uInt16 nStrId; @@ -1016,7 +1016,7 @@ void SwDocShell::Execute(SfxRequest& rReq) xFP->setDisplayDirectory( aPathOpt.GetWorkPath() ); if( ERRCODE_NONE == aDlgHelper.Execute()) { - aFileName = xFP->getFiles().getConstArray()[0]; + aFileName = xFP->getSelectedFiles().getConstArray()[0]; Any aTemplateValue = xCtrlAcc->getValue( ExtendedFilePickerElementIds::LISTBOX_TEMPLATE, ListboxControlActions::GET_SELECTED_ITEM ); diff --git a/sw/source/uibase/dbui/dbmgr.cxx b/sw/source/uibase/dbui/dbmgr.cxx index 4740c6e74298..b166e2530ecf 100644 --- a/sw/source/uibase/dbui/dbmgr.cxx +++ b/sw/source/uibase/dbui/dbmgr.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/frame/XStorable.hpp> #include <com/sun/star/task/InteractionHandler.hpp> #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 <com/sun/star/uno/XNamingService.hpp> #include <com/sun/star/util/XCloseable.hpp> @@ -2473,7 +2473,7 @@ uno::Sequence<OUString> SwDBManager::GetExistingDatabaseNames() OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell) { sfx2::FileDialogHelper aDlgHelper( ui::dialogs::TemplateDescription::FILEOPEN_SIMPLE, 0 ); - uno::Reference < ui::dialogs::XFilePicker > xFP = aDlgHelper.GetFilePicker(); + uno::Reference < ui::dialogs::XFilePicker2 > xFP = aDlgHelper.GetFilePicker(); OUString sHomePath(SvtPathOptions().GetWorkPath()); aDlgHelper.SetDisplayDirectory( sHomePath ); @@ -2512,7 +2512,7 @@ OUString SwDBManager::LoadAndRegisterDataSource(SwDocShell* pDocShell) { uno::Any aURLAny; uno::Reference< beans::XPropertySet > aSettings; - const OUString aURI( xFP->getFiles().getConstArray()[0] ); + const OUString aURI( xFP->getSelectedFiles().getConstArray()[0] ); const DBConnURITypes type = GetDBunoURI( aURI, aURLAny ); if( DBCONN_FLAT == type ) diff --git a/sw/source/uibase/dbui/mailmergehelper.cxx b/sw/source/uibase/dbui/mailmergehelper.cxx index 2f916785919b..f6da0d2596de 100644 --- a/sw/source/uibase/dbui/mailmergehelper.cxx +++ b/sw/source/uibase/dbui/mailmergehelper.cxx @@ -30,7 +30,7 @@ #include <com/sun/star/sdb/XColumn.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #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/mail/MailServiceProvider.hpp> #include <com/sun/star/mail/XSmtpService.hpp> #include <comphelper/processfactory.hxx> @@ -64,8 +64,8 @@ OUString CallSaveAsDialog(OUString& rFilter) } rFilter = aDialog.GetRealFilter(); - uno::Reference < ui::dialogs::XFilePicker > xFP = aDialog.GetFilePicker(); - return xFP->getFiles().getConstArray()[0]; + uno::Reference < ui::dialogs::XFilePicker2 > xFP = aDialog.GetFilePicker(); + return xFP->getSelectedFiles().getConstArray()[0]; } /* diff --git a/sw/source/uibase/uiview/srcview.cxx b/sw/source/uibase/uiview/srcview.cxx index 784f6331f1ea..259d8ec9aabf 100644 --- a/sw/source/uibase/uiview/srcview.cxx +++ b/sw/source/uibase/uiview/srcview.cxx @@ -79,7 +79,7 @@ #include <popup.hrc> #include <web.hrc> #include <view.hrc> -#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 <sfx2/filedlghelper.hxx> #define SwSrcView @@ -300,7 +300,7 @@ void SwSrcView::Execute(SfxRequest& rReq) // filesave dialog with autoextension FileDialogHelper aDlgHelper( TemplateDescription::FILESAVE_AUTOEXTENSION, 0 ); - uno::Reference < XFilePicker > xFP = aDlgHelper.GetFilePicker(); + uno::Reference < XFilePicker2 > xFP = aDlgHelper.GetFilePicker(); uno::Reference<XFilterManager> xFltMgr(xFP, UNO_QUERY); // search for an html filter for export @@ -326,7 +326,7 @@ void SwSrcView::Execute(SfxRequest& rReq) xFP->setDisplayDirectory( aPathOpt.GetWorkPath() ); if( aDlgHelper.Execute() == ERRCODE_NONE) { - SfxMedium aMedium( xFP->getFiles().getConstArray()[0], + SfxMedium aMedium( xFP->getSelectedFiles().getConstArray()[0], StreamMode::WRITE | StreamMode::SHARE_DENYNONE ); SvStream* pOutStream = aMedium.GetOutStream(); pOutStream->SetStreamCharSet(lcl_GetStreamCharSet(eLoadEncoding)); diff --git a/sw/source/uibase/uiview/view2.cxx b/sw/source/uibase/uiview/view2.cxx index ccba5b21dcfe..7e1d8deaef10 100644 --- a/sw/source/uibase/uiview/view2.cxx +++ b/sw/source/uibase/uiview/view2.cxx @@ -303,7 +303,7 @@ bool SwView::InsertGraphicDlg( SfxRequest& rReq ) SFXWB_GRAPHIC )); pFileDlg->SetTitle(SW_RESSTR(STR_INSERT_GRAPHIC )); pFileDlg->SetContext( FileDialogHelper::SW_INSERT_GRAPHIC ); - uno::Reference < XFilePicker > xFP = pFileDlg->GetFilePicker(); + uno::Reference < XFilePicker2 > xFP = pFileDlg->GetFilePicker(); uno::Reference < XFilePickerControlAccess > xCtrlAcc(xFP, UNO_QUERY); if(nHtmlMode & HTMLMODE_ON) { |