diff options
author | Noel Grandin <noel@peralex.com> | 2013-06-03 08:34:09 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-06-03 10:00:03 +0200 |
commit | d209e133191853f12557d879d1dcda7a0309dac6 (patch) | |
tree | f49624949123d6ae5486b817daafaf7fb7778a4b /forms | |
parent | 2838b8eb5ead00780ed9ed9410abee8b8d53a9a4 (diff) |
fdo#46808, Convert comphelper::ComponentContext in forms module
Change-Id: I8a9913d964633381f00c0a4885cc655805fa1974
Diffstat (limited to 'forms')
70 files changed, 290 insertions, 269 deletions
diff --git a/forms/source/component/Button.cxx b/forms/source/component/Button.cxx index b7c759aeedb9..0866a233c531 100644 --- a/forms/source/component/Button.cxx +++ b/forms/source/component/Button.cxx @@ -24,6 +24,7 @@ #include <comphelper/streamsection.hxx> #include <comphelper/basicio.hxx> +#include <comphelper/processfactory.hxx> #include <tools/diagnose_ex.h> #include <tools/debug.hxx> #include <tools/urlobj.hxx> @@ -55,11 +56,11 @@ DBG_NAME(OButtonModel) //------------------------------------------------------------------ InterfaceRef SAL_CALL OButtonModel_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) { - return *(new OButtonModel(_rxFactory)); + return *(new OButtonModel( comphelper::getComponentContext(_rxFactory) )); } //------------------------------------------------------------------ -OButtonModel::OButtonModel(const Reference<XMultiServiceFactory>& _rxFactory) +OButtonModel::OButtonModel(const Reference<XComponentContext>& _rxFactory) :OClickableImageBaseModel( _rxFactory, VCL_CONTROLMODEL_COMMANDBUTTON, FRM_SUN_CONTROL_COMMANDBUTTON ) // use the old control name for compatibility reasons ,m_aResetHelper( *this, m_aMutex ) @@ -88,7 +89,7 @@ Sequence< Type > OButtonModel::_getTypes() } //------------------------------------------------------------------ -OButtonModel::OButtonModel( const OButtonModel* _pOriginal, const Reference<XMultiServiceFactory>& _rxFactory ) +OButtonModel::OButtonModel( const OButtonModel* _pOriginal, const Reference<XComponentContext>& _rxFactory ) :OClickableImageBaseModel( _pOriginal, _rxFactory ) ,m_aResetHelper( *this, m_aMutex ) ,m_eDefaultState( _pOriginal->m_eDefaultState ) @@ -339,7 +340,7 @@ void OButtonModel::impl_resetNoBroadcast_nothrow() //------------------------------------------------------------------ InterfaceRef SAL_CALL OButtonControl_CreateInstance(const Reference<XMultiServiceFactory>& _rxFactory) { - return *(new OButtonControl(_rxFactory)); + return *(new OButtonControl( comphelper::getComponentContext(_rxFactory) )); } //------------------------------------------------------------------------------ @@ -364,7 +365,7 @@ StringSequence OButtonControl::getSupportedServiceNames() throw() } //------------------------------------------------------------------------------ -OButtonControl::OButtonControl(const Reference<XMultiServiceFactory>& _rxFactory) +OButtonControl::OButtonControl(const Reference<XComponentContext>& _rxFactory) :OClickableImageBaseControl(_rxFactory, VCL_CONTROL_COMMANDBUTTON) ,OFormNavigationHelper( _rxFactory ) ,m_nClickEvent( 0 ) @@ -681,7 +682,7 @@ sal_Int16 OButtonControl::getModelUrlFeatureId( ) const // is it a feature URL? if ( isFormControllerURL( sUrl ) ) { - OFormNavigationMapper aMapper( m_aContext.getLegacyServiceFactory() ); + OFormNavigationMapper aMapper( m_xContext ); nFeatureId = aMapper.getFeatureId( sUrl ); } } diff --git a/forms/source/component/Button.hxx b/forms/source/component/Button.hxx index 0128cebb5b01..cc8090d105ae 100644 --- a/forms/source/component/Button.hxx +++ b/forms/source/component/Button.hxx @@ -130,7 +130,7 @@ protected: virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type> _getTypes(); public: - OButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory>& _rxFactory); + OButtonControl(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rxFactory); |