diff options
author | Michael Stahl <mstahl@redhat.com> | 2015-09-10 17:40:45 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2015-09-10 17:42:25 +0200 |
commit | 0a94746db12fbab5c30c1009912ee910b9f20553 (patch) | |
tree | 17ba07b5b8af42d766a07f384cfa7c5e792f9983 /ucb | |
parent | 67f4626d079678e125f74fe0897d86341cda272d (diff) |
ucb: fix another duplicate WeakImplHelper<XInteractionRequest>
Change-Id: I0728601cd7abd8f8d718728d5983aed94355bdc0
Diffstat (limited to 'ucb')
-rw-r--r-- | ucb/source/ucp/ftp/ftpcontent.cxx | 8 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpintreq.cxx | 26 | ||||
-rw-r--r-- | ucb/source/ucp/ftp/ftpintreq.hxx | 19 |
3 files changed, 19 insertions, 34 deletions
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<XInteractionRequest> req(p); - xInt->handle(req); - if(p->approved()) { + XInteractionRequestImpl request; + Reference<XInteractionRequest> 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 <comphelper/interaction.hxx> + #include <com/sun/star/ucb/UnsupportedNameClashException.hpp> #include <com/sun/star/ucb/NameClash.hpp> -#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<XInteractionContinuation>(p1); - m_aSeq[1] = Reference<XInteractionContinuation>(p2); -} - -Any SAL_CALL XInteractionRequestImpl::getRequest( ) - throw (RuntimeException, - std::exception) { + uno::Sequence<uno::Reference<task::XInteractionContinuation>> continuations{ + Reference<XInteractionContinuation>(p1), + Reference<XInteractionContinuation>(p2) }; Any aAny; UnsupportedNameClashException excep; excep.NameClash = NameClash::ERROR; aAny <<= excep; - return aAny; -} - -Sequence<Reference<XInteractionContinuation > > 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<css::task::XInteractionRequest> 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<css::task::XInteractionRequest> m_xRequest; }; } |