From 0a94746db12fbab5c30c1009912ee910b9f20553 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 10 Sep 2015 17:40:45 +0200 Subject: ucb: fix another duplicate WeakImplHelper Change-Id: I0728601cd7abd8f8d718728d5983aed94355bdc0 --- ucb/source/ucp/ftp/ftpcontent.cxx | 8 ++++---- ucb/source/ucp/ftp/ftpintreq.cxx | 26 ++++++++------------------ ucb/source/ucp/ftp/ftpintreq.hxx | 19 +++++++------------ 3 files changed, 19 insertions(+), 34 deletions(-) (limited to 'ucb') diff --git a/ucb/source/ucp/ftp/ftpcontent.cxx b/ucb/source/ucp/ftp/ftpcontent.cxx index 442fe1ddf434..c150284a6fe4 100644 --- a/ucb/source/ucp/ftp/ftpcontent.cxx +++ b/ucb/source/ucp/ftp/ftpcontent.cxx @@ -803,10 +803,10 @@ void FTPContent::insert(const InsertCommandArgument& aInsertCommand, ucbhelper::cancelCommandExecution(aAny,Env); } - XInteractionRequestImpl* p = new XInteractionRequestImpl; - Reference req(p); - xInt->handle(req); - if(p->approved()) { + XInteractionRequestImpl request; + Reference xReq(request.getRequest()); + xInt->handle(xReq); + if (request.approved()) { bReplace = true; goto retry; } diff --git a/ucb/source/ucp/ftp/ftpintreq.cxx b/ucb/source/ucp/ftp/ftpintreq.cxx index 55f51d3aca26..4cb1c9beb3d0 100644 --- a/ucb/source/ucp/ftp/ftpintreq.cxx +++ b/ucb/source/ucp/ftp/ftpintreq.cxx @@ -18,9 +18,12 @@ */ +#include "ftpintreq.hxx" + +#include + #include #include -#include "ftpintreq.hxx" using namespace cppu; using namespace com::sun::star; @@ -65,28 +68,15 @@ void SAL_CALL XInteractionDisapproveImpl::select() XInteractionRequestImpl::XInteractionRequestImpl() : p1( new XInteractionApproveImpl ) , p2( new XInteractionDisapproveImpl ) - , m_aSeq( 2 ) -{ - m_aSeq[0] = Reference(p1); - m_aSeq[1] = Reference(p2); -} - -Any SAL_CALL XInteractionRequestImpl::getRequest( ) - throw (RuntimeException, - std::exception) { + uno::Sequence> continuations{ + Reference(p1), + Reference(p2) }; Any aAny; UnsupportedNameClashException excep; excep.NameClash = NameClash::ERROR; aAny <<= excep; - return aAny; -} - -Sequence > SAL_CALL XInteractionRequestImpl::getContinuations() - throw (RuntimeException, - std::exception) -{ - return m_aSeq; + m_xRequest.set(new ::comphelper::OInteractionRequest(aAny, continuations)); } bool XInteractionRequestImpl::approved() const diff --git a/ucb/source/ucp/ftp/ftpintreq.hxx b/ucb/source/ucp/ftp/ftpintreq.hxx index ce8d8faf2fbb..3bab88b5f6c1 100644 --- a/ucb/source/ucp/ftp/ftpintreq.hxx +++ b/ucb/source/ucp/ftp/ftpintreq.hxx @@ -71,30 +71,25 @@ namespace ftp { - class XInteractionRequestImpl : public cppu::WeakImplHelper< - css::task::XInteractionRequest > + class XInteractionRequestImpl { public: XInteractionRequestImpl(); - com::sun::star::uno::Any SAL_CALL getRequest( ) - throw (css::uno::RuntimeException, - std::exception) SAL_OVERRIDE; - - css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL - getContinuations( ) - throw (css::uno::RuntimeException, - std::exception) SAL_OVERRIDE; - bool approved() const; + css::uno::Reference const& getRequest() const + { + return m_xRequest; + } + private: XInteractionApproveImpl* p1; XInteractionDisapproveImpl* p2; - css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > m_aSeq; + css::uno::Reference m_xRequest; }; } -- cgit