diff options
Diffstat (limited to 'framework/source/uielement/toolbarmanager.cxx')
-rw-r--r-- | framework/source/uielement/toolbarmanager.cxx | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index bf39ac075d17..208fe1dc81af 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -897,17 +897,14 @@ void ToolBarManager::CreateControllers() RTL_LOGFILE_CONTEXT( aLog, "framework (cd100003) ::ToolBarManager::CreateControllers" ); Reference< XMultiComponentFactory > xToolbarControllerFactory( m_xToolbarControllerRegistration, UNO_QUERY ); - Reference< XComponentContext > xComponentContext; - Reference< XPropertySet > xProps( m_xServiceManager, UNO_QUERY ); + Reference< XComponentContext > xComponentContext( + comphelper::getComponentContext( m_xServiceManager ) ); Reference< XWindow > xToolbarWindow = VCLUnoHelper::GetInterface( m_pToolBar ); css::util::URL aURL; sal_Bool bHasDisabledEntries = SvtCommandOptions().HasEntries( SvtCommandOptions::CMDOPTION_DISABLED ); SvtCommandOptions aCmdOptions; - if ( xProps.is() ) - xProps->getPropertyValue( rtl::OUString( "DefaultContext" )) >>= xComponentContext; - for ( sal_uInt16 i = 0; i < m_pToolBar->GetItemCount(); i++ ) { sal_uInt16 nId = m_pToolBar->GetItemId( i ); |