From 3459ab4a5de1af443a85f66cecc0eeeb6d46df3f Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Mon, 4 Jul 2016 11:44:42 +0200 Subject: merge ftp::ResultSetFactory with ResultSetFactoryI Change-Id: I061145fefef33aa3e7349adf7da03222c3b2a911 Reviewed-on: https://gerrit.libreoffice.org/26898 Tested-by: Jenkins Reviewed-by: Noel Grandin --- ucb/source/ucp/ftp/ftpcontent.cxx | 49 +++++++++++------------------- ucb/source/ucp/ftp/ftpresultsetfactory.hxx | 31 ++++++++++++------- 2 files changed, 37 insertions(+), 43 deletions(-) (limited to 'ucb') 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& rxContext, - const Reference& xProvider, - const Sequence& seq, - const std::vector& dirvec) +ResultSetFactory::ResultSetFactory(const Reference& rxContext, + const Reference& xProvider, + const Sequence& seq, + const std::vector& 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 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 +#include +#include namespace ftp { - class ResultSetBase; - - class ResultSetFactory - { - public: - - virtual ~ResultSetFactory() { }; - - virtual ResultSetBase* createResultSet() = 0; - }; +class ResultSetBase; + +class ResultSetFactory +{ +public: + ResultSetFactory(const css::uno::Reference& rxContext, + const css::uno::Reference& xProvider, + const css::uno::Sequence& seq, + const std::vector& 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 m_dirvec; +}; } -- cgit