diff options
author | Noel Grandin <noel@peralex.com> | 2013-01-07 11:05:58 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2013-01-09 08:08:19 +0200 |
commit | 46fe5e5e06dba9a450f9339b0bf662547a6966e4 (patch) | |
tree | de0a5ecbd3b64aa111570285dbc282c369a4e8b7 /forms/source/solar | |
parent | 0b6a0657491fdd126541018ac32810f80698ebd0 (diff) |
fdo#46808, convert UnoControl and sub-classes to XComponentContext
Change-Id: I4ade267a44620f5a3af8009ac57a2456c62b83bc
Diffstat (limited to 'forms/source/solar')
-rw-r--r-- | forms/source/solar/component/navbarcontrol.cxx | 8 | ||||
-rw-r--r-- | forms/source/solar/component/navbarcontrol.hxx | 3 |
2 files changed, 6 insertions, 5 deletions
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx index 092f885c0002..6f86eee71d4b 100644 --- a/forms/source/solar/component/navbarcontrol.cxx +++ b/forms/source/solar/component/navbarcontrol.cxx @@ -94,8 +94,8 @@ namespace frm //================================================================== DBG_NAME( ONavigationBarControl ) //------------------------------------------------------------------ - ONavigationBarControl::ONavigationBarControl( const Reference< XMultiServiceFactory >& _rxORB ) - :UnoControl( _rxORB ) + ONavigationBarControl::ONavigationBarControl( const Reference< XComponentContext >& _rxORB) + :UnoControl(), m_xContext(_rxORB) { DBG_CTOR( ONavigationBarControl, NULL ); } @@ -170,7 +170,7 @@ namespace frm } // create the peer - ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( maContext.getLegacyServiceFactory(), pParentWin, getModel() ); + ONavigationBarPeer* pPeer = ONavigationBarPeer::Create( Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW), pParentWin, getModel() ); DBG_ASSERT( pPeer, "ONavigationBarControl::createPeer: invalid peer returned!" ); if ( pPeer ) // by definition, the returned component is aquired once @@ -234,7 +234,7 @@ namespace frm //------------------------------------------------------------------ Reference< XInterface > SAL_CALL ONavigationBarControl::Create( const Reference< XMultiServiceFactory >& _rxFactory ) { - return *( new ONavigationBarControl( _rxFactory ) ); + return *( new ONavigationBarControl( comphelper::getComponentContext(_rxFactory) ) ); } //------------------------------------------------------------------ diff --git a/forms/source/solar/component/navbarcontrol.hxx b/forms/source/solar/component/navbarcontrol.hxx index 4188b3dcd4bf..78af8e4d7019 100644 --- a/forms/source/solar/component/navbarcontrol.hxx +++ b/forms/source/solar/component/navbarcontrol.hxx @@ -46,9 +46,10 @@ namespace frm :public UnoControl ,public ONavigationBarControl_Base { + ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_xContext; public: ONavigationBarControl( - const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB + const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB ); protected: |