[Libreoffice-commits] core.git: Branch 'feature/gsoc15-open-remote-files-dialog' - fpicker/source include/svtools svtools/source

Szymon Kłos eszkadev at gmail.com
Tue Jun 30 06:33:00 PDT 2015


 fpicker/source/office/OfficeFilePicker.cxx   |   79 ++++++++++++++
 fpicker/source/office/OfficeFilePicker.hxx   |   39 ++++++-
 fpicker/source/office/OfficeFolderPicker.cxx |    2 
 fpicker/source/office/OfficeFolderPicker.hxx |    2 
 fpicker/source/office/commonpicker.hxx       |    8 -
 fpicker/source/office/fps_office.component   |    3 
 fpicker/source/office/fps_office.cxx         |    6 +
 fpicker/source/office/iodlg.cxx              |    4 
 fpicker/source/office/iodlg.hxx              |   51 ++++++++-
 include/svtools/RemoteFilesDialog.hxx        |   44 +++++++-
 svtools/source/dialogs/RemoteFilesDialog.cxx |  143 ++++++++++++++++++++++++++-
 11 files changed, 357 insertions(+), 24 deletions(-)

New commits:
commit 6e81c82dc84b15b63aa679b5596e3a0d7b4805e1
Author: Szymon Kłos <eszkadev at gmail.com>
Date:   Tue Jun 30 15:31:30 2015 +0200

    FilePicker interface for RemoteFilesDialog
    
    Change-Id: I797d3fcf62bb858713d1e8af10e82f9c095bcf2b

diff --git a/fpicker/source/office/OfficeFilePicker.cxx b/fpicker/source/office/OfficeFilePicker.cxx
index 6fd28ed..915fd49 100644
--- a/fpicker/source/office/OfficeFilePicker.cxx
+++ b/fpicker/source/office/OfficeFilePicker.cxx
@@ -20,6 +20,7 @@
 
 #include "OfficeFilePicker.hxx"
 #include "iodlg.hxx"
+#include <svtools/RemoteFilesDialog.hxx>
 
 #include <list>
 #include <functional>
@@ -463,7 +464,7 @@ sal_Int16 SvtFilePicker::implExecutePicker( )
 }
 
 
-VclPtr<SvtFileDialog> SvtFilePicker::implCreateDialog( vcl::Window* _pParent )
+VclPtr<SvtFileDialog_Base> SvtFilePicker::implCreateDialog( vcl::Window* _pParent )
 {
     WinBits nExtraBits;
     WinBits nBits = getWinBits( nExtraBits );
@@ -491,6 +492,13 @@ IMPLEMENT_FORWARD_XINTERFACE2( SvtFilePicker, OCommonPicker, SvtFilePicker_Base
 
 IMPLEMENT_FORWARD_XTYPEPROVIDER2( SvtFilePicker, OCommonPicker, SvtFilePicker_Base )
 
+IMPLEMENT_FORWARD_XINTERFACE3( SvtRemoteFilePicker, SvtFilePicker, OCommonPicker, SvtFilePicker_Base )
+
+
+// disambiguate XTypeProvider
+
+IMPLEMENT_FORWARD_XTYPEPROVIDER3( SvtRemoteFilePicker, SvtFilePicker, OCommonPicker, SvtFilePicker_Base )
+
 
 // XExecutableDialog functions
 
@@ -1165,4 +1173,73 @@ Reference< XInterface > SAL_CALL SvtFilePicker::impl_createInstance(
     return Reference< XInterface >( *new SvtFilePicker( xServiceManager ) );
 }
 
+// SvtRemoteFilePicker
+
+SvtRemoteFilePicker::SvtRemoteFilePicker( const Reference < XMultiServiceFactory >& xFactory )
+    :SvtFilePicker( xFactory )
+{
+}
+
+VclPtr<SvtFileDialog_Base> SvtRemoteFilePicker::implCreateDialog( vcl::Window* _pParent )
+{
+    WinBits nExtraBits;
+    WinBits nBits = getWinBits( nExtraBits );
+
+    VclPtrInstance<RemoteFilesDialog> dialog( _pParent, nBits); // TODO: extrabits
+
+    // Set StandardDir if present
+    if ( !m_aStandardDir.isEmpty())
+    {
+        OUString sStandardDir = m_aStandardDir;
+        dialog->SetStandardDir( sStandardDir );
+        dialog->SetBlackList( m_aBlackList );
+    }
+
+    return dialog;
+}
+
+// XServiceInfo
+
+
+/* XServiceInfo */
+OUString SAL_CALL SvtRemoteFilePicker::getImplementationName() throw( RuntimeException, std::exception )
+{
+    return impl_getStaticImplementationName();
+}
+
+/* XServiceInfo */
+sal_Bool SAL_CALL SvtRemoteFilePicker::supportsService( const OUString& sServiceName ) throw( RuntimeException, std::exception )
+{
+    return cppu::supportsService(this, sServiceName);
+}
+
+/* XServiceInfo */
+Sequence< OUString > SAL_CALL SvtRemoteFilePicker::getSupportedServiceNames() throw( RuntimeException, std::exception )
+{
+    return impl_getStaticSupportedServiceNames();
+}
+
+/* Helper for XServiceInfo */
+Sequence< OUString > SvtRemoteFilePicker::impl_getStaticSupportedServiceNames()
+{
+    Sequence< OUString > seqServiceNames( 1 );
+    OUString* pArray = seqServiceNames.getArray();
+    pArray[0] = "com.sun.star.ui.dialogs.RemoteFilePicker";
+    return seqServiceNames ;
+}
+
+/* Helper for XServiceInfo */
+OUString SvtRemoteFilePicker::impl_getStaticImplementationName()
+{
+    return OUString( "com.sun.star.svtools.RemoteFilePicker" );
+}
+
+/* Helper for registry */
+Reference< XInterface > SAL_CALL SvtRemoteFilePicker::impl_createInstance(
+    const Reference< XComponentContext >& rxContext) throw( Exception )
+{
+    Reference< XMultiServiceFactory > xServiceManager (rxContext->getServiceManager(), UNO_QUERY_THROW);
+    return Reference< XInterface >( *new SvtRemoteFilePicker( xServiceManager ) );
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/OfficeFilePicker.hxx b/fpicker/source/office/OfficeFilePicker.hxx
index fa8313e..df6ad1c 100644
--- a/fpicker/source/office/OfficeFilePicker.hxx
+++ b/fpicker/source/office/OfficeFilePicker.hxx
@@ -61,7 +61,7 @@ class SvtFilePicker :public SvtFilePicker_Base
                     ,public ::svt::OCommonPicker
                     ,public ::svt::IFilePickerListener
 {
-private:
+protected:
     FilterList*         m_pFilterList;
     ElementList*        m_pElemList;
 
@@ -205,14 +205,14 @@ protected:
 
     // OCommonPicker overridables
 
-    virtual VclPtr<SvtFileDialog> implCreateDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
+    virtual VclPtr<SvtFileDialog_Base> implCreateDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
     virtual sal_Int16       implExecutePicker( ) SAL_OVERRIDE;
     virtual bool            implHandleInitializationArgument(
                                 const OUString& _rName,
                                 const ::com::sun::star::uno::Any& _rValue
                             ) SAL_OVERRIDE;
 
-private:
+protected:
     WinBits             getWinBits( WinBits& rExtraBits );
     virtual void        notify( sal_Int16 _nEventId, sal_Int16 _nControlId ) SAL_OVERRIDE;
 
@@ -226,6 +226,39 @@ private:
     DECL_LINK(          DialogClosedHdl, Dialog* );
 };
 
+// SvtRemoteFilePicker
+
+class SvtRemoteFilePicker : public SvtFilePicker
+{
+public:
+    SvtRemoteFilePicker( const ::com::sun::star::uno::Reference < ::com::sun::star::lang::XMultiServiceFactory >& xFactory );
+
+    virtual VclPtr<SvtFileDialog_Base> implCreateDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
+
+    // disambiguate XInterface
+
+    DECLARE_XINTERFACE( )
+
+    // disambiguate XTypeProvider
+
+    DECLARE_XTYPEPROVIDER( )
+
+    /* XServiceInfo */
+    virtual OUString SAL_CALL getImplementationName() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+    virtual sal_Bool SAL_CALL supportsService( const OUString& sServiceName ) throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+    virtual com::sun::star::uno::Sequence< OUString > SAL_CALL
+                                    getSupportedServiceNames() throw( ::com::sun::star::uno::RuntimeException, std::exception ) SAL_OVERRIDE;
+
+    /* Helper for XServiceInfo */
+    static com::sun::star::uno::Sequence< OUString > impl_getStaticSupportedServiceNames();
+    static OUString impl_getStaticImplementationName();
+
+    /* Helper for registry */
+    static ::com::sun::star::uno::Reference< com::sun::star::uno::XInterface > SAL_CALL impl_createInstance (
+        const ::com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext )
+        throw( com::sun::star::uno::Exception );
+};
+
 #endif // INCLUDED_FPICKER_SOURCE_OFFICE_OFFICEFILEPICKER_HXX
 
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/fpicker/source/office/OfficeFolderPicker.cxx b/fpicker/source/office/OfficeFolderPicker.cxx
index 8f52485..33a3e53 100644
--- a/fpicker/source/office/OfficeFolderPicker.cxx
+++ b/fpicker/source/office/OfficeFolderPicker.cxx
@@ -69,7 +69,7 @@ void SAL_CALL SvtFolderPicker::startExecuteModal( const Reference< ::com::sun::s
     getDialog()->StartExecuteModal( LINK( this, SvtFolderPicker, DialogClosedHdl ) );
 }
 
-VclPtr<SvtFileDialog> SvtFolderPicker::implCreateDialog( vcl::Window* _pParent )
+VclPtr<SvtFileDialog_Base> SvtFolderPicker::implCreateDialog( vcl::Window* _pParent )
 {
     return VclPtr<SvtFileDialog>::Create( _pParent, SFXWB_PATHDIALOG );
 }
diff --git a/fpicker/source/office/OfficeFolderPicker.hxx b/fpicker/source/office/OfficeFolderPicker.hxx
index 266c99c..b2697ae 100644
--- a/fpicker/source/office/OfficeFolderPicker.hxx
+++ b/fpicker/source/office/OfficeFolderPicker.hxx
@@ -99,7 +99,7 @@ protected:
 
     // OCommonPicker overridables
 
-    virtual VclPtr<SvtFileDialog> implCreateDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
+    virtual VclPtr<SvtFileDialog_Base> implCreateDialog( vcl::Window* _pParent ) SAL_OVERRIDE;
     virtual sal_Int16       implExecutePicker( ) SAL_OVERRIDE;
 };
 
diff --git a/fpicker/source/office/commonpicker.hxx b/fpicker/source/office/commonpicker.hxx
index a08c31e..b74f1a9 100644
--- a/fpicker/source/office/commonpicker.hxx
+++ b/fpicker/source/office/commonpicker.hxx
@@ -35,7 +35,7 @@
 #include <tools/link.hxx>
 #include <vcl/vclptr.hxx>
 
-class SvtFileDialog;
+class SvtFileDialog_Base;
 namespace vcl { class Window; }
 struct ImplSVEvent;
 
@@ -65,7 +65,7 @@ namespace svt
         ::com::sun::star::uno::Reference< ::com::sun::star::awt::XWindow >  m_xWindow;
         // </properties>
 
-        VclPtr<SvtFileDialog>      m_pDlg;
+        VclPtr<SvtFileDialog_Base>      m_pDlg;
         ImplSVEvent *       m_nCancelEvent;
         bool            m_bExecuting;
 
@@ -79,7 +79,7 @@ namespace svt
         OUString     m_aDisplayDirectory;
 
     protected:
-        inline  SvtFileDialog*  getDialog() { return m_pDlg; }
+        inline  SvtFileDialog_Base*  getDialog() { return m_pDlg; }
 
         inline const    ::cppu::OBroadcastHelper&   GetBroadcastHelper() const  { return OCommonPicker_Base::rBHelper; }
         inline          ::cppu::OBroadcastHelper&   GetBroadcastHelper()        { return OCommonPicker_Base::rBHelper; }
@@ -93,7 +93,7 @@ namespace svt
         // overridables
 
         // will be called with locked SolarMutex
-        virtual VclPtr<SvtFileDialog> implCreateDialog( vcl::Window* _pParent ) = 0;
+        virtual VclPtr<SvtFileDialog_Base> implCreateDialog( vcl::Window* _pParent ) = 0;
         virtual sal_Int16       implExecutePicker( ) = 0;
             // do NOT override XExecutableDialog::execute! We need to do some stuff there ourself ...
 
diff --git a/fpicker/source/office/fps_office.component b/fpicker/source/office/fps_office.component
index 8804be2..b76edc6 100644
--- a/fpicker/source/office/fps_office.component
+++ b/fpicker/source/office/fps_office.component
@@ -22,6 +22,9 @@
   <implementation name="com.sun.star.svtools.OfficeFilePicker">
     <service name="com.sun.star.ui.dialogs.OfficeFilePicker"/>
   </implementation>
+  <implementation name="com.sun.star.svtools.RemoteFilePicker">
+    <service name="com.sun.star.ui.dialogs.RemoteFilePicker"/>
+  </implementation>
   <implementation name="com.sun.star.svtools.OfficeFolderPicker">
     <service name="com.sun.star.ui.dialogs.OfficeFolderPicker"/>
   </implementation>
diff --git a/fpicker/source/office/fps_office.cxx b/fpicker/source/office/fps_office.cxx
index c98b21f..5e33e83 100644
--- a/fpicker/source/office/fps_office.cxx
+++ b/fpicker/source/office/fps_office.cxx
@@ -28,6 +28,12 @@
 static const cppu::ImplementationEntry g_entries[] =
 {
     {
+        SvtRemoteFilePicker::impl_createInstance,
+        SvtRemoteFilePicker::impl_getStaticImplementationName,
+        SvtRemoteFilePicker::impl_getStaticSupportedServiceNames,
+        cppu::createSingleComponentFactory, 0, 0
+    },
+    {
         SvtFilePicker::impl_createInstance,
         SvtFilePicker::impl_getStaticImplementationName,
         SvtFilePicker::impl_getStaticSupportedServiceNames,
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx
index 451d5ba..ebecfca 100644
--- a/fpicker/source/office/iodlg.cxx
+++ b/fpicker/source/office/iodlg.cxx
@@ -303,7 +303,7 @@ SvtFileDialog::SvtFileDialog
     WinBits nBits,
     WinBits nExtraBits
 ) :
-    ModalDialog( _pParent, "ExplorerFileDialog", "fps/ui/explorerfiledialog.ui" )
+    SvtFileDialog_Base( _pParent, "ExplorerFileDialog", "fps/ui/explorerfiledialog.ui" )
 
     ,_pCbReadOnly( NULL )
     ,_pCbLinkBox( NULL)
@@ -327,7 +327,7 @@ SvtFileDialog::SvtFileDialog
 
 
 SvtFileDialog::SvtFileDialog ( vcl::Window* _pParent, WinBits nBits )
-    :ModalDialog( _pParent, "ExplorerFileDialog", "fps/ui/explorerfiledialog.ui" )
+    :SvtFileDialog_Base( _pParent, "ExplorerFileDialog", "fps/ui/explorerfiledialog.ui" )
     ,_pCbReadOnly( NULL )
     ,_pCbLinkBox( NULL)
     ,_pCbPreviewBox( NULL )
diff --git a/fpicker/source/office/iodlg.hxx b/fpicker/source/office/iodlg.hxx
index bf01b49..99df28b 100644
--- a/fpicker/source/office/iodlg.hxx
+++ b/fpicker/source/office/iodlg.hxx
@@ -72,6 +72,46 @@ class SvtFileDialogFilter_Impl;
 
 #define FILEDIALOG_FILTER_ALL   "*.*"
 
+// SvtFileDialog_Base
+
+class SvtFileDialog_Base : public ModalDialog, public ::svt::IFilePickerController
+{
+public:
+    SvtFileDialog_Base( vcl::Window* pParent, const OUString& rID, const OUString& rUIXMLDescription )
+    : ModalDialog( pParent, rID, rUIXMLDescription )
+    {
+    }
+
+    virtual SvtFileView* GetView() = 0;
+
+    virtual void SetHasFilename( bool bHasFilename ) = 0;
+    virtual void SetBlackList( const ::com::sun::star::uno::Sequence< OUString >& rBlackList ) = 0;
+    virtual const ::com::sun::star::uno::Sequence< OUString >& GetBlackList() const = 0;
+    virtual void SetStandardDir( const OUString& rStdDir ) = 0;
+    virtual const OUString& GetStandardDir() const = 0;
+    virtual void SetPath( const OUString& rNewURL ) = 0;
+    virtual const OUString& GetPath() = 0;
+    virtual std::vector<OUString> GetPathList() const = 0;
+    virtual bool ContentIsFolder( const OUString& rURL ) = 0;
+
+    virtual void AddFilter( const OUString& rFilter, const OUString& rType ) = 0;
+    virtual void AddFilterGroup( const OUString& _rFilter,
+                                const com::sun::star::uno::Sequence< com::sun::star::beans::StringPair >& rFilters ) = 0;
+    virtual OUString GetCurFilter() const = 0;
+    virtual void SetCurFilter( const OUString& rFilter ) = 0;
+
+    virtual void SetFileCallback( ::svt::IFilePickerListener *pNotifier ) = 0;
+
+    virtual void EnableAutocompletion( bool _bEnable = true ) = 0;
+
+    virtual sal_Int32 getTargetColorDepth() = 0;
+    virtual sal_Int32 getAvailableWidth() = 0;
+    virtual sal_Int32 getAvailableHeight() = 0;
+
+    virtual void setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& rImage ) = 0;
+
+    virtual bool getShowState() = 0;
+};
 
 // SvtFileDialog
 
@@ -79,7 +119,8 @@ class SvtFileDialogFilter_Impl;
 class SvtExpFileDlg_Impl;
 class CustomContainer;
 
-class SvtFileDialog : public ModalDialog, public ::svt::IFilePickerController
+class SvtFileDialog : //public ModalDialog, public ::svt::IFilePickerController,
+public SvtFileDialog_Base
 {
 private:
     VclPtr<CheckBox>                   _pCbReadOnly;
@@ -227,7 +268,7 @@ public:
     void                        PrevLevel_Impl();
     void                        OpenURL_Impl( const OUString& rURL );
 
-    inline SvtFileView*         GetView() const;
+    SvtFileView*                GetView();
 
     void                        DisableSaveLastDirectory();
     void                        InitSize();
@@ -256,7 +297,7 @@ public:
     // inline
     inline void                 SetPath( const OUString& rNewURL );
     inline void                 SetHasFilename( bool bHasFilename );
-    inline const OUString&      GetPath() const;
+    inline const OUString&      GetPath();
     inline void                 SetDefaultExt( const OUString& rExt );
     inline void                 EraseDefaultExt( sal_Int32 _nIndex = 0 );
     inline const OUString&      GetDefaultExt() const;
@@ -345,7 +386,7 @@ inline void SvtFileDialog::SetHasFilename( bool bHasFilename )
 
 
 
-inline const OUString& SvtFileDialog::GetPath() const
+inline const OUString& SvtFileDialog::GetPath()
 {
     return _aPath;
 }
@@ -420,7 +461,7 @@ inline const Link<>& SvtFileDialog::GetFilterSelectHdl() const
 
 
 
-inline SvtFileView* SvtFileDialog::GetView() const
+inline SvtFileView* SvtFileDialog::GetView()
 {
     return _pFileView;
 }
diff --git a/include/svtools/RemoteFilesDialog.hxx b/include/svtools/RemoteFilesDialog.hxx
index b2686f1..c8f606b 100644
--- a/include/svtools/RemoteFilesDialog.hxx
+++ b/include/svtools/RemoteFilesDialog.hxx
@@ -28,6 +28,7 @@
 #include <vcl/svapp.hxx>
 
 #include <officecfg/Office/Common.hxx>
+#include <com/sun/star/beans/StringPair.hpp>
 #include <com/sun/star/uno/Sequence.hxx>
 #include <com/sun/star/ucb/XCommandEnvironment.hpp>
 #include <com/sun/star/ucb/XProgressHandler.hpp>
@@ -37,6 +38,9 @@
 
 #include <vector>
 
+#include "../../../fpicker/source/office/iodlg.hxx"
+
+using namespace ::com::sun::star::beans;
 using namespace ::com::sun::star::uno;
 using namespace ::com::sun::star::ucb;
 using namespace ::com::sun::star::task;
@@ -66,7 +70,7 @@ class FileViewContainer;
 class Breadcrumb;
 class FolderTree;
 
-class SVT_DLLPUBLIC RemoteFilesDialog : public ModalDialog
+class SVT_DLLPUBLIC RemoteFilesDialog : public SvtFileDialog_Base
 {
 public:
     RemoteFilesDialog( vcl::Window* pParent, WinBits nBits );
@@ -75,10 +79,44 @@ public:
     virtual void dispose() SAL_OVERRIDE;
     virtual void Resize() SAL_OVERRIDE;
 
-    void AddFilter( OUString sName, OUString sType );
-
     OUString GetPath() const;
 
+    // SvtFileDialog_Base
+
+    virtual SvtFileView* GetView();
+
+    virtual void SetHasFilename( bool bHasFilename );
+    virtual void SetBlackList( const ::com::sun::star::uno::Sequence< OUString >& rBlackList );
+    virtual const ::com::sun::star::uno::Sequence< OUString >& GetBlackList() const;
+    virtual void SetStandardDir( const OUString& rStdDir );
+    virtual const OUString& GetStandardDir() const;
+    virtual void SetPath( const OUString& rNewURL );
+    virtual const OUString& GetPath();
+    virtual std::vector<OUString> GetPathList() const;
+    virtual bool ContentIsFolder( const OUString& rURL );
+
+    virtual void AddFilter( const OUString& rFilter, const OUString& rType );
+    virtual void AddFilterGroup( const OUString& _rFilter,
+                                const com::sun::star::uno::Sequence< com::sun::star::beans::StringPair >& rFilters );
+    virtual OUString GetCurFilter() const;
+    virtual void SetCurFilter( const OUString& rFilter );
+
+    virtual void SetFileCallback( ::svt::IFilePickerListener *pNotifier );
+
+    virtual void EnableAutocompletion( bool _bEnable = true );
+
+    virtual sal_Int32 getTargetColorDepth();
+    virtual sal_Int32 getAvailableWidth();
+    virtual sal_Int32 getAvailableHeight();
+
+    virtual void setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& rImage );
+
+    virtual bool getShowState();
+
+    virtual Control* getControl( sal_Int16 _nControlId, bool _bLabelControl = false ) const SAL_OVERRIDE;
+    virtual void enableControl( sal_Int16 _nControlId, bool _bEnable );
+    virtual OUString getCurFilter( ) const;
+
 private:
     ::com::sun::star::uno::Reference < com::sun::star::uno::XComponentContext > m_context;
 
diff --git a/svtools/source/dialogs/RemoteFilesDialog.cxx b/svtools/source/dialogs/RemoteFilesDialog.cxx
index c89f73f..ef66da6 100644
--- a/svtools/source/dialogs/RemoteFilesDialog.cxx
+++ b/svtools/source/dialogs/RemoteFilesDialog.cxx
@@ -228,7 +228,7 @@ class FileViewContainer : public vcl::Window
 };
 
 RemoteFilesDialog::RemoteFilesDialog( vcl::Window* pParent, WinBits nBits )
-    : ModalDialog( pParent, "RemoteFilesDialog", "svt/ui/remotefilesdialog.ui" )
+    : SvtFileDialog_Base( pParent, "RemoteFilesDialog", "svt/ui/remotefilesdialog.ui" )
     , m_context( comphelper::getProcessComponentContext() )
     , m_aFolderImage( SvtResId( IMG_SVT_FOLDER ) )
     , m_pSplitter( NULL )
@@ -467,10 +467,10 @@ int RemoteFilesDialog::GetSelectedServicePos()
     return nPos;
 }
 
-void RemoteFilesDialog::AddFilter( OUString sName, OUString sType )
+void RemoteFilesDialog::AddFilter( const OUString& rFilter, const OUString& rType )
 {
-    m_aFilters.push_back( sType );
-    m_pFilter_lb->InsertEntry( sName );
+    m_aFilters.push_back( rType );
+    m_pFilter_lb->InsertEntry( rFilter );
 
     if( m_pFilter_lb->GetSelectEntryPos() == LISTBOX_ENTRY_NOTFOUND )
         m_pFilter_lb->SelectEntryPos( 0 );
@@ -743,4 +743,139 @@ IMPL_LINK_NOARG ( RemoteFilesDialog, OkHdl )
     return 1;
 }
 
+// SvtFileDialog_Base
+
+SvtFileView* RemoteFilesDialog::GetView()
+{
+    return m_pFileView;
+}
+
+void RemoteFilesDialog::SetHasFilename( bool bHasFilename )
+{
+    // TODO
+}
+
+void RemoteFilesDialog::SetBlackList( const ::com::sun::star::uno::Sequence< OUString >& rBlackList )
+{
+    // TODO
+}
+
+const ::com::sun::star::uno::Sequence< OUString >& RemoteFilesDialog::GetBlackList() const
+{
+    // TODO
+    ::com::sun::star::uno::Sequence< OUString > aSequence( 0 );
+    return aSequence;
+}
+
+void RemoteFilesDialog::SetStandardDir( const OUString& rStdDir )
+{
+    // TODO
+}
+
+const OUString& RemoteFilesDialog::GetStandardDir() const
+{
+    // TODO
+    return OUString( "" );
+}
+
+void RemoteFilesDialog::SetPath( const OUString& rNewURL )
+{
+    m_sPath = rNewURL;
+}
+
+void RemoteFilesDialog::AddFilterGroup(
+                                  const OUString& rFilter,
+                                  const com::sun::star::uno::Sequence< com::sun::star::beans::StringPair >& rFilters )
+{
+    AddFilter( rFilter, OUString() );
+    const StringPair* pSubFilters       =               rFilters.getConstArray();
+    const StringPair* pSubFiltersEnd    = pSubFilters + rFilters.getLength();
+    for ( ; pSubFilters != pSubFiltersEnd; ++pSubFilters )
+        AddFilter( pSubFilters->First, pSubFilters->Second );
+}
+
+void RemoteFilesDialog::SetCurFilter( const OUString& rFilter )
+{
+    // TODO
+}
+
+void RemoteFilesDialog::SetFileCallback( ::svt::IFilePickerListener *pNotifier )
+{
+    // TODO
+}
+
+void RemoteFilesDialog::EnableAutocompletion( bool _bEnable )
+{
+    // TODO
+}
+
+const OUString& RemoteFilesDialog::GetPath()
+{
+    return m_sPath;
+}
+
+std::vector<OUString> RemoteFilesDialog::GetPathList() const
+{
+    std::vector<OUString> aPaths;
+    aPaths.push_back(m_sPath);
+    return aPaths;
+}
+
+bool RemoteFilesDialog::ContentIsFolder( const OUString& rURL )
+{
+    // TODO
+    return false;
+}
+
+sal_Int32 RemoteFilesDialog::getTargetColorDepth()
+{
+    // TODO
+    return 0;
+}
+
+sal_Int32 RemoteFilesDialog::getAvailableWidth()
+{
+    // TODO
+    return 0;
+}
+
+sal_Int32 RemoteFilesDialog::getAvailableHeight()
+{
+    // TODO
+    return 0;
+}
+
+void RemoteFilesDialog::setImage( sal_Int16 aImageFormat, const ::com::sun::star::uno::Any& rImage )
+{
+    // TODO
+}
+
+bool RemoteFilesDialog::getShowState()
+{
+    // TODO
+    return false;
+}
+
+OUString RemoteFilesDialog::GetCurFilter() const
+{
+    // TODO
+    return OUString( "" );
+}
+
+Control* RemoteFilesDialog::getControl( sal_Int16 _nControlId, bool _bLabelControl) const
+{
+    // TODO
+    return NULL;
+}
+void RemoteFilesDialog::enableControl( sal_Int16 _nControlId, bool _bEnable )
+{
+    // TODO
+}
+
+OUString RemoteFilesDialog::getCurFilter( ) const
+{
+    // TODO
+    return OUString("");
+}
+
 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */


More information about the Libreoffice-commits mailing list