summaryrefslogtreecommitdiff
path: root/sfx2
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2012-09-19 13:15:15 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-09-19 13:16:38 +0200
commit03a9f139bd9ea1a4f9096fc982e6b326def58532 (patch)
treebfb7a08bb4831a1a46b48c3bb49afa77ca436349 /sfx2
parente8a169c93d7e2443a2e56afe7e99cd0721a2c27b (diff)
ComponentContext::getUnoContext -> getComponentContext simplification
...and some further clean-up. Change-Id: If5dce53e382b56390c502d0d0d93fc06cbfe33ea
Diffstat (limited to 'sfx2')
-rw-r--r--sfx2/source/control/request.cxx3
-rw-r--r--sfx2/source/dialog/dockwin.cxx3
-rw-r--r--sfx2/source/dialog/mailmodel.cxx3
-rw-r--r--sfx2/source/doc/docfac.cxx3
-rw-r--r--sfx2/source/doc/doctemplates.cxx4
-rw-r--r--sfx2/source/doc/guisaveas.cxx5
-rw-r--r--sfx2/source/doc/iframe.cxx4
-rw-r--r--sfx2/source/doc/objuno.cxx6
-rw-r--r--sfx2/source/doc/plugin.cxx4
-rw-r--r--sfx2/source/view/viewsh.cxx3
10 files changed, 16 insertions, 22 deletions
diff --git a/sfx2/source/control/request.cxx b/sfx2/source/control/request.cxx
index 1eb88c78411c..3525f22646ee 100644
--- a/sfx2/source/control/request.cxx
+++ b/sfx2/source/control/request.cxx
@@ -30,7 +30,6 @@
#include <svl/itempool.hxx>
#include <svtools/itemdel.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <svl/smplhint.hxx>
@@ -364,7 +363,7 @@ void SfxRequest_Impl::Record
::comphelper::getProcessServiceFactory(),
com::sun::star::uno::UNO_QUERY);
- uno::Reference< util::XURLTransformer > xTransform( util::URLTransformer::create( ::comphelper::ComponentContext(xFactory).getUNOContext() ) );
+ uno::Reference< util::XURLTransformer > xTransform( util::URLTransformer::create( ::comphelper::getComponentContext(xFactory) ) );
com::sun::star::util::URL aURL;
aURL.Complete = aCmd;
diff --git a/sfx2/source/dialog/dockwin.cxx b/sfx2/source/dialog/dockwin.cxx
index e10da5d97852..7106771db298 100644
--- a/sfx2/source/dialog/dockwin.cxx
+++ b/sfx2/source/dialog/dockwin.cxx
@@ -25,7 +25,6 @@
#include <vcl/timer.hxx>
#include <rtl/instance.hxx>
#include <toolkit/helper/vclunohelper.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <sfx2/dockwin.hxx>
@@ -181,7 +180,7 @@ SfxDockingWrapper::SfxDockingWrapper( Window* pParentWnd ,
uno::Reference< frame::XModuleManager2 > xModuleManager( m_xModuleManager );
if ( !xModuleManager.is() )
{
- xModuleManager = frame::ModuleManager::create(comphelper::ComponentContext(xServiceManager).getUNOContext());
+ xModuleManager = frame::ModuleManager::create(comphelper::getComponentContext(xServiceManager));
m_xModuleManager = xModuleManager;
}
diff --git a/sfx2/source/dialog/mailmodel.cxx b/sfx2/source/dialog/mailmodel.cxx
index 813683ba941a..884ad4fc8e86 100644
--- a/sfx2/source/dialog/mailmodel.cxx
+++ b/sfx2/source/dialog/mailmodel.cxx
@@ -63,7 +63,6 @@
#include <tools/urlobj.hxx>
#include <unotools/useroptions.hxx>
#include <comphelper/extract.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/mediadescriptor.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -548,7 +547,7 @@ SfxMailModel::SaveResult SfxMailModel::SaveDocumentAsFormat(
css::util::URL aPrepareURL;
css::uno::Reference< css::frame::XDispatch > xPrepareDispatch;
css::uno::Reference< css::frame::XDispatchProvider > xDispatchProvider( xFrame, css::uno::UNO_QUERY );
- css::uno::Reference< css::util::XURLTransformer > xURLTransformer( css::util::URLTransformer::create( ::comphelper::ComponentContext(xSMGR).getUNOContext() ) );
+ css::uno::Reference< css::util::XURLTransformer > xURLTransformer( css::util::URLTransformer::create( ::comphelper::getComponentContext(xSMGR) ) );
if( !bSendAsPDF )
{
try
diff --git a/sfx2/source/doc/docfac.cxx b/sfx2/source/doc/docfac.cxx
index 94eea2b2b4e4..4caac052801c 100644
--- a/sfx2/source/doc/docfac.cxx
+++ b/sfx2/source/doc/docfac.cxx
@@ -31,7 +31,6 @@
#include <unotools/moduleoptions.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <unotools/localfilehelper.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/configurationhelper.hxx>
@@ -253,7 +252,7 @@ void SfxObjectFactory::SetSystemTemplate( const String& rServiceName, const Stri
aUserTemplateURL += aExt;
uno::Reference<ucb::XSimpleFileAccess2> xSimpleFileAccess(
- ucb::SimpleFileAccess::create( ::comphelper::ComponentContext(xFactory).getUNOContext() ) );
+ ucb::SimpleFileAccess::create( ::comphelper::getComponentContext(xFactory) ) );
::rtl::OUString aBackupURL;
::osl::Security().getConfigDir(aBackupURL);
diff --git a/sfx2/source/doc/doctemplates.cxx b/sfx2/source/doc/doctemplates.cxx
index 07b5abbf5f69..c7a2fa62d6b5 100644
--- a/sfx2/source/doc/doctemplates.cxx
+++ b/sfx2/source/doc/doctemplates.cxx
@@ -1410,7 +1410,7 @@ sal_Bool SfxDocTplService_Impl::WriteUINamesForTemplateDir_Impl( const ::rtl::OU
sal_Bool bResult = sal_False;
try {
uno::Reference< beans::XPropertySet > xTempFile(
- io::TempFile::create(comphelper::ComponentContext(mxFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(mxFactory)),
uno::UNO_QUERY_THROW );
::rtl::OUString aTempURL;
@@ -1845,7 +1845,7 @@ sal_Bool SfxDocTplService_Impl::storeTemplate( const OUString& rGroupName,
// get document service name
uno::Reference< frame::XModuleManager2 > xModuleManager(
- frame::ModuleManager::create(comphelper::ComponentContext(xFactory).getUNOContext()) );
+ frame::ModuleManager::create(comphelper::getComponentContext(xFactory)) );
sDocServiceName = xModuleManager->identify( uno::Reference< uno::XInterface >( rStorable, uno::UNO_QUERY ) );
if ( sDocServiceName.isEmpty() )
throw uno::RuntimeException();
diff --git a/sfx2/source/doc/guisaveas.cxx b/sfx2/source/doc/guisaveas.cxx
index 133cf6c6d61e..83eb28a3065f 100644
--- a/sfx2/source/doc/guisaveas.cxx
+++ b/sfx2/source/doc/guisaveas.cxx
@@ -60,7 +60,6 @@
#include <svtools/miscopt.hxx>
#include <tools/debug.hxx>
#include <tools/urlobj.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/configurationhelper.hxx>
#include <comphelper/mimeconfighelper.hxx>
@@ -1113,7 +1112,7 @@ sal_Bool ModelData_Impl::ShowDocumentInfoDialog()
util::URL aURL;
aURL.Complete = ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM(".uno:SetDocumentProperties"));
- uno::Reference < util::XURLTransformer > xTransformer( util::URLTransformer::create( ::comphelper::ComponentContext(m_pOwner->GetServiceFactory()).getUNOContext() ) );
+ uno::Reference < util::XURLTransformer > xTransformer( util::URLTransformer::create( ::comphelper::getComponentContext(m_pOwner->GetServiceFactory()) ) );
if ( xTransformer->parseStrict( aURL ) )
{
uno::Reference< frame::XDispatch > xDispatch = xFrameDispatch->queryDispatch(
@@ -1280,7 +1279,7 @@ uno::Reference< ::com::sun::star::frame::XModuleManager2 > SfxStoringHelper::Get
if ( !m_xModuleManager.is() )
{
m_xModuleManager = frame::ModuleManager::create(
- comphelper::ComponentContext(GetServiceFactory()).getUNOContext());
+ comphelper::getComponentContext(GetServiceFactory()));
}
return m_xModuleManager;
diff --git a/sfx2/source/doc/iframe.cxx b/sfx2/source/doc/iframe.cxx
index 2515e673250d..757c2a089030 100644
--- a/sfx2/source/doc/iframe.cxx
+++ b/sfx2/source/doc/iframe.cxx
@@ -27,7 +27,7 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <tools/urlobj.hxx>
#include <tools/debug.hxx>
#include <rtl/ustring.hxx>
@@ -145,7 +145,7 @@ throw( uno::RuntimeException )
util::URL aTargetURL;
aTargetURL.Complete = ::rtl::OUString( maFrmDescr.GetURL().GetMainURL( INetURLObject::NO_DECODE ) );
- uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::ComponentContext(mxFact).getUNOContext() ) );
+ uno::Reference < util::XURLTransformer > xTrans( util::URLTransformer::create( ::comphelper::getComponentContext(mxFact) ) );
xTrans->parseStrict( aTargetURL );
uno::Sequence < beans::PropertyValue > aProps(2);
diff --git a/sfx2/source/doc/objuno.cxx b/sfx2/source/doc/objuno.cxx
index dfa05ee04e19..4f5c8e194e86 100644
--- a/sfx2/source/doc/objuno.cxx
+++ b/sfx2/source/doc/objuno.cxx
@@ -46,7 +46,7 @@
#include <tools/errcode.hxx>
#include <svl/cntwids.hrc>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <comphelper/sequenceasvector.hxx>
#include <comphelper/storagehelper.hxx>
@@ -1183,7 +1183,7 @@ SfxStandaloneDocumentInfoObject::SfxStandaloneDocumentInfoObject( const ::com::s
, _xFactory( xFactory )
{
uno::Reference< lang::XInitialization > xDocProps(
- document::DocumentProperties::create(comphelper::ComponentContext(_xFactory).getUNOContext()),
+ document::DocumentProperties::create(comphelper::getComponentContext(_xFactory)),
uno::UNO_QUERY_THROW);
uno::Any a;
a <<= xDocProps;
@@ -1262,7 +1262,7 @@ void SAL_CALL SfxStandaloneDocumentInfoObject::loadFromURL(const ::rtl::OUStrin
::osl::ClearableMutexGuard aGuard( _pImp->_aMutex );
uno::Reference< document::XDocumentProperties > xDocProps(
- document::DocumentProperties::create(comphelper::ComponentContext(_xFactory).getUNOContext()) );
+ document::DocumentProperties::create(comphelper::getComponentContext(_xFactory)) );
_pImp->Reset(xDocProps);
aGuard.clear();
diff --git a/sfx2/source/doc/plugin.cxx b/sfx2/source/doc/plugin.cxx
index 26e61949f381..3df5b426dfee 100644
--- a/sfx2/source/doc/plugin.cxx
+++ b/sfx2/source/doc/plugin.cxx
@@ -24,7 +24,7 @@
#include <com/sun/star/plugin/PluginMode.hpp>
#include <com/sun/star/awt/XControl.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <rtl/ustring.hxx>
#include <toolkit/helper/vclunohelper.hxx>
#include <svtools/miscopt.hxx>
@@ -94,7 +94,7 @@ sal_Bool SAL_CALL PluginObject::load(
const uno::Reference < frame::XFrame >& xFrame )
throw( uno::RuntimeException )
{
- uno::Reference< plugin::XPluginManager > xPMgr( plugin::PluginManager::create(comphelper::ComponentContext(mxFact).getUNOContext()) );
+ uno::Reference< plugin::XPluginManager > xPMgr( plugin::PluginManager::create(comphelper::getComponentContext(mxFact)) );
if ( SvtMiscOptions().IsPluginsEnabled() )
{
diff --git a/sfx2/source/view/viewsh.cxx b/sfx2/source/view/viewsh.cxx
index 9af76d8953a8..2b1c8faf07e3 100644
--- a/sfx2/source/view/viewsh.cxx
+++ b/sfx2/source/view/viewsh.cxx
@@ -34,7 +34,6 @@
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/datatransfer/clipboard/XClipboard.hpp>
#include <com/sun/star/frame/UICommandDescription.hpp>
-#include <comphelper/componentcontext.hxx>
#include <cppuhelper/implbase1.hxx>
#include <osl/file.hxx>
@@ -249,7 +248,7 @@ static ::rtl::OUString RetrieveLabelFromCommand(
{
xNameAccess = css::uno::Reference< css::container::XNameAccess >(
css::frame::UICommandDescription::create(
- comphelper::ComponentContext(xSMGR).getUNOContext()),
+ comphelper::getComponentContext(xSMGR)),
css::uno::UNO_QUERY_THROW );
s_xNameAccess = xNameAccess;
}