summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/menu/virtmenu.cxx3
-rw-r--r--sfx2/source/toolbox/tbxitem.cxx4
-rw-r--r--sfx2/source/view/ipclient.cxx21
3 files changed, 8 insertions, 20 deletions
diff --git a/sfx2/source/menu/virtmenu.cxx b/sfx2/source/menu/virtmenu.cxx
index 81f186c3e541..87b3a88a3294 100644
--- a/sfx2/source/menu/virtmenu.cxx
+++ b/sfx2/source/menu/virtmenu.cxx
@@ -766,8 +766,7 @@ void SfxVirtualMenu::UnbindControllers()
void SfxVirtualMenu::InsertAddOnsMenuItem( Menu* pMenu )
{
// Create special popup menu that is filled with the 3rd party components popup menu items
- Reference<com::sun::star::lang::XMultiServiceFactory> aXMultiServiceFactory(::comphelper::getProcessServiceFactory());
- ::framework::MenuConfiguration aConf( aXMultiServiceFactory );
+ ::framework::MenuConfiguration aConf( ::comphelper::getProcessComponentContext() );
Reference<com::sun::star::frame::XFrame> xFrame( pBindings->GetDispatcher_Impl()->GetFrame()->GetFrame().GetFrameInterface() );
PopupMenu* pAddonMenu = NULL;
diff --git a/sfx2/source/toolbox/tbxitem.cxx b/sfx2/source/toolbox/tbxitem.cxx
index bf7003d36c54..fe863b0b7e58 100644
--- a/sfx2/source/toolbox/tbxitem.cxx
+++ b/sfx2/source/toolbox/tbxitem.cxx
@@ -1485,7 +1485,7 @@ SfxPopupWindow* SfxAppToolBoxControl_Impl::CreatePopupWindow()
if ( !pMenu )
{
- ::framework::MenuConfiguration aConf( m_xServiceManager );
+ ::framework::MenuConfiguration aConf( comphelper::getComponentContext(m_xServiceManager) );
if ( m_aCommandURL == ".uno:AddDirect" )
pMenu = aConf.CreateBookmarkMenu( m_xFrame, BOOKMARK_NEWMENU );
else
@@ -1552,7 +1552,7 @@ void SfxAppToolBoxControl_Impl::StateChanged
// to check for supported URLs ...
if ( !pMenu )
{
- ::framework::MenuConfiguration aConf( m_xServiceManager );
+ ::framework::MenuConfiguration aConf( comphelper::getComponentContext(m_xServiceManager) );
// This toolbox controller is used for two popup menus (new documents and wizards!). Create the correct
// popup menu according to the slot ID our controller has been initialized with.
if ( nSlotId == SID_NEWDOCDIRECT )
diff --git a/sfx2/source/view/ipclient.cxx b/sfx2/source/view/ipclient.cxx
index ffed312864dd..64c9a81e6c9f 100644
--- a/sfx2/source/view/ipclient.cxx
+++ b/sfx2/source/view/ipclient.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/embed/StateChangeInProgressException.hpp>
#include <com/sun/star/embed/XLinkageSupport.hpp>
#include <com/sun/star/lang/XInitialization.hpp>
-#include <com/sun/star/task/XStatusIndicatorFactory.hpp>
+#include <com/sun/star/task/StatusIndicatorFactory.hpp>
#include <com/sun/star/task/XStatusIndicator.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
@@ -231,7 +231,7 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject()
uno::Reference< frame::XFrame > xFrame;
uno::Reference< task::XStatusIndicator > xStatusIndicator;
uno::Reference< frame::XModel > xModel( m_xObject->getComponent(), uno::UNO_QUERY );
- uno::Reference< lang::XMultiServiceFactory > xSrvMgr( ::comphelper::getProcessServiceFactory() );
+ uno::Reference< uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
if ( xModel.is() )
{
@@ -240,29 +240,18 @@ void SAL_CALL SfxInPlaceClient_Impl::saveObject()
xFrame = xController->getFrame();
}
- if ( xSrvMgr.is() && xFrame.is() )
+ if ( xFrame.is() )
{
// set non-reschedule progress to prevent problems when asynchronous calls are made
// during storing of the embedded object
- uno::Reference< lang::XInitialization > xInit(
- xSrvMgr->createInstance( "com.sun.star.comp.framework.StatusIndicatorFactory" ), uno::UNO_QUERY_THROW );
- beans::PropertyValue aProperty;
- uno::Sequence< uno::Any > aArgs( 2 );
- aProperty.Name = "DisableReschedule";
- aProperty.Value = uno::makeAny( sal_True );
- aArgs[0] = uno::makeAny( aProperty );
- aProperty.Name = "Frame";
- aProperty.Value = uno::makeAny( xFrame );
- aArgs[1] = uno::makeAny( aProperty );
-
- xInit->initialize( aArgs );
+ uno::Reference< task::XStatusIndicatorFactory > xStatusIndicatorFactory =
+ task::StatusIndicatorFactory::createWithFrame( xContext, xFrame, sal_True/*DisableReschedule*/, sal_False/*AllowParentShow*/ );
uno::Reference< beans::XPropertySet > xPropSet( xFrame, uno::UNO_QUERY );
if ( xPropSet.is() )
{
try
{
- uno::Reference< task::XStatusIndicatorFactory > xStatusIndicatorFactory( xInit, uno::UNO_QUERY_THROW );
xStatusIndicator = xStatusIndicatorFactory->createStatusIndicator();
xPropSet->setPropertyValue( "IndicatorInterception" , uno::makeAny( xStatusIndicator ));
}