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/services | |
parent | e8a169c93d7e2443a2e56afe7e99cd0721a2c27b (diff) |
ComponentContext::getUnoContext -> getComponentContext simplification
...and some further clean-up.
Change-Id: If5dce53e382b56390c502d0d0d93fc06cbfe33ea
Diffstat (limited to 'framework/source/services')
-rw-r--r-- | framework/source/services/autorecovery.cxx | 10 | ||||
-rw-r--r-- | framework/source/services/backingcomp.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/dispatchhelper.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/frame.cxx | 6 | ||||
-rw-r--r-- | framework/source/services/pathsettings.cxx | 4 | ||||
-rw-r--r-- | framework/source/services/sessionlistener.cxx | 7 |
6 files changed, 16 insertions, 19 deletions
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); |