diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-17 13:07:53 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2017-01-17 15:27:33 +0200 |
commit | 04790b233278f558f5a5be3c811b9ac7a68bc8bf (patch) | |
tree | 8a1d23565dda271aac8d73577fe7de725cc047a9 /framework | |
parent | 4d3ad2640332d811d50055df81243fdd813edfc8 (diff) |
use rtl::Reference in RequestFilterSelect_Impl
instead of raw pointers
Change-Id: I86e929d71afc1ce9852d2b01339f7623cc119fcb
Diffstat (limited to 'framework')
-rw-r--r-- | framework/source/fwe/dispatch/interaction.cxx | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/framework/source/fwe/dispatch/interaction.cxx b/framework/source/fwe/dispatch/interaction.cxx index e0c3b9e7662f..a4a7fc2e2b0d 100644 --- a/framework/source/fwe/dispatch/interaction.cxx +++ b/framework/source/fwe/dispatch/interaction.cxx @@ -96,9 +96,8 @@ public: private: css::uno::Any m_aRequest; - css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > m_lContinuations; - comphelper::OInteractionAbort* m_pAbort; - ContinuationFilterSelect* m_pFilter; + rtl::Reference<comphelper::OInteractionAbort> m_xAbort; + rtl::Reference<ContinuationFilterSelect> m_xFilter; }; // initialize instance with all necessary information @@ -113,12 +112,8 @@ RequestFilterSelect_Impl::RequestFilterSelect_Impl( const OUString& sURL ) sURL ); m_aRequest <<= aFilterRequest; - m_pAbort = new comphelper::OInteractionAbort; - m_pFilter = new ContinuationFilterSelect; - - m_lContinuations.realloc( 2 ); - m_lContinuations[0].set( m_pAbort ); - m_lContinuations[1].set( m_pFilter ); + m_xAbort = new comphelper::OInteractionAbort; + m_xFilter = new ContinuationFilterSelect; } // return abort state of interaction @@ -126,7 +121,7 @@ RequestFilterSelect_Impl::RequestFilterSelect_Impl( const OUString& sURL ) bool RequestFilterSelect_Impl::isAbort() const { - return m_pAbort->wasSelected(); + return m_xAbort->wasSelected(); } // return user selected filter @@ -134,7 +129,7 @@ bool RequestFilterSelect_Impl::isAbort() const OUString RequestFilterSelect_Impl::getFilter() const { - return m_pFilter->getFilter(); + return m_xFilter->getFilter(); } // handler call it to get type of request @@ -152,7 +147,7 @@ css::uno::Any SAL_CALL RequestFilterSelect_Impl::getRequest() throw( css::uno::R css::uno::Sequence< css::uno::Reference< css::task::XInteractionContinuation > > SAL_CALL RequestFilterSelect_Impl::getContinuations() throw( css::uno::RuntimeException, std::exception ) { - return m_lContinuations; + return { m_xAbort.get(), m_xFilter.get() }; } RequestFilterSelect::RequestFilterSelect( const OUString& sURL ) |