diff options
-rw-r--r-- | extensions/source/propctrlr/submissionhandler.cxx | 13 | ||||
-rw-r--r-- | extensions/source/propctrlr/submissionhandler.hxx | 5 |
2 files changed, 8 insertions, 10 deletions
diff --git a/extensions/source/propctrlr/submissionhandler.cxx b/extensions/source/propctrlr/submissionhandler.cxx index f523cc7ad7f6..ed0b5d39a1d8 100644 --- a/extensions/source/propctrlr/submissionhandler.cxx +++ b/extensions/source/propctrlr/submissionhandler.cxx @@ -93,7 +93,6 @@ namespace pcr SubmissionPropertyHandler::SubmissionPropertyHandler( const Reference< XComponentContext >& _rxContext ) :EditPropertyHandler_Base( _rxContext ) ,OPropertyChangeListener( m_aMutex ) - ,m_pPropChangeMultiplexer( nullptr ) { } @@ -236,11 +235,10 @@ namespace pcr void SubmissionPropertyHandler::onNewComponent() { - if ( m_pPropChangeMultiplexer ) + if ( m_xPropChangeMultiplexer.is() ) { - m_pPropChangeMultiplexer->dispose(); - m_pPropChangeMultiplexer->release(); - m_pPropChangeMultiplexer = nullptr; + m_xPropChangeMultiplexer->dispose(); + m_xPropChangeMultiplexer.clear(); } EditPropertyHandler_Base::onNewComponent(); @@ -254,9 +252,8 @@ namespace pcr { m_pHelper.reset( new SubmissionHelper( m_aMutex, m_xComponent, xDocument ) ); - m_pPropChangeMultiplexer = new OPropertyChangeMultiplexer( this, m_xComponent ); - m_pPropChangeMultiplexer->acquire(); - m_pPropChangeMultiplexer->addProperty( PROPERTY_BUTTONTYPE ); + m_xPropChangeMultiplexer = new OPropertyChangeMultiplexer( this, m_xComponent ); + m_xPropChangeMultiplexer->addProperty( PROPERTY_BUTTONTYPE ); } } diff --git a/extensions/source/propctrlr/submissionhandler.hxx b/extensions/source/propctrlr/submissionhandler.hxx index 63bcbb34fdd0..f0408e4d2c8b 100644 --- a/extensions/source/propctrlr/submissionhandler.hxx +++ b/extensions/source/propctrlr/submissionhandler.hxx @@ -25,6 +25,7 @@ #include <com/sun/star/xforms/XSubmission.hpp> #include <comphelper/propmultiplex.hxx> +#include <rtl/ref.hxx> namespace comphelper { @@ -68,8 +69,8 @@ namespace pcr class SubmissionPropertyHandler : public EditPropertyHandler_Base, public ::comphelper::OPropertyChangeListener { private: - ::std::unique_ptr< SubmissionHelper > m_pHelper; - ::comphelper::OPropertyChangeMultiplexer* m_pPropChangeMultiplexer; + ::std::unique_ptr< SubmissionHelper > m_pHelper; + rtl::Reference<::comphelper::OPropertyChangeMultiplexer> m_xPropChangeMultiplexer; public: explicit SubmissionPropertyHandler( |