[Libreoffice-commits] core.git: avmedia/source include/sfx2 sd/source sfx2/source svx/source sw/source

Julien Nabet serval2412 at yahoo.fr
Tue Oct 6 22:06:14 PDT 2015


 avmedia/source/viewer/mediawindow.cxx         |    2 +-
 include/sfx2/filedlghelper.hxx                |    6 +++---
 sd/source/ui/dlg/filedlg.cxx                  |    4 ++--
 sfx2/source/appl/opengrf.cxx                  |    2 +-
 sfx2/source/appl/shutdownicon.cxx             |    5 +++--
 sfx2/source/dialog/filedlghelper.cxx          |    6 +++---
 sfx2/source/dialog/filedlgimpl.hxx            |    4 ++--
 sfx2/source/doc/docinsert.cxx                 |    2 +-
 sfx2/source/doc/guisaveas.cxx                 |    2 +-
 svx/source/core/graphichelper.cxx             |    6 +++---
 sw/source/ui/chrdlg/chardlg.cxx               |    6 +++---
 sw/source/ui/dbui/createaddresslistdialog.cxx |    6 +++---
 sw/source/ui/dbui/mmdocselectpage.cxx         |    6 +++---
 sw/source/ui/frmdlg/frmpage.cxx               |    8 ++++----
 sw/source/ui/index/cnttab.cxx                 |    6 +++---
 sw/source/ui/misc/glossary.cxx                |    6 +++---
 sw/source/uibase/app/docsh2.cxx               |   10 +++++-----
 sw/source/uibase/dbui/dbmgr.cxx               |    6 +++---
 sw/source/uibase/dbui/mailmergehelper.cxx     |    6 +++---
 sw/source/uibase/uiview/srcview.cxx           |    6 +++---
 sw/source/uibase/uiview/view2.cxx             |    2 +-
 21 files changed, 54 insertions(+), 53 deletions(-)

New commits:
commit 8273350ff48f198efc9dc9c5de5519b8cbdc0cb3
Author: Julien Nabet <serval2412 at yahoo.fr>
Date:   Mon Oct 5 23:27:44 2015 +0200

    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 at libreoffice.org>
    Reviewed-by: Julien Nabet <serval2412 at yahoo.fr>

diff --git a/avmedia/source/viewer/mediawindow.cxx b/avmedia/source/viewer/mediawindow.cxx
index 6e79348..088ea86 100644
--- a/avmedia/source/viewer/mediawindow.cxx
+++ b/avmedia/source/viewer/mediawindow.cxx
@@ -287,7 +287,7 @@ bool MediaWindow::executeMediaURLDialog(vcl::Window* /* pParent */,
     // add filter for all types
     aDlg.AddFilter( AVMEDIA_RESSTR( AVMEDIA_STR_ALL_FILES ), OUString( "*.*"  ) );
 
-    uno::Reference<ui::dialogs::XFilePicker> const xFP(aDlg.GetFilePicker());
+    uno::Reference<ui::dialogs::XFilePicker2> const xFP(aDlg.GetFilePicker());
     uno::Reference<ui::dialogs::XFilePickerControlAccess> const xCtrlAcc(xFP,
             uno::UNO_QUERY_THROW);
     if (o_pbLink)
diff --git a/include/sfx2/filedlghelper.hxx b/include/sfx2/filedlghelper.hxx
index 67ec91e..7e31b5a 100644
--- a/include/sfx2/filedlghelper.hxx
+++ b/include/sfx2/filedlghelper.hxx
@@ -43,7 +43,7 @@ namespace com
             {
                 namespace dialogs
                 {
-                    class XFilePicker;
+                    class XFilePicker2;
                     class XFilePickerListener;
                     struct FilePickerEvent;
                     struct DialogClosedEvent;
@@ -183,7 +183,7 @@ public:
         with the following differences:
         <ul><li>The FileDialogHelper remembers the given file name, and upon execution,
                 strips its extension if the dialog is set up for "automatic file name extension".</li>
-            <li>Exceptions thrown from the <code>XFilePicker</code> are caught and silenced.</li>
+            <li>Exceptions thrown from the <code>XFilePicker2</code> are caught and silenced.</li>
         </ul>
     */
     void                     SetFileName( const OUString& _rFileName );
@@ -192,7 +192,7 @@ public:
     OUString                 GetDisplayDirectory() const;
     ErrCode                  GetGraphic( Graphic& rGraphic ) const;
 
-    ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > GetFilePicker() const;
+    ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker2 > GetFilePicker() const;
 
     // XFilePickerListener methods
     void SAL_CALL   FileSelectionChanged( const ::com::sun::star::ui::dialogs::FilePickerEvent& aEvent );
diff --git a/sd/source/ui/dlg/filedlg.cxx b/sd/source/ui/dlg/filedlg.cxx
index c5e30e5..2fa678c 100644
--- a/sd/source/ui/dlg/filedlg.cxx
+++ b/sd/source/ui/dlg/filedlg.cxx
@@ -27,7 +27,7 @@
 #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.hpp>
 #include <com/sun/star/ui/dialogs/XFilePickerListener.hpp>
 #include <com/sun/star/ui/dialogs/XFilePickerNotifier.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
 #include <vcl/msgbox.hxx>
 #include <vcl/idle.hxx>
 #include <sal/types.h>
@@ -222,7 +222,7 @@ SdFileDialog_Imp::SdFileDialog_Imp( const short     nDialogType,
 {
     maUpdateIdle.SetIdleHdl(LINK(this, SdFileDialog_Imp, IsMusicStoppedHdl));
 
-    css::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > xFileDlg = GetFilePicker();
+    css::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker2 > xFileDlg = GetFilePicker();
 
     // get the control access
     mxControlAccess = css::uno::Reference< css::ui::dialogs::XFilePickerControlAccess > ( xFileDlg, css::uno::UNO_QUERY );
diff --git a/sfx2/source/appl/opengrf.cxx b/sfx2/source/appl/opengrf.cxx
index 82015b0..8ced8cf 100644
--- a/sfx2/source/appl/opengrf.cxx
+++ b/sfx2/source/appl/opengrf.cxx
@@ -88,7 +88,7 @@ SvxOpenGrf_Impl::SvxOpenGrf_Impl()
     : aFileDlg(ui::dialogs::TemplateDescription::FILEOPEN_LINK_PREVIEW,
             SFXWB_GRAPHIC)
 {
-    uno::Reference < XFilePicker > xFP = aFileDlg.GetFilePicker();
+    uno::Reference < XFilePicker2 > xFP = aFileDlg.GetFilePicker();
     xCtrlAcc = uno::Reference < XFilePickerControlAccess >(xFP, UNO_QUERY);
 }
 
diff --git a/sfx2/source/appl/shutdownicon.cxx b/sfx2/source/appl/shutdownicon.cxx
index b908653..fbf56c9 100644
--- a/sfx2/source/appl/shutdownicon.cxx
+++ b/sfx2/source/appl/shutdownicon.cxx
@@ -39,6 +39,7 @@
 #include <com/sun/star/util/URLTransformer.hpp>
 #include <com/sun/star/util/XURLTransformer.hpp>
 #include <com/sun/star/ui/dialogs/XFilePickerControlAccess.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 <com/sun/star/ui/dialogs/ExtendedFilePickerElementIds.hpp>
@@ -371,7 +372,7 @@ IMPL_LINK_TYPED( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, /*unused
     // use constructor for filling up filters automatically!
     if ( ERRCODE_NONE == m_pFileDlg->GetError() )
     {
-        ::com::sun::star::uno::Reference< XFilePicker >    xPicker = m_pFileDlg->GetFilePicker();
+        ::com::sun::star::uno::Reference< XFilePicker2 >    xPicker = m_pFileDlg->GetFilePicker();
 
         try
         {
@@ -382,7 +383,7 @@ IMPL_LINK_TYPED( ShutdownIcon, DialogClosedHdl_Impl, FileDialogHelper*, /*unused
                 ::com::sun::star::uno::Reference < XFilePickerControlAccess > xPickerControls ( xPicker, UNO_QUERY );
                 ::com::sun::star::uno::Reference < XFilterManager > xFilterManager ( xPicker, UNO_QUERY );
 
-                Sequence< OUString >        sFiles = xPicker->getFiles();
+                Sequence< OUString >        sFiles = xPicker->getSelectedFiles();
                 int                         nFiles = sFiles.getLength();
 
                 int                         nArgs=3;
diff --git a/sfx2/source/dialog/filedlghelper.cxx b/sfx2/source/dialog/filedlghelper.cxx
index 1cc0a08..9141bd1 100644
--- a/sfx2/source/dialog/filedlghelper.cxx
+++ b/sfx2/source/dialog/filedlghelper.cxx
@@ -804,7 +804,7 @@ ErrCode FileDialogHelper_Impl::getGraphic( Graphic& rGraphic ) const
     return nRet;
 }
 
-static bool lcl_isSystemFilePicker( const uno::Reference< XFilePicker >& _rxFP )
+static bool lcl_isSystemFilePicker( const uno::Reference< XFilePicker2 >& _rxFP )
 {
     try
     {
@@ -1330,7 +1330,7 @@ void FileDialogHelper_Impl::implGetAndCacheFiles(const uno::Reference< XInterfac
     // b) the olde way ... non optional.
     else
     {
-        uno::Reference< XFilePicker > xPickOld(xPicker, UNO_QUERY_THROW);
+        uno::Reference< XFilePicker2 > xPickOld(xPicker, UNO_QUERY_THROW);
         Sequence< OUString > lFiles = xPickOld->getFiles();
         ::sal_Int32          nFiles = lFiles.getLength();
         if ( nFiles == 1 )
@@ -2539,7 +2539,7 @@ void FileDialogHelper::SetCurrentFilter( const OUString& rFilter )
     mpImp->setFilter( sFilter );
 }
 
-uno::Reference < XFilePicker > FileDialogHelper::GetFilePicker() const
+uno::Reference < XFilePicker2 > FileDialogHelper::GetFilePicker() const
 {
     return mpImp->mxFileDlg;
 }
diff --git a/sfx2/source/dialog/filedlgimpl.hxx b/sfx2/source/dialog/filedlgimpl.hxx
index 20fda81..66325fd 100644
--- a/sfx2/source/dialog/filedlgimpl.hxx
+++ b/sfx2/source/dialog/filedlgimpl.hxx
@@ -25,7 +25,7 @@
 #include <cppuhelper/implbase.hxx>
 #include <com/sun/star/beans/StringPair.hpp>
 #include <com/sun/star/container/XNameAccess.hpp>
-#include <com/sun/star/ui/dialogs/XFilePicker.hpp>
+#include <com/sun/star/ui/dialogs/XFilePicker2.hpp>
 #include <com/sun/star/ui/dialogs/XFilePickerListener.hpp>
 #include <com/sun/star/ui/dialogs/XDialogClosedListener.hpp>
 #include <sfx2/fcontnr.hxx>
@@ -46,7 +46,7 @@ namespace sfx2
     {
         friend class FileDialogHelper;
 
-        ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker > mxFileDlg;
+        ::com::sun::star::uno::Reference < ::com::sun::star::ui::dialogs::XFilePicker2 > mxFileDlg;
         ::com::sun::star::uno::Reference < ::com::sun::star::container::XNameAccess >   mxFilterCFG;
 
         std::vector< FilterPair >   maFilters;
diff --git a/sfx2/source/doc/docinsert.cxx b/sfx2/source/doc/docinsert.cxx
index 51cac45..951930e 100644
--- a/sfx2/source/doc/docinsert.cxx
+++ b/sfx2/source/doc/docinsert.cxx
@@ -168,7 +168,7 @@ IMPL_LINK_NOARG_TYPED(DocumentInserter, DialogClosedHdl, sfx2::FileDialogHelper*
     if ( ERRCODE_NONE == m_nError )
         impl_FillURLList( m_pFileDlg, m_pURLList );
 
-    Reference < XFilePicker > xFP = m_pFileDlg->GetFilePicker();
+    Reference < XFilePicker2 > xFP = m_pFileDlg->GetFilePicker();
     Reference < XFilePickerControlAccess > xCtrlAccess( xFP, UNO_QUERY );
     if ( xCtrlAccess.is() )
     {
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 8d3f492..e0ba8c5 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -927,7 +927,7 @@ bool ModelData_Impl::OutputFileDialog( sal_Int8 nStoreMode,
 
         pFileDlg->CreateMatcher( aDocServiceName );
 
-        uno::Reference< ui::dialogs::XFilePicker > xFilePicker = pFileDlg->GetFilePicker();
+        uno::Reference< ui::dialogs::XFilePicker2 > xFilePicker = pFileDlg->GetFilePicker();
         uno::Reference< ui::dialogs::XFilePickerControlAccess > xControlAccess =
         uno::Reference< ui::dialogs::XFilePickerControlAccess >( xFilePicker, uno::UNO_QUERY );
 
diff --git a/svx/source/core/graphichelper.cxx b/svx/source/core/graphichelper.cxx
index 96f6788..70df0c9d 100644
--- a/svx/source/core/graphichelper.cxx
+++ b/svx/source/core/graphichelper.cxx
@@ -41,7 +41,7 @@
 #include <com/sun/star/lang/XComponent.hpp>
 #include <com/sun/star/io/XInputStream.hpp>
 #include <com/sun/star/ucb/SimpleFileAccess.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>
 
@@ -99,7 +99,7 @@ OUString GraphicHelper::ExportGraphic( const Graphic& rGraphic, const OUString&
     OUString sGraphicsPath( aPathOpt.GetGraphicPath() );
 
     FileDialogHelper aDialogHelper( TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
-    Reference < XFilePicker > xFilePicker = aDialogHelper.GetFilePicker();
+    Reference < XFilePicker2 > xFilePicker = aDialogHelper.GetFilePicker();
 
     INetURLObject aPath;
     aPath.SetSmartURL( sGraphicsPath );
@@ -213,7 +213,7 @@ void GraphicHelper::SaveShapeAsGraphic( const Reference< drawing::XShape >& xSha
         OUString sGraphicPath( aPathOpt.GetGraphicPath() );
 
         FileDialogHelper aDialogHelper( TemplateDescription::FILESAVE_AUTOEXTENSION, 0 );
-        Reference < XFilePicker > xFilePicker = aDialogHelper.GetFilePicker();
+        Reference < XFilePicker2 > xFilePicker = aDialogHelper.GetFilePicker();
 
         aDialogHelper.SetTitle( "Save as Image" );
 
diff --git a/sw/source/ui/chrdlg/chardlg.cxx b/sw/source/ui/chrdlg/chardlg.cxx
index 64cd58e..81be508 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 ca48c63..dd7e599 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 c9efadf3..2617a0c 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 bc0ae4d..9e3097c 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 7e06bcc..695387b 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 77586e8..41ddb5a 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 b6e0d12..080b36a 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 4740c6e..b166e25 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 2f91678..f6da0d2 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 784f633..259d8ec 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 ccba5b2..7e1d8de 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)
     {


More information about the Libreoffice-commits mailing list