diff options
author | Noel Grandin <noel@peralex.com> | 2016-07-04 11:44:42 +0200 |
---|---|---|
committer | Noel Grandin <noelgrandin@gmail.com> | 2016-07-04 10:58:42 +0000 |
commit | 3459ab4a5de1af443a85f66cecc0eeeb6d46df3f (patch) | |
tree | 4e8ddc95016f995786c185077dce59dff53e12f0 /ucb | |
parent | 20b9cbd0e586fe89f8e1bdd942135445a256af7b (diff) |
merge ftp::ResultSetFactory with ResultSetFactoryI
Change-Id: I061145fefef33aa3e7349adf7da03222c3b2a911
Reviewed-on: https://gerrit.libreoffice.org/26898
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/ftp/ftpcontent.cxx | 49 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpresultsetfactory.hxx | 31 |
2 files changed, 37 insertions, 43 deletions
diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 0e1222dcc674..34e560eaf0f7 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -221,42 +221,27 @@ void SAL_CALL FTPContent::abort( sal_Int32 /*CommandId*/ ) { } -/***************************************************************************/ -/* */ -/* Internal implementation class. */ -/* */ -/***************************************************************************/ -class ResultSetFactoryI : public ResultSetFactory -{ -public: - - ResultSetFactoryI(const Reference<XComponentContext >& rxContext, - const Reference<XContentProvider >& xProvider, - const Sequence<Property>& seq, - const std::vector<FTPDirentry>& dirvec) +ResultSetFactory::ResultSetFactory(const Reference<XComponentContext >& rxContext, + const Reference<XContentProvider >& xProvider, + const Sequence<Property>& seq, + const std::vector<FTPDirentry>& dirvec) : m_xContext(rxContext), m_xProvider(xProvider), m_seq(seq), m_dirvec(dirvec) - { - } +{ +} - virtual ResultSetBase* createResultSet() override - { - return new ResultSetI(m_xContext, - m_xProvider, - m_seq, - m_dirvec); - } -public: +ResultSetBase* ResultSetFactory::createResultSet() +{ + return new ResultSetI(m_xContext, + m_xProvider, + m_seq, + m_dirvec); +} - Reference< XComponentContext > m_xContext; - Reference< XContentProvider > m_xProvider; - Sequence< Property > m_seq; - std::vector<FTPDirentry> m_dirvec; -}; // XCommandProcessor methods. @@ -547,10 +532,10 @@ Any SAL_CALL FTPContent::execute( const Command& aCommand, = new DynamicResultSet( m_xContext, aOpenCommand, - new ResultSetFactoryI(m_xContext, - m_xProvider.get(), - aOpenCommand.Properties, - resvec)); + new ResultSetFactory(m_xContext, + m_xProvider.get(), + aOpenCommand.Properties, + resvec)); aRet <<= xSet; } else if(aOpenCommand.Mode == diff --git a/ucb/source/ucp/ftp/ftpresultsetfactory.hxx b/ucb/source/ucp/ftp/ftpresultsetfactory.hxx index 30cb9a46b1e1..624f0240a309 100644 --- a/ucb/source/ucp/ftp/ftpresultsetfactory.hxx +++ b/ucb/source/ucp/ftp/ftpresultsetfactory.hxx @@ -26,20 +26,29 @@ #define INCLUDED_UCB_SOURCE_UCP_FTP_FTPRESULTSETFACTORY_HXX #include "ftpresultsetbase.hxx" - +#include <com/sun/star/uno/XComponentContext.hpp> +#include <com/sun/star/beans/Property.hpp> +#include <vector> namespace ftp { - class ResultSetBase; - - class ResultSetFactory - { - public: - - virtual ~ResultSetFactory() { }; - - virtual ResultSetBase* createResultSet() = 0; - }; +class ResultSetBase; + +class ResultSetFactory +{ +public: + ResultSetFactory(const css::uno::Reference<css::uno::XComponentContext >& rxContext, + const css::uno::Reference<css::ucb::XContentProvider >& xProvider, + const css::uno::Sequence<css::beans::Property>& seq, + const std::vector<FTPDirentry>& dirvec); + + ResultSetBase* createResultSet(); +private: + css::uno::Reference< css::uno::XComponentContext > m_xContext; + css::uno::Reference< css::ucb::XContentProvider > m_xProvider; + css::uno::Sequence< css::beans::Property > m_seq; + std::vector<FTPDirentry> m_dirvec; +}; } |