diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-06 15:05:52 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2023-03-06 19:58:02 +0000 |
commit | bb92647934cd4c925e0db13c7ab78fdd8eec69ec (patch) | |
tree | 5afa89880b0ae98246ea4e237a9199f8aee6bead /forms/source | |
parent | 7f101a514827d0bc57c6626eeed99ecf26658aa9 (diff) |
no need to allocate these separately
they are all one or two words in size
Change-Id: Idc76cb87d1dae7ef245f327dc4afebaf71190f6b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/148342
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'forms/source')
-rw-r--r-- | forms/source/component/clickableimage.cxx | 14 | ||||
-rw-r--r-- | forms/source/component/clickableimage.hxx | 5 | ||||
-rw-r--r-- | forms/source/helper/formnavigation.cxx | 10 | ||||
-rw-r--r-- | forms/source/inc/formnavigation.hxx | 6 |
4 files changed, 17 insertions, 18 deletions
diff --git a/forms/source/component/clickableimage.cxx b/forms/source/component/clickableimage.cxx index 03329382f5c0..e1f6f068faf0 100644 --- a/forms/source/component/clickableimage.cxx +++ b/forms/source/component/clickableimage.cxx @@ -85,10 +85,10 @@ namespace frm OClickableImageBaseControl::OClickableImageBaseControl(const Reference<XComponentContext>& _rxFactory, const OUString& _aService) :OControl(_rxFactory, _aService) ,m_aSubmissionVetoListeners( m_aMutex ) + ,m_aFeatureInterception( _rxFactory ) ,m_aApproveActionListeners( m_aMutex ) ,m_aActionListeners( m_aMutex ) { - m_pFeatureInterception.reset( new ControlFeatureInterception( _rxFactory ) ); } @@ -129,13 +129,13 @@ namespace frm void SAL_CALL OClickableImageBaseControl::registerDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) { - m_pFeatureInterception->registerDispatchProviderInterceptor( _rxInterceptor ); + m_aFeatureInterception.registerDispatchProviderInterceptor( _rxInterceptor ); } void SAL_CALL OClickableImageBaseControl::releaseDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) { - m_pFeatureInterception->releaseDispatchProviderInterceptor( _rxInterceptor ); + m_aFeatureInterception.releaseDispatchProviderInterceptor( _rxInterceptor ); } // OComponentHelper @@ -146,7 +146,7 @@ namespace frm m_aApproveActionListeners.disposeAndClear( aEvent ); m_aActionListeners.disposeAndClear( aEvent ); m_aSubmissionVetoListeners.disposeAndClear( aEvent ); - m_pFeatureInterception->dispose(); + m_aFeatureInterception.dispose(); { ::osl::MutexGuard aGuard( m_aMutex ); @@ -234,7 +234,7 @@ namespace frm case FormButtonType_SUBMIT: { // if some outer component can provide an interaction handler, use it - Reference< XInteractionHandler > xHandler( m_pFeatureInterception->queryDispatch( "private:/InteractionHandler" ), UNO_QUERY ); + Reference< XInteractionHandler > xHandler( m_aFeatureInterception.queryDispatch( "private:/InteractionHandler" ), UNO_QUERY ); try { implSubmit( rEvt, xHandler ); @@ -292,7 +292,7 @@ namespace frm xSet->getPropertyValue(PROPERTY_DISPATCHURLINTERNAL) >>= bDispatchUrlInternal; if ( bDispatchUrlInternal ) { - m_pFeatureInterception->getTransformer().parseSmartWithProtocol( aURL, INET_FILE_SCHEME ); + m_aFeatureInterception.getTransformer().parseSmartWithProtocol( aURL, INET_FILE_SCHEME ); OUString aTargetFrame; xSet->getPropertyValue(PROPERTY_TARGET_FRAME) >>= aTargetFrame; @@ -308,7 +308,7 @@ namespace frm } else { - URL aHyperLink = m_pFeatureInterception->getTransformer().getStrictURL( ".uno:OpenHyperlink" ); + URL aHyperLink = m_aFeatureInterception.getTransformer().getStrictURL( ".uno:OpenHyperlink" ); Reference< XDispatch > xDisp = Reference< XDispatchProvider > (xFrame,UNO_QUERY_THROW)->queryDispatch(aHyperLink, OUString() , 0); diff --git a/forms/source/component/clickableimage.hxx b/forms/source/component/clickableimage.hxx index 48b511c86a5f..2ec7b921224b 100644 --- a/forms/source/component/clickableimage.hxx +++ b/forms/source/component/clickableimage.hxx @@ -23,6 +23,7 @@ #include <FormComponent.hxx> #include "EventThread.hxx" #include "imgprod.hxx" +#include <controlfeatureinterception.hxx> #include <tools/link.hxx> #include <comphelper/interfacecontainer3.hxx> #include <comphelper/propmultiplex.hxx> @@ -45,7 +46,6 @@ namespace frm class OImageProducerThread_Impl; - class ControlFeatureInterception; // OClickableImageBaseModel @@ -190,8 +190,7 @@ namespace frm rtl::Reference<OImageProducerThread_Impl> m_pThread; ::comphelper::OInterfaceContainerHelper3<css::form::submission::XSubmissionVetoListener> m_aSubmissionVetoListeners; - ::std::unique_ptr< ControlFeatureInterception > - m_pFeatureInterception; + ControlFeatureInterception m_aFeatureInterception; protected: ::comphelper::OInterfaceContainerHelper3<css::form::XApproveActionListener> m_aApproveActionListeners; diff --git a/forms/source/helper/formnavigation.cxx b/forms/source/helper/formnavigation.cxx index a99f29b24f50..be87c063e303 100644 --- a/forms/source/helper/formnavigation.cxx +++ b/forms/source/helper/formnavigation.cxx @@ -43,9 +43,9 @@ namespace frm OFormNavigationHelper::OFormNavigationHelper( const Reference< XComponentContext >& _rxORB ) :m_xORB( _rxORB ) + ,m_aFeatureInterception( m_xORB ) ,m_nConnectedFeatures( 0 ) { - m_pFeatureInterception.reset( new ControlFeatureInterception( m_xORB ) ); } @@ -56,7 +56,7 @@ namespace frm void OFormNavigationHelper::dispose( ) { - m_pFeatureInterception->dispose(); + m_aFeatureInterception.dispose(); disconnectDispatchers(); } @@ -81,14 +81,14 @@ namespace frm void SAL_CALL OFormNavigationHelper::registerDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) { - m_pFeatureInterception->registerDispatchProviderInterceptor( _rxInterceptor ); + m_aFeatureInterception.registerDispatchProviderInterceptor( _rxInterceptor ); interceptorsChanged(); } void SAL_CALL OFormNavigationHelper::releaseDispatchProviderInterceptor( const Reference< XDispatchProviderInterceptor >& _rxInterceptor ) { - m_pFeatureInterception->releaseDispatchProviderInterceptor( _rxInterceptor ); + m_aFeatureInterception.releaseDispatchProviderInterceptor( _rxInterceptor ); interceptorsChanged(); } @@ -262,7 +262,7 @@ namespace frm Reference< XDispatch > OFormNavigationHelper::queryDispatch( const URL& _rURL ) { - return m_pFeatureInterception->queryDispatch( _rURL ); + return m_aFeatureInterception.queryDispatch( _rURL ); } diff --git a/forms/source/inc/formnavigation.hxx b/forms/source/inc/formnavigation.hxx index e18b99a1bc77..03715d28aba8 100644 --- a/forms/source/inc/formnavigation.hxx +++ b/forms/source/inc/formnavigation.hxx @@ -24,6 +24,7 @@ #include <com/sun/star/uno/XComponentContext.hpp> #include <cppuhelper/implbase2.hxx> #include "featuredispatcher.hxx" +#include "controlfeatureinterception.hxx" #include <vector> #include <map> #include <memory> @@ -34,7 +35,6 @@ namespace frm class UrlTransformer; - class ControlFeatureInterception; //= OFormNavigationHelper @@ -62,8 +62,8 @@ namespace frm private: css::uno::Reference< css::uno::XComponentContext > m_xORB; - ::std::unique_ptr< ControlFeatureInterception > - m_pFeatureInterception; + ControlFeatureInterception + m_aFeatureInterception; // all supported features FeatureMap m_aSupportedFeatures; |