diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 13:15:15 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-09-19 13:16:38 +0200 |
commit | 03a9f139bd9ea1a4f9096fc982e6b326def58532 (patch) | |
tree | bfb7a08bb4831a1a46b48c3bb49afa77ca436349 /framework/source | |
parent | e8a169c93d7e2443a2e56afe7e99cd0721a2c27b (diff) |
ComponentContext::getUnoContext -> getComponentContext simplification
...and some further clean-up.
Change-Id: If5dce53e382b56390c502d0d0d93fc06cbfe33ea
Diffstat (limited to 'framework/source')
22 files changed, 51 insertions, 60 deletions
diff --git a/framework/source/classes/droptargetlistener.cxx b/framework/source/classes/droptargetlistener.cxx index 2e20817dd04c..97bddf509d4f 100644 --- a/framework/source/classes/droptargetlistener.cxx +++ b/framework/source/classes/droptargetlistener.cxx @@ -42,7 +42,7 @@ #include <svtools/transfer.hxx> #include <unotools/localfilehelper.hxx> #include <sot/filelist.hxx> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <osl/file.hxx> #include <vcl/svapp.hxx> @@ -221,7 +221,7 @@ void DropTargetListener::implts_OpenFile( const String& rFilePath ) /* SAFE { */ ReadGuard aReadLock(m_aLock); css::uno::Reference< css::frame::XFrame > xTargetFrame( m_xTargetFrame.get(), css::uno::UNO_QUERY ); - css::uno::Reference< css::util::XURLTransformer > xParser ( css::util::URLTransformer::create(::comphelper::ComponentContext(m_xFactory).getUNOContext()) ); + css::uno::Reference< css::util::XURLTransformer > xParser ( css::util::URLTransformer::create(::comphelper::getComponentContext(m_xFactory)) ); aReadLock.unlock(); /* } SAFE */ if (xTargetFrame.is() && xParser.is()) diff --git a/framework/source/classes/menumanager.cxx b/framework/source/classes/menumanager.cxx index 99ad8b76a0c1..4736bd96b5ae 100644 --- a/framework/source/classes/menumanager.cxx +++ b/framework/source/classes/menumanager.cxx @@ -49,7 +49,6 @@ #include <com/sun/star/util/XStringWidth.hpp> #include <comphelper/processfactory.hxx> -#include <comphelper/componentcontext.hxx> #include <comphelper/extract.hxx> #include <svtools/menuoptions.hxx> @@ -289,7 +288,7 @@ void MenuManager::SetHdl() m_pVCLMenu->SetSelectHdl( LINK( this, MenuManager, Select )); if ( mxServiceFactory.is() ) - m_xURLTransformer.set( URLTransformer::create(::comphelper::ComponentContext(mxServiceFactory).getUNOContext()) ); + m_xURLTransformer.set( URLTransformer::create(::comphelper::getComponentContext(mxServiceFactory)) ); } MenuManager::~MenuManager() diff --git a/framework/source/dispatch/systemexec.cxx b/framework/source/dispatch/systemexec.cxx index 4daeb89d1d35..4d67609b1406 100644 --- a/framework/source/dispatch/systemexec.cxx +++ b/framework/source/dispatch/systemexec.cxx @@ -38,7 +38,7 @@ #include <com/sun/star/frame/DispatchResultState.hpp> #include <vcl/svapp.hxx> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> namespace framework{ @@ -157,7 +157,7 @@ void SAL_CALL SystemExec::dispatchWithNotification( const css::util::URL& try { - css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::ComponentContext(xFactory).getUNOContext() ); + css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::getComponentContext(xFactory) ); css::uno::Reference< css::util::XStringSubstitution > xPathSubst( css::util::PathSubstitution::create(xContext) ); ::rtl::OUString sSystemURL = xPathSubst->substituteVariables(sSystemURLWithVariables, sal_True); // sal_True force an exception if unknown variables exists ! diff --git a/framework/source/dispatch/windowcommanddispatch.cxx b/framework/source/dispatch/windowcommanddispatch.cxx index a2cc3690489c..2764b61715f3 100644 --- a/framework/source/dispatch/windowcommanddispatch.cxx +++ b/framework/source/dispatch/windowcommanddispatch.cxx @@ -37,7 +37,7 @@ #include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/XURLTransformer.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <vcl/window.hxx> #include <vcl/svapp.hxx> #include <vcl/cmdevt.hxx> @@ -175,7 +175,7 @@ void WindowCommandDispatch::impl_dispatchCommand(const ::rtl::OUString& sCommand if ( ! xProvider.is()) return; - css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::ComponentContext(xSMGR).getUNOContext())); + css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(xSMGR))); css::util::URL aCommand; aCommand.Complete = sCommand; xParser->parseStrict(aCommand); diff --git a/framework/source/jobs/shelljob.cxx b/framework/source/jobs/shelljob.cxx index ca941607cbf2..66f963917a7d 100644 --- a/framework/source/jobs/shelljob.cxx +++ b/framework/source/jobs/shelljob.cxx @@ -42,7 +42,7 @@ #include <osl/process.h> #include <vcl/svapp.hxx> #include <rtl/ustrbuf.hxx> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <comphelper/sequenceashashmap.hxx> //_______________________________________________ @@ -158,7 +158,7 @@ css::uno::Any ShellJob::impl_generateAnswer4Deactivation() try { - css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::ComponentContext(xSMGR).getUNOContext() ); + css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::getComponentContext(xSMGR) ); css::uno::Reference< css::util::XStringSubstitution > xSubst( css::util::PathSubstitution::create(xContext) ); const ::sal_Bool bSubstRequired = sal_True; const ::rtl::OUString sCompleteCommand = xSubst->substituteVariables(sCommand, bSubstRequired); diff --git a/framework/source/layoutmanager/layoutmanager.cxx b/framework/source/layoutmanager/layoutmanager.cxx index bc29f2419942..10094d988a33 100644 --- a/framework/source/layoutmanager/layoutmanager.cxx +++ b/framework/source/layoutmanager/layoutmanager.cxx @@ -66,7 +66,7 @@ #include <com/sun/star/lang/DisposedException.hpp> #include <com/sun/star/util/URLTransformer.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <svtools/imgdef.hxx> #include <tools/diagnose_ex.h> #include <vcl/window.hxx> @@ -118,7 +118,7 @@ LayoutManager::LayoutManager( const Reference< XMultiServiceFactory >& xServiceM , ::cppu::OBroadcastHelperVar< ::cppu::OMultiTypeInterfaceContainerHelper, ::cppu::OMultiTypeInterfaceContainerHelper::keyType >( m_aLock.getShareableOslMutex()) , LayoutManager_PBase( *(static_cast< ::cppu::OBroadcastHelper* >(this)) ) , m_xSMGR( xServiceManager ) - , m_xURLTransformer( URLTransformer::create(::comphelper::ComponentContext(xServiceManager).getUNOContext()) ) + , m_xURLTransformer( URLTransformer::create(::comphelper::getComponentContext(xServiceManager)) ) , m_xDisplayAccess( xServiceManager->createInstance( SERVICENAME_DISPLAYACCESS ), UNO_QUERY ) , m_nLockCount( 0 ) , m_bActive( false ) diff --git a/framework/source/loadenv/loadenv.cxx b/framework/source/loadenv/loadenv.cxx index 6a0eb041f964..243f8bc1007f 100644 --- a/framework/source/loadenv/loadenv.cxx +++ b/framework/source/loadenv/loadenv.cxx @@ -83,7 +83,6 @@ #include <svtools/sfxecode.hxx> #include <comphelper/processfactory.hxx> #include <unotools/ucbhelper.hxx> -#include <comphelper/componentcontext.hxx> #include <comphelper/configurationhelper.hxx> #include <rtl/ustrbuf.hxx> #include <vcl/svapp.hxx> @@ -280,7 +279,7 @@ void LoadEnv::initializeLoading(const ::rtl::OUString& // parse it - because some following code require that m_aURL.Complete = sURL; - css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::ComponentContext(m_xSMGR).getUNOContext())); + css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(m_xSMGR))); xParser->parseStrict(m_aURL); // BTW: Split URL and JumpMark ... @@ -703,7 +702,7 @@ LoadEnv::EContentType LoadEnv::classifyContent(const ::rtl::OUString& // (v) Last but not least the UCB is used inside office to // load contents. He has a special configuration to know // which URL schemata can be used inside office. - css::uno::Reference< css::ucb::XUniversalContentBroker > xUCB(css::ucb::UniversalContentBroker::create(comphelper::ComponentContext(xSMGR).getUNOContext())); + css::uno::Reference< css::ucb::XUniversalContentBroker > xUCB(css::ucb::UniversalContentBroker::create(comphelper::getComponentContext(xSMGR))); if (xUCB->queryContentProvider(sURL).is()) return E_CAN_BE_LOADED; @@ -1248,7 +1247,7 @@ void LoadEnv::impl_jumpToMark(const css::uno::Reference< css::frame::XFrame >& x css::util::URL aCmd; aCmd.Complete = ::rtl::OUString(".uno:JumpToMark"); - css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::ComponentContext(m_xSMGR).getUNOContext())); + css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(m_xSMGR))); xParser->parseStrict(aCmd); css::uno::Reference< css::frame::XDispatch > xDispatcher = xProvider->queryDispatch(aCmd, SPECIALTARGET_SELF, 0); diff --git a/framework/source/lomenubar/FrameHelper.cxx b/framework/source/lomenubar/FrameHelper.cxx index 4452a02cda73..f7e0ba6a414a 100644 --- a/framework/source/lomenubar/FrameHelper.cxx +++ b/framework/source/lomenubar/FrameHelper.cxx @@ -66,7 +66,7 @@ #include <com/sun/star/ui/XModuleUIConfigurationManagerSupplier.hpp> #include <com/sun/star/ui/ModuleUIConfigurationManagerSupplier.hpp> #include <rtl/process.h> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <gio/gio.h> //#pragma GCC diagnostic push @@ -267,8 +267,8 @@ FrameHelper::FrameHelper(const Reference< XMultiServiceFactory >& rServiceManag : m_xStatusListener(new MenuItemStatusListener(this)) , m_pDispatchRegistry(new framework::lomenubar::DispatchRegistry(m_xStatusListener)) , m_xMSF(rServiceManager) - , m_xTrans(util::URLTransformer::create(comphelper::ComponentContext(m_xMSF).getUNOContext())) - , m_xMM(frame::ModuleManager(comphelper::ComponentContext(m_xMSF).getUNOContext()),UNO_QUERY) + , m_xTrans(util::URLTransformer::create(comphelper::getComponentContext(m_xMSF))) + , m_xMM(frame::ModuleManager(comphelper::getComponentContext(m_xMSF)),UNO_QUERY) , m_xPCF(m_xMSF->createInstance(OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.frame.PopupMenuControllerFactory"))), UNO_QUERY) , m_xFrame(xFrame) , m_xdp(xFrame, UNO_QUERY) @@ -280,7 +280,7 @@ FrameHelper::FrameHelper(const Reference< XMultiServiceFactory >& rServiceManag { //Get xUICommands database (to retrieve labels, see FrameJob::getLabelFromCommandURL ()) - Reference < XNameAccess > xNameAccess (UICommandDescription::create(comphelper::ComponentContext(m_xMSF).getUNOContext())); + Reference < XNameAccess > xNameAccess (UICommandDescription::create(comphelper::getComponentContext(m_xMSF))); xNameAccess->getByName(m_xMM->identify(xFrame)) >>= m_xUICommands; @@ -722,7 +722,7 @@ void FrameHelper::dispatchCommand (OUString command) { OUString target = OUString(RTL_CONSTASCII_USTRINGPARAM("")); - Reference < XDispatchHelper > xdh( DispatchHelper::create(comphelper::ComponentContext(m_xMSF).getUNOContext()) ); + Reference < XDispatchHelper > xdh( DispatchHelper::create(comphelper::getComponentContext(m_xMSF)) ); // This is a special case, we don't want the helper to be disconnected from the frame // when PrintPreview dettaches. See the frameAction method. @@ -795,7 +795,7 @@ FrameHelper::getAcceleratorConfigurations (Reference < XModel > xModel, this->m_docAccelConf = docAccelConf; //Get module shurtcut database - Reference< XModuleUIConfigurationManagerSupplier > modUISupplier( ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(m_xMSF).getUNOContext()) ); + Reference< XModuleUIConfigurationManagerSupplier > modUISupplier( ModuleUIConfigurationManagerSupplier::create(comphelper::getComponentContext(m_xMSF)) ); Reference< XUIConfigurationManager > modUIManager = modUISupplier->getUIConfigurationManager(xModuleManager->identify(m_xFrame)); Reference< XAcceleratorConfiguration > modAccelConf(modUIManager->getShortCutManager(), UNO_QUERY); this->m_modAccelConf = modAccelConf; diff --git a/framework/source/recording/dispatchrecorder.cxx b/framework/source/recording/dispatchrecorder.cxx index 525db6125287..ca8cebd5d158 100644 --- a/framework/source/recording/dispatchrecorder.cxx +++ b/framework/source/recording/dispatchrecorder.cxx @@ -34,7 +34,7 @@ #include <threadhelp/readguard.hxx> #include <services.h> #include <vcl/svapp.hxx> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> using namespace ::com::sun::star::uno; @@ -132,7 +132,7 @@ DispatchRecorder::DispatchRecorder( const css::uno::Reference< css::lang::XMulti : ThreadHelpBase ( &Application::GetSolarMutex() ) , ::cppu::OWeakObject( ) , m_xSMGR ( xSMGR ) - , m_xConverter( css::script::Converter::create(comphelper::ComponentContext(m_xSMGR).getUNOContext()) ) + , m_xConverter( css::script::Converter::create(comphelper::getComponentContext(m_xSMGR)) ) { } diff --git a/framework/source/services/autorecovery.cxx b/framework/source/services/autorecovery.cxx index 529060d6ec98..43fd47c26b03 100644 --- a/framework/source/services/autorecovery.cxx +++ b/framework/source/services/autorecovery.cxx @@ -73,10 +73,10 @@ #include <com/sun/star/awt/XWindow2.hpp> #include <com/sun/star/task/XStatusIndicatorFactory.hpp> -#include <comphelper/componentcontext.hxx> #include <comphelper/configurationhelper.hxx> #include <comphelper/mediadescriptor.hxx> #include <comphelper/namedvaluecollection.hxx> +#include <comphelper/processfactory.hxx> #include <vcl/svapp.hxx> #include <unotools/pathoptions.hxx> #include <tools/diagnose_ex.h> @@ -2774,7 +2774,7 @@ void AutoRecovery::implts_generateNewTempURL(const ::rtl::OUString& ::rtl::OUStringBuffer sUniqueName; if (!rInfo.OrgURL.isEmpty()) { - css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::ComponentContext(m_xSMGR).getUNOContext())); + css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(m_xSMGR))); css::util::URL aURL; aURL.Complete = rInfo.OrgURL; xParser->parseStrict(aURL); @@ -3227,7 +3227,7 @@ AutoRecovery::EFailureSafeResult AutoRecovery::implts_copyFile(const ::rtl::OUSt try { - aTargetContent = ::ucbhelper::Content(sTargetPath, xEnvironment, comphelper::ComponentContext(m_xSMGR).getUNOContext()); + aTargetContent = ::ucbhelper::Content(sTargetPath, xEnvironment, comphelper::getComponentContext(m_xSMGR)); } catch(const css::uno::Exception&) { @@ -3239,7 +3239,7 @@ AutoRecovery::EFailureSafeResult AutoRecovery::implts_copyFile(const ::rtl::OUSt try { - ::ucbhelper::Content::create(sSource, xEnvironment, comphelper::ComponentContext(m_xSMGR).getUNOContext(), aSourceContent); + ::ucbhelper::Content::create(sSource, xEnvironment, comphelper::getComponentContext(m_xSMGR), aSourceContent); aTargetContent.transferContent(aSourceContent, ::ucbhelper::InsertOperation_COPY, sTargetName, nNameClash); } catch(const css::uno::Exception&) @@ -3627,7 +3627,7 @@ void AutoRecovery::st_impl_removeFile(const ::rtl::OUString& sURL) try { - ::ucbhelper::Content aContent = ::ucbhelper::Content(sURL, css::uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::ComponentContext(m_xSMGR).getUNOContext()); + ::ucbhelper::Content aContent = ::ucbhelper::Content(sURL, css::uno::Reference< css::ucb::XCommandEnvironment >(), comphelper::getComponentContext(m_xSMGR)); aContent.executeCommand(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("delete")), css::uno::makeAny(sal_True)); } catch(const css::uno::Exception&) diff --git a/framework/source/services/backingcomp.cxx b/framework/source/services/backingcomp.cxx index 89a3f941f4bb..9058790ef086 100644 --- a/framework/source/services/backingcomp.cxx +++ b/framework/source/services/backingcomp.cxx @@ -51,7 +51,7 @@ #include <com/sun/star/frame/XLayoutManager.hpp> #include <com/sun/star/util/URLTransformer.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <cppuhelper/typeprovider.hxx> #include <cppuhelper/factory.hxx> #include <toolkit/helper/vclunohelper.hxx> @@ -675,7 +675,7 @@ void SAL_CALL BackingComp::dispose() // kill the menu css::util::URL aURL; aURL.Complete = DECLARE_ASCII(".uno:close"); - css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::ComponentContext(m_xSMGR).getUNOContext())); + css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(m_xSMGR))); if (xParser.is()) xParser->parseStrict(aURL); diff --git a/framework/source/services/dispatchhelper.cxx b/framework/source/services/dispatchhelper.cxx index c1ffd4b299aa..e3b264e47696 100644 --- a/framework/source/services/dispatchhelper.cxx +++ b/framework/source/services/dispatchhelper.cxx @@ -35,7 +35,7 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XNotifyingDispatch.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> namespace framework{ @@ -113,7 +113,7 @@ css::uno::Any SAL_CALL DispatchHelper::executeDispatch( // parse given URL /* SAFE { */ ReadGuard aReadLock(m_aLock); - css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::ComponentContext(m_xSMGR).getUNOContext()) ); + css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(m_xSMGR)) ); aReadLock.unlock(); /* } SAFE */ diff --git a/framework/source/services/frame.cxx b/framework/source/services/frame.cxx index b26da6902f23..b4e8e12c487b 100644 --- a/framework/source/services/frame.cxx +++ b/framework/source/services/frame.cxx @@ -74,7 +74,6 @@ #include <com/sun/star/frame/XTitleChangeBroadcaster.hpp> -#include <comphelper/componentcontext.hxx> #include <comphelper/sequenceashashmap.hxx> #include <cppuhelper/queryinterface.hxx> #include <cppuhelper/typeprovider.hxx> @@ -87,7 +86,6 @@ #include <toolkit/unohlp.hxx> #include <toolkit/awt/vclxwindow.hxx> -#include <comphelper/componentcontext.hxx> #include <comphelper/processfactory.hxx> #include <unotools/moduleoptions.hxx> #include <tools/diagnose_ex.h> @@ -2334,7 +2332,7 @@ void SAL_CALL Frame::windowClosing( const css::lang::EventObject& ) throw( css:: css::util::URL aURL; aURL.Complete = DECLARE_ASCII(".uno:CloseFrame"); - css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::ComponentContext(xFactory).getUNOContext())); + css::uno::Reference< css::util::XURLTransformer > xParser(css::util::URLTransformer::create(::comphelper::getComponentContext(xFactory))); xParser->parseStrict(aURL); css::uno::Reference< css::frame::XDispatch > xCloser = queryDispatch(aURL, SPECIALTARGET_SELF, 0); @@ -2394,7 +2392,7 @@ void SAL_CALL Frame::windowShown( const css::lang::EventObject& ) throw(css::uno if (bMustBeTriggered) { css::uno::Reference< css::task::XJobExecutor > xExecutor - = css::task::JobExecutor::create( comphelper::ComponentContext(xFactory).getUNOContext() ); + = css::task::JobExecutor::create( comphelper::getComponentContext(xFactory) ); xExecutor->trigger( DECLARE_ASCII("onFirstVisibleTask") ); } } diff --git a/framework/source/services/pathsettings.cxx b/framework/source/services/pathsettings.cxx index db550bf58967..f8698868009d 100644 --- a/framework/source/services/pathsettings.cxx +++ b/framework/source/services/pathsettings.cxx @@ -49,8 +49,8 @@ #include <rtl/ustrbuf.hxx> #include <rtl/logfile.hxx> -#include <comphelper/componentcontext.hxx> #include <comphelper/configurationhelper.hxx> +#include <comphelper/processfactory.hxx> #include <unotools/configpaths.hxx> #include <fwkdllapi.h> @@ -1084,7 +1084,7 @@ css::uno::Reference< css::util::XStringSubstitution > PathSettings::fa_getSubsti // We must replace all used variables inside readed path values. // In case we can't do so ... the whole office can't work really. // That's why it seams to be OK to throw a RuntimeException then. - css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::ComponentContext(xSMGR).getUNOContext() ); + css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::getComponentContext(xSMGR) ); xSubst = css::util::PathSubstitution::create(xContext); // SAFE -> diff --git a/framework/source/services/sessionlistener.cxx b/framework/source/services/sessionlistener.cxx index cd9b2f9218f6..abe3761ec46d 100644 --- a/framework/source/services/sessionlistener.cxx +++ b/framework/source/services/sessionlistener.cxx @@ -56,7 +56,6 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/util/URL.hpp> #include <osl/time.h> -#include <comphelper/componentcontext.hxx> #include <comphelper/processfactory.hxx> #include <unotools/pathoptions.hxx> #include <unotools/internaloptions.hxx> @@ -146,7 +145,7 @@ void SessionListener::StoreSession( sal_Bool bAsync ) // in case of synchronous call the caller should do saveDone() call himself! css::uno::Reference< XDispatch > xDispatch(m_xSMGR->createInstance(SERVICENAME_AUTORECOVERY), UNO_QUERY_THROW); - css::uno::Reference< XURLTransformer > xURLTransformer(URLTransformer::create(::comphelper::ComponentContext(m_xSMGR).getUNOContext())); + css::uno::Reference< XURLTransformer > xURLTransformer(URLTransformer::create(::comphelper::getComponentContext(m_xSMGR))); URL aURL; aURL.Complete = OUString("vnd.sun.star.autorecovery:/doSessionSave"); xURLTransformer->parseStrict(aURL); @@ -179,7 +178,7 @@ void SessionListener::QuitSessionQuietly() // it is done synchronously to avoid conflict with normal quit process css::uno::Reference< XDispatch > xDispatch(m_xSMGR->createInstance(SERVICENAME_AUTORECOVERY), UNO_QUERY_THROW); - css::uno::Reference< XURLTransformer > xURLTransformer(URLTransformer::create(::comphelper::ComponentContext(m_xSMGR).getUNOContext())); + css::uno::Reference< XURLTransformer > xURLTransformer(URLTransformer::create(::comphelper::getComponentContext(m_xSMGR))); URL aURL; aURL.Complete = OUString("vnd.sun.star.autorecovery:/doSessionQuietQuit"); xURLTransformer->parseStrict(aURL); @@ -262,7 +261,7 @@ sal_Bool SAL_CALL SessionListener::doRestore() URL aURL; aURL.Complete = OUString("vnd.sun.star.autorecovery:/doSessionRestore"); - css::uno::Reference< XURLTransformer > xURLTransformer(URLTransformer::create(::comphelper::ComponentContext(m_xSMGR).getUNOContext())); + css::uno::Reference< XURLTransformer > xURLTransformer(URLTransformer::create(::comphelper::getComponentContext(m_xSMGR))); xURLTransformer->parseStrict(aURL); Sequence< PropertyValue > args; xDispatch->addStatusListener(this, aURL); diff --git a/framework/source/uielement/buttontoolbarcontroller.cxx b/framework/source/uielement/buttontoolbarcontroller.cxx index e964d30127de..c252ea804158 100644 --- a/framework/source/uielement/buttontoolbarcontroller.cxx +++ b/framework/source/uielement/buttontoolbarcontroller.cxx @@ -42,7 +42,6 @@ #include <rtl/uri.hxx> #include <osl/mutex.hxx> -#include <comphelper/componentcontext.hxx> #include <comphelper/processfactory.hxx> #include <unotools/ucbstreamhelper.hxx> #include <vcl/svapp.hxx> @@ -235,7 +234,7 @@ throw (::com::sun::star::uno::RuntimeException) { if ( !m_xURLTransformer.is() ) { - m_xURLTransformer = util::URLTransformer::create( ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() ); + m_xURLTransformer = util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ); } xFrame = m_xFrame; diff --git a/framework/source/uielement/complextoolbarcontroller.cxx b/framework/source/uielement/complextoolbarcontroller.cxx index 2e8a8027d5d4..6123dd9ff845 100644 --- a/framework/source/uielement/complextoolbarcontroller.cxx +++ b/framework/source/uielement/complextoolbarcontroller.cxx @@ -41,7 +41,7 @@ #include <com/sun/star/frame/status/Visibility.hpp> #include <com/sun/star/frame/XControlNotificationListener.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <svtools/toolboxcontroller.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -72,7 +72,7 @@ ComplexToolbarController::ComplexToolbarController( , m_nID( nID ) , m_bMadeInvisible( sal_False ) { - m_xURLTransformer.set( URLTransformer::create(::comphelper::ComponentContext(m_xServiceManager).getUNOContext()) ); + m_xURLTransformer.set( URLTransformer::create(::comphelper::getComponentContext(m_xServiceManager)) ); } // ------------------------------------------------------------------ diff --git a/framework/source/uielement/generictoolbarcontroller.cxx b/framework/source/uielement/generictoolbarcontroller.cxx index 554129296eb7..32fe05b6a751 100644 --- a/framework/source/uielement/generictoolbarcontroller.cxx +++ b/framework/source/uielement/generictoolbarcontroller.cxx @@ -40,7 +40,7 @@ #include <com/sun/star/frame/status/ItemState.hpp> #include <com/sun/star/frame/status/Visibility.hpp> -#include <comphelper/componentcontext.hxx> +#include <comphelper/processfactory.hxx> #include <svtools/toolboxcontroller.hxx> #include <osl/mutex.hxx> #include <vcl/svapp.hxx> @@ -159,7 +159,7 @@ throw ( RuntimeException ) m_xServiceManager.is() && !m_aCommandURL.isEmpty() ) { - xURLTransformer = URLTransformer::create(::comphelper::ComponentContext(m_xServiceManager).getUNOContext()); + xURLTransformer = URLTransformer::create(::comphelper::getComponentContext(m_xServiceManager)); aCommandURL = m_aCommandURL; URLToDispatchMap::iterator pIter = m_aListenerMap.find( m_aCommandURL ); @@ -354,7 +354,7 @@ MenuToolbarController::createPopupWindow() throw (::com::sun::star::uno::Runtime if ( !pMenu ) { Reference< XDispatchProvider > xDispatch; - Reference< XURLTransformer > xURLTransformer = URLTransformer::create(::comphelper::ComponentContext(m_xServiceManager).getUNOContext()); + Reference< XURLTransformer > xURLTransformer = URLTransformer::create(::comphelper::getComponentContext(m_xServiceManager)); pMenu = new Toolbarmenu(); m_xMenuManager.set( new MenuBarManager( m_xServiceManager, m_xFrame, xURLTransformer, xDispatch, m_aModuleIdentifier, pMenu, sal_True, sal_True ) ); if ( m_xMenuManager.is() ) diff --git a/framework/source/uielement/langselectionstatusbarcontroller.cxx b/framework/source/uielement/langselectionstatusbarcontroller.cxx index 26fef12723b5..7e5431ef0a6a 100644 --- a/framework/source/uielement/langselectionstatusbarcontroller.cxx +++ b/framework/source/uielement/langselectionstatusbarcontroller.cxx @@ -60,7 +60,6 @@ #include <com/sun/star/util/URLTransformer.hpp> #include <com/sun/star/util/XURLTransformer.hpp> #include <comphelper/processfactory.hxx> -#include <comphelper/componentcontext.hxx> #include <toolkit/unohlp.hxx> #include <tools/gen.hxx> @@ -189,9 +188,9 @@ throw (::com::sun::star::uno::RuntimeException) return; //add context menu - Reference< awt::XPopupMenu > xPopupMenu( awt::PopupMenu::create( comphelper::ComponentContext(m_xServiceManager).getUNOContext() ) ); + Reference< awt::XPopupMenu > xPopupMenu( awt::PopupMenu::create( comphelper::getComponentContext(m_xServiceManager) ) ); //sub menu that contains all items except the last two items: Separator + Set Language for Paragraph - Reference< awt::XPopupMenu > subPopupMenu( awt::PopupMenu::create( comphelper::ComponentContext(m_xServiceManager).getUNOContext() ) ); + Reference< awt::XPopupMenu > subPopupMenu( awt::PopupMenu::create( comphelper::getComponentContext(m_xServiceManager) ) ); SvtLanguageTable aLanguageTable; @@ -319,7 +318,7 @@ throw (::com::sun::star::uno::RuntimeException) aURL.Complete += OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:FontDialogForParagraph")); } - uno::Reference< util::XURLTransformer > xURLTransformer( util::URLTransformer::create(::comphelper::ComponentContext(m_xServiceManager).getUNOContext()) ); + uno::Reference< util::XURLTransformer > xURLTransformer( util::URLTransformer::create(::comphelper::getComponentContext(m_xServiceManager)) ); xURLTransformer->parseStrict( aURL ); uno::Reference< XDispatch > xDispatch = xDispatchProvider->queryDispatch(aURL, OUString(), 0); if( xDispatch.is() ) diff --git a/framework/source/uielement/menubarmanager.cxx b/framework/source/uielement/menubarmanager.cxx index 0361632b54af..c7b9d7c92ebe 100644 --- a/framework/source/uielement/menubarmanager.cxx +++ b/framework/source/uielement/menubarmanager.cxx @@ -64,7 +64,6 @@ #include <com/sun/star/frame/status/Visibility.hpp> #include <com/sun/star/util/URLTransformer.hpp> -#include <comphelper/componentcontext.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/extract.hxx> #include <svtools/menuoptions.hxx> @@ -2123,7 +2122,7 @@ void MenuBarManager::SetHdl() if ( !m_xURLTransformer.is() && mxServiceFactory.is() ) m_xURLTransformer.set( URLTransformer::create( - ::comphelper::ComponentContext(mxServiceFactory).getUNOContext()) ); + ::comphelper::getComponentContext(mxServiceFactory)) ); } } diff --git a/framework/source/uielement/menubarwrapper.cxx b/framework/source/uielement/menubarwrapper.cxx index 32ec827a3d08..48b93d5fd754 100644 --- a/framework/source/uielement/menubarwrapper.cxx +++ b/framework/source/uielement/menubarwrapper.cxx @@ -41,7 +41,6 @@ #include <com/sun/star/frame/XModuleManager.hpp> #include <com/sun/star/util/URLTransformer.hpp> -#include <comphelper/componentcontext.hxx> #include <comphelper/processfactory.hxx> #include <tools/solar.h> #include <vcl/svapp.hxx> @@ -164,7 +163,7 @@ void SAL_CALL MenuBarWrapper::initialize( const Sequence< Any >& aArguments ) th Reference< XURLTransformer > xTrans; try { - xTrans.set( URLTransformer::create(::comphelper::ComponentContext(m_xServiceFactory).getUNOContext()) ); + xTrans.set( URLTransformer::create(::comphelper::getComponentContext(m_xServiceFactory)) ); m_xConfigData = m_xConfigSource->getSettings( m_aResourceURL, sal_False ); if ( m_xConfigData.is() ) { diff --git a/framework/source/uielement/toolbarmanager.cxx b/framework/source/uielement/toolbarmanager.cxx index fde16c83ad5c..bf39ac075d17 100644 --- a/framework/source/uielement/toolbarmanager.cxx +++ b/framework/source/uielement/toolbarmanager.cxx @@ -65,8 +65,8 @@ #include <svtools/toolboxcontroller.hxx> #include <unotools/cmdoptions.hxx> #include <toolkit/unohlp.hxx> -#include <comphelper/componentcontext.hxx> #include <comphelper/mediadescriptor.hxx> +#include <comphelper/processfactory.hxx> #include <svtools/miscopt.hxx> #include <svl/imageitm.hxx> #include <svtools/framestatuslistener.hxx> @@ -254,7 +254,7 @@ ToolBarManager::ToolBarManager( const Reference< XMultiServiceFactory >& rServic m_xURLTransformer.set( URLTransformer::create( - ::comphelper::ComponentContext(m_xServiceManager).getUNOContext()) ); + ::comphelper::getComponentContext(m_xServiceManager)) ); } m_pToolBar->SetSelectHdl( LINK( this, ToolBarManager, Select) ); |