summaryrefslogtreecommitdiff
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
parente8a169c93d7e2443a2e56afe7e99cd0721a2c27b (diff)
ComponentContext::getUnoContext -> getComponentContext simplification
...and some further clean-up. Change-Id: If5dce53e382b56390c502d0d0d93fc06cbfe33ea
-rw-r--r--UnoControls/source/controls/framecontrol.cxx4
-rw-r--r--basctl/source/basicide/bastype2.cxx1
-rw-r--r--basctl/source/basicide/doceventnotifier.cxx7
-rw-r--r--basctl/source/basicide/documentenumeration.cxx9
-rw-r--r--basctl/source/basicide/documentenumeration.hxx9
-rw-r--r--basctl/source/basicide/moduldl2.cxx3
-rw-r--r--basctl/source/basicide/scriptdocument.cxx32
-rw-r--r--basic/source/runtime/iosys.cxx3
-rw-r--r--basic/source/uno/namecont.cxx8
-rw-r--r--bridges/test/testoffice.cxx2
-rw-r--r--comphelper/source/container/enumerablemap.cxx11
-rw-r--r--comphelper/source/eventattachermgr/eventattachermgr.cxx5
-rw-r--r--comphelper/source/misc/logging.cxx14
-rw-r--r--comphelper/source/property/opropertybag.cxx7
-rw-r--r--comphelper/source/property/opropertybag.hxx13
-rw-r--r--comphelper/source/streaming/seekableinput.cxx4
-rw-r--r--connectivity/source/commontools/predicateinput.cxx5
-rw-r--r--connectivity/source/drivers/flat/ETable.cxx3
-rw-r--r--connectivity/source/drivers/hsqldb/HConnection.cxx4
-rw-r--r--connectivity/source/parse/sqlnode.cxx2
-rw-r--r--cui/source/customize/acccfg.cxx7
-rw-r--r--cui/source/customize/cfg.cxx5
-rw-r--r--cui/source/customize/cfgutil.cxx3
-rw-r--r--cui/source/customize/selector.cxx76
-rw-r--r--cui/source/options/treeopt.cxx3
-rw-r--r--dbaccess/source/ui/app/AppDetailView.cxx4
-rw-r--r--dbaccess/source/ui/browser/brwctrlr.cxx3
-rw-r--r--dbaccess/source/ui/browser/genericcontroller.cxx4
-rw-r--r--dbaccess/source/ui/control/ColumnControlWindow.cxx4
-rw-r--r--dbaccess/source/ui/control/toolboxcontroller.cxx4
-rw-r--r--dbaccess/source/ui/dlg/dbwizsetup.cxx8
-rw-r--r--dbaccess/source/ui/dlg/paramdialog.cxx3
-rw-r--r--dbaccess/source/ui/misc/TokenWriter.cxx3
-rw-r--r--dbaccess/source/ui/misc/UITools.cxx2
-rw-r--r--dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx4
-rw-r--r--desktop/source/migration/migration.cxx5
-rw-r--r--editeng/source/xml/xmltxtimp.cxx2
-rw-r--r--embeddedobj/source/commonembedding/embedobj.cxx4
-rw-r--r--embeddedobj/source/commonembedding/persistence.cxx6
-rw-r--r--embeddedobj/source/general/docholder.cxx5
-rw-r--r--embeddedobj/source/msole/olecomponent.cxx4
-rw-r--r--embeddedobj/source/msole/oleembed.cxx8
-rw-r--r--embeddedobj/source/msole/olepersist.cxx20
-rw-r--r--embeddedobj/source/msole/ownview.cxx6
-rw-r--r--embedserv/source/embed/ed_ipersiststr.cxx10
-rw-r--r--eventattacher/source/eventattacher.cxx6
-rw-r--r--extensions/source/dbpilots/groupboxwiz.cxx4
-rw-r--r--extensions/source/ole/unoobjw.cxx2
-rw-r--r--extensions/source/plugin/base/xplugin.cxx3
-rw-r--r--extensions/source/propctrlr/unourl.cxx4
-rw-r--r--extensions/test/ole/cpnt/cpnt.cxx4
-rw-r--r--filter/source/config/cache/typedetection.cxx6
-rw-r--r--filter/source/graphicfilter/icgm/actimpr.cxx3
-rw-r--r--filter/source/svg/svgreader.cxx3
-rw-r--r--filter/source/xsltfilter/OleHandler.cxx4
-rw-r--r--filter/source/xsltfilter/XSLTFilter.cxx8
-rw-r--r--forms/source/component/DatabaseForm.cxx4
-rw-r--r--forms/source/helper/urltransformer.cxx4
-rw-r--r--forms/source/solar/component/navbarcontrol.cxx4
-rw-r--r--forms/source/xforms/submission.cxx3
-rw-r--r--forms/source/xforms/submission/submission_get.cxx6
-rw-r--r--framework/source/classes/droptargetlistener.cxx4
-rw-r--r--framework/source/classes/menumanager.cxx3
-rw-r--r--framework/source/dispatch/systemexec.cxx4
-rw-r--r--framework/source/dispatch/windowcommanddispatch.cxx4
-rw-r--r--framework/source/jobs/shelljob.cxx4
-rw-r--r--framework/source/layoutmanager/layoutmanager.cxx4
-rw-r--r--framework/source/loadenv/loadenv.cxx7
-rw-r--r--framework/source/lomenubar/FrameHelper.cxx12
-rw-r--r--framework/source/recording/dispatchrecorder.cxx4
-rw-r--r--framework/source/services/autorecovery.cxx10
-rw-r--r--framework/source/services/backingcomp.cxx4
-rw-r--r--framework/source/services/dispatchhelper.cxx4
-rw-r--r--framework/source/services/frame.cxx6
-rw-r--r--framework/source/services/pathsettings.cxx4
-rw-r--r--framework/source/services/sessionlistener.cxx7
-rw-r--r--framework/source/uielement/buttontoolbarcontroller.cxx3
-rw-r--r--framework/source/uielement/complextoolbarcontroller.cxx4
-rw-r--r--framework/source/uielement/generictoolbarcontroller.cxx6
-rw-r--r--framework/source/uielement/langselectionstatusbarcontroller.cxx7
-rw-r--r--framework/source/uielement/menubarmanager.cxx3
-rw-r--r--framework/source/uielement/menubarwrapper.cxx3
-rw-r--r--framework/source/uielement/toolbarmanager.cxx4
-rw-r--r--i18npool/source/characterclassification/cclass_unicode_parser.cxx4
-rw-r--r--i18npool/source/collator/collatorImpl.cxx4
-rw-r--r--i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx4
-rw-r--r--i18npool/source/registerservices/registerservices.cxx4
-rw-r--r--lotuswordpro/source/filter/LotusWordProImportFilter.cxx4
-rw-r--r--oox/source/ole/olehelper.cxx14
-rw-r--r--package/source/xstor/owriteablestream.cxx4
-rw-r--r--package/source/xstor/selfterminatefilestream.cxx3
-rw-r--r--package/source/xstor/switchpersistencestream.cxx4
-rw-r--r--package/source/xstor/xfactory.cxx6
-rw-r--r--package/source/xstor/xstorage.cxx8
-rw-r--r--package/source/zippackage/ZipPackage.cxx14
-rw-r--r--package/source/zippackage/ZipPackageStream.cxx8
-rw-r--r--package/source/zippackage/zipfileaccess.cxx4
-rw-r--r--reportdesign/source/ui/report/ReportController.cxx4
-rw-r--r--sc/source/filter/excel/excimp8.cxx8
-rw-r--r--sc/source/filter/excel/xiescher.cxx10
-rw-r--r--sd/source/filter/ppt/pptin.cxx9
-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
-rw-r--r--sot/source/unoolestorage/xolesimplestorage.cxx6
-rw-r--r--svl/source/fsstor/fsstorage.cxx7
-rw-r--r--svl/source/misc/documentlockfile.cxx3
-rw-r--r--svtools/source/misc/acceleratorexecute.cxx8
-rw-r--r--svtools/source/misc/imageresourceaccess.cxx4
-rw-r--r--svtools/source/uno/framestatuslistener.cxx10
-rw-r--r--svtools/source/uno/generictoolboxcontroller.cxx4
-rw-r--r--svtools/source/uno/popupmenucontrollerbase.cxx4
-rw-r--r--svtools/source/uno/statusbarcontroller.cxx4
-rw-r--r--svtools/source/uno/toolboxcontroller.cxx6
-rw-r--r--svx/source/dialog/docrecovery.cxx7
-rw-r--r--svx/source/form/fmpgeimp.cxx4
-rw-r--r--svx/source/tbxctrls/tbunosearchcontrollers.cxx4
-rw-r--r--sw/source/filter/ww8/wrtw8esh.cxx11
-rw-r--r--sw/source/filter/ww8/ww8par.cxx5
-rw-r--r--ucb/source/cacher/cachedcontentresultset.cxx4
-rw-r--r--ucb/source/core/ucbcmds.cxx4
-rw-r--r--ucb/source/ucp/ext/ucpext_content.cxx7
-rw-r--r--ucb/source/ucp/ext/ucpext_datasupplier.cxx3
-rw-r--r--ucb/source/ucp/file/filrow.cxx4
-rw-r--r--ucb/source/ucp/ftp/ftpcontentprovider.cxx4
-rw-r--r--ucb/source/ucp/gvfs/gvfs_content.cxx4
-rw-r--r--ucb/source/ucp/odma/odma_content.cxx6
-rw-r--r--ucb/source/ucp/tdoc/tdoc_docmgr.cxx6
-rw-r--r--unotools/source/config/moduleoptions.cxx3
-rw-r--r--unotools/source/i18n/localedatawrapper.cxx4
-rw-r--r--unoxml/source/dom/saxbuilder.cxx4
-rw-r--r--uui/source/iahndl-authentication.cxx4
-rw-r--r--uui/source/passwordcontainer.cxx4
-rw-r--r--uui/source/sslwarndlg.cxx4
-rw-r--r--uui/source/unknownauthdlg.cxx4
-rw-r--r--vcl/source/app/unohelp.cxx3
-rw-r--r--vcl/source/gdi/pdfwriter_impl2.cxx3
-rw-r--r--xmloff/source/core/DocumentSettingsContext.cxx4
-rw-r--r--xmloff/source/core/SettingsExportHelper.cxx4
-rw-r--r--xmloff/source/core/xmluconv.cxx4
-rw-r--r--xmloff/source/draw/shapeexport4.cxx4
148 files changed, 387 insertions, 473 deletions
diff --git a/UnoControls/source/controls/framecontrol.cxx b/UnoControls/source/controls/framecontrol.cxx
index 424f6a37e8a4..53f2ce080daf 100644
--- a/UnoControls/source/controls/framecontrol.cxx
+++ b/UnoControls/source/controls/framecontrol.cxx
@@ -25,7 +25,7 @@
#include <com/sun/star/frame/XDispatch.hpp>
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <osl/diagnose.h>
@@ -480,7 +480,7 @@ void FrameControl::impl_createFrame( const Reference< XWindowPeer >& xPee
Reference< XURLTransformer > xTrans (
URLTransformer::create(
- ::comphelper::ComponentContext( impl_getMultiServiceFactory() ).getUNOContext() ) );
+ ::comphelper::getComponentContext( impl_getMultiServiceFactory() ) ) );
// load file
URL aURL ;
diff --git a/basctl/source/basicide/bastype2.cxx b/basctl/source/basicide/bastype2.cxx
index 725b721de4e4..bd9858a7525d 100644
--- a/basctl/source/basicide/bastype2.cxx
+++ b/basctl/source/basicide/bastype2.cxx
@@ -39,7 +39,6 @@
#include <com/sun/star/script/XLibraryContainerPassword.hpp>
#include <com/sun/star/frame/ModuleManager.hpp>
#include <comphelper/processfactory.hxx>
-#include <comphelper/componentcontext.hxx>
#include <sfx2/dispatch.hxx>
#include <map>
diff --git a/basctl/source/basicide/doceventnotifier.cxx b/basctl/source/basicide/doceventnotifier.cxx
index 28133d1150a9..a36ce20a80aa 100644
--- a/basctl/source/basicide/doceventnotifier.cxx
+++ b/basctl/source/basicide/doceventnotifier.cxx
@@ -27,7 +27,6 @@
#include <tools/diagnose_ex.h>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/mutex.hxx>
@@ -209,9 +208,11 @@ namespace basctl
xBroadcaster.set( m_xModel, UNO_QUERY_THROW );
else
{
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< com::sun::star::uno::XComponentContext > aContext(
+ comphelper::getProcessComponentContext() );
xBroadcaster.set(
- aContext.createComponent( "com.sun.star.frame.GlobalEventBroadcaster" ),
+ aContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.frame.GlobalEventBroadcaster", aContext ),
UNO_QUERY_THROW );
}
diff --git a/basctl/source/basicide/documentenumeration.cxx b/basctl/source/basicide/documentenumeration.cxx
index 87f521cc5393..1527a8a6931d 100644
--- a/basctl/source/basicide/documentenumeration.cxx
+++ b/basctl/source/basicide/documentenumeration.cxx
@@ -25,6 +25,7 @@
#include <com/sun/star/frame/FrameSearchFlag.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/frame/XFramesSupplier.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <tools/diagnose_ex.h>
@@ -60,10 +61,10 @@ namespace basctl { namespace docs {
//====================================================================
struct DocumentEnumeration_Data
{
- ::comphelper::ComponentContext aContext;
+ Reference< com::sun::star::uno::XComponentContext > aContext;
const IDocumentDescriptorFilter* pFilter;
- DocumentEnumeration_Data( const ::comphelper::ComponentContext& _rContext, const IDocumentDescriptorFilter* _pFilter )
+ DocumentEnumeration_Data( Reference< com::sun::star::uno::XComponentContext > const & _rContext, const IDocumentDescriptorFilter* _pFilter )
:aContext( _rContext )
,pFilter( _pFilter )
{
@@ -74,7 +75,7 @@ namespace basctl { namespace docs {
//= DocumentEnumeration
//====================================================================
//--------------------------------------------------------------------
- DocumentEnumeration::DocumentEnumeration( const ::comphelper::ComponentContext& _rContext, const IDocumentDescriptorFilter* _pFilter )
+ DocumentEnumeration::DocumentEnumeration( Reference< com::sun::star::uno::XComponentContext > const & _rContext, const IDocumentDescriptorFilter* _pFilter )
:m_pData( new DocumentEnumeration_Data( _rContext, _pFilter ) )
{
}
@@ -173,7 +174,7 @@ namespace basctl { namespace docs {
try
{
- const Reference< XDesktop > xDesktop( m_pData->aContext.createComponent( "com.sun.star.frame.Desktop" ), UNO_QUERY_THROW );
+ const Reference< XDesktop > xDesktop( m_pData->aContext->getServiceManager()->createInstanceWithContext( "com.sun.star.frame.Desktop", m_pData->aContext ), UNO_QUERY_THROW );
const Reference< XFramesSupplier > xSuppFrames( xDesktop, UNO_QUERY_THROW );
const Reference< XFrames > xFrames( xSuppFrames->getFrames(), UNO_SET_THROW );
const Sequence< Reference< XFrame > > aFrames( xFrames->queryFrames( FrameSearchFlag::ALL ) );
diff --git a/basctl/source/basicide/documentenumeration.hxx b/basctl/source/basicide/documentenumeration.hxx
index 4ee864626fed..cd4af37a4d87 100644
--- a/basctl/source/basicide/documentenumeration.hxx
+++ b/basctl/source/basicide/documentenumeration.hxx
@@ -22,12 +22,15 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XController.hpp>
-
-#include <comphelper/componentcontext.hxx>
+#include <com/sun/star/uno/Reference.hxx>
#include <memory>
#include <vector>
+namespace com { namespace sun { namespace star { namespace uno {
+ class XComponentContext;
+} } } }
+
//........................................................................
namespace basctl { namespace docs {
//........................................................................
@@ -75,7 +78,7 @@ namespace basctl { namespace docs {
class DocumentEnumeration
{
public:
- DocumentEnumeration( const ::comphelper::ComponentContext& _rContext, const IDocumentDescriptorFilter* _pFilter = NULL );
+ DocumentEnumeration( com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > const & _rContext, const IDocumentDescriptorFilter* _pFilter = NULL );
~DocumentEnumeration();
/** retrieves a list of all currently known documents in the application
diff --git a/basctl/source/basicide/moduldl2.cxx b/basctl/source/basicide/moduldl2.cxx
index 5500ae02a656..20b4bcd99105 100644
--- a/basctl/source/basicide/moduldl2.cxx
+++ b/basctl/source/basicide/moduldl2.cxx
@@ -56,7 +56,6 @@
#include <com/sun/star/ucb/NameClash.hpp>
#include "com/sun/star/packages/manifest/XManifestWriter.hpp"
#include <unotools/pathoptions.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <com/sun/star/util/VetoException.hpp>
@@ -1360,7 +1359,7 @@ void LibPage::ExportAsPackage( const String& aLibName )
// write into pipe:
Reference<packages::manifest::XManifestWriter> xManifestWriter( xMSF->createInstance
( DEFINE_CONST_UNICODE("com.sun.star.packages.manifest.ManifestWriter") ), UNO_QUERY );
- Reference<io::XOutputStream> xPipe( io::Pipe::create(comphelper::ComponentContext(xMSF).getUNOContext()), UNO_QUERY_THROW );
+ Reference<io::XOutputStream> xPipe( io::Pipe::create(comphelper::getComponentContext(xMSF)), UNO_QUERY_THROW );
xManifestWriter->writeManifestSequence(
xPipe, Sequence< Sequence<beans::PropertyValue> >(
&manifest[ 0 ], manifest.size() ) );
diff --git a/basctl/source/basicide/scriptdocument.cxx b/basctl/source/basicide/scriptdocument.cxx
index 751a33219215..dfede33a0f73 100644
--- a/basctl/source/basicide/scriptdocument.cxx
+++ b/basctl/source/basicide/scriptdocument.cxx
@@ -57,7 +57,6 @@
#include <comphelper/processfactory.hxx>
#include <comphelper/documentinfo.hxx>
-#include <comphelper/componentcontext.hxx>
#include <osl/mutex.hxx>
@@ -183,9 +182,9 @@ namespace basctl
{
_out_rModels.clear();
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
FilterDocuments aFilter( _bVisibleOnly );
- docs::DocumentEnumeration aEnum( aContext, &aFilter );
+ docs::DocumentEnumeration aEnum(
+ comphelper::getProcessComponentContext(), &aFilter );
aEnum.getDocuments( _out_rModels );
}
@@ -624,20 +623,25 @@ namespace basctl
if ( _eType == E_DIALOGS )
{
// create dialog model
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
+ Reference< XComponentContext > aContext(
+ comphelper::getProcessComponentContext() );
Reference< XNameContainer > xDialogModel;
if ( _rxExistingDialogModel.is() )
xDialogModel = _rxExistingDialogModel;
else
- if ( !aContext.createComponent( "com.sun.star.awt.UnoControlDialogModel", xDialogModel ) )
- return false;
+ xDialogModel.set(
+ ( aContext->getServiceManager()->
+ createInstanceWithContext(
+ "com.sun.star.awt.UnoControlDialogModel",
+ aContext ) ),
+ UNO_QUERY_THROW );
// import dialog model
Reference< XInputStreamProvider > xISP( aElement, UNO_QUERY_THROW );
if ( !_rxExistingDialogModel.is() )
{
Reference< XInputStream > xInput( xISP->createInputStream(), UNO_QUERY_THROW );
- ::xmlscript::importDialogModel( xInput, xDialogModel, aContext.getUNOContext(), isDocument() ? getDocument() : Reference< XModel >() );
+ ::xmlscript::importDialogModel( xInput, xDialogModel, aContext, isDocument() ? getDocument() : Reference< XModel >() );
}
// set new name as property
@@ -645,7 +649,7 @@ namespace basctl
xDlgPSet->setPropertyValue( DLGED_PROP_NAME, makeAny( _rNewName ) );
// export dialog model
- xISP = ::xmlscript::exportDialogModel( xDialogModel, aContext.getUNOContext(), isDocument() ? getDocument() : Reference< XModel >() );
+ xISP = ::xmlscript::exportDialogModel( xDialogModel, aContext, isDocument() ? getDocument() : Reference< XModel >() );
aElement <<= xISP;
}
@@ -747,17 +751,19 @@ namespace basctl
return false;
// create new dialog model
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
- Reference< XNameContainer > xDialogModel;
- if ( !aContext.createComponent( "com.sun.star.awt.UnoControlDialogModel", xDialogModel ) )
- return false;
+ Reference< XComponentContext > aContext(
+ comphelper::getProcessComponentContext() );
+ Reference< XNameContainer > xDialogModel(
+ aContext->getServiceManager()->createInstanceWithContext(
+ "com.sun.star.awt.UnoControlDialogModel", aContext ),
+ UNO_QUERY_THROW );
// set name property
Reference< XPropertySet > xDlgPSet( xDialogModel, UNO_QUERY_THROW );
xDlgPSet->setPropertyValue( DLGED_PROP_NAME, makeAny( _rDialogName ) );
// export dialog model
- _out_rDialogProvider = ::xmlscript::exportDialogModel( xDialogModel, aContext.getUNOContext(), isDocument() ? getDocument() : Reference< XModel >() );
+ _out_rDialogProvider = ::xmlscript::exportDialogModel( xDialogModel, aContext, isDocument() ? getDocument() : Reference< XModel >() );
// insert dialog into library
xLib->insertByName( _rDialogName, makeAny( _out_rDialogProvider ) );
diff --git a/basic/source/runtime/iosys.cxx b/basic/source/runtime/iosys.cxx
index aa595157807a..7f2753ad8b61 100644
--- a/basic/source/runtime/iosys.cxx
+++ b/basic/source/runtime/iosys.cxx
@@ -37,7 +37,6 @@
#include <rtl/strbuf.hxx>
#include <rtl/ustrbuf.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
@@ -543,7 +542,7 @@ SbError SbiStream::Open
if( xSMgr.is() )
{
Reference< XSimpleFileAccess2 >
- xSFI( SimpleFileAccess::create( comphelper::ComponentContext(xSMgr).getUNOContext() ) );
+ xSFI( SimpleFileAccess::create( comphelper::getComponentContext(xSMgr) ) );
try
{
diff --git a/basic/source/uno/namecont.cxx b/basic/source/uno/namecont.cxx
index dc72b38d83b6..091f04f96bbb 100644
--- a/basic/source/uno/namecont.cxx
+++ b/basic/source/uno/namecont.cxx
@@ -54,7 +54,7 @@
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/util/PathSubstitution.hpp>
#include <com/sun/star/deployment/ExtensionManager.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <basic/sbmod.hxx>
@@ -377,9 +377,9 @@ SfxLibraryContainer::SfxLibraryContainer( void )
mxMSF = comphelper::getProcessServiceFactory();
SAL_WARN_IF(!mxMSF.is(), "basic", "couldn't get ProcessServiceFactory");
- mxSFI = ucb::SimpleFileAccess::create( comphelper::ComponentContext(mxMSF).getUNOContext() );
+ mxSFI = ucb::SimpleFileAccess::create( comphelper::getComponentContext(mxMSF) );
- mxStringSubstitution = util::PathSubstitution::create( comphelper::ComponentContext(mxMSF).getUNOContext() );
+ mxStringSubstitution = util::PathSubstitution::create( comphelper::getComponentContext(mxMSF) );
}
SfxLibraryContainer::~SfxLibraryContainer()
@@ -2694,7 +2694,7 @@ void SAL_CALL SfxLibraryContainer::exportLibrary( const OUString& Name, const OU
Reference< XSimpleFileAccess2 > xToUseSFI;
if( Handler.is() )
{
- xToUseSFI = ucb::SimpleFileAccess::create( comphelper::ComponentContext(mxMSF).getUNOContext() );
+ xToUseSFI = ucb::SimpleFileAccess::create( comphelper::getComponentContext(mxMSF) );
xToUseSFI->setInteractionHandler( Handler );
}
diff --git a/bridges/test/testoffice.cxx b/bridges/test/testoffice.cxx
index 9b90bbe9ec01..8beb155c00d9 100644
--- a/bridges/test/testoffice.cxx
+++ b/bridges/test/testoffice.cxx
@@ -83,7 +83,7 @@ void mygetchar()
void testPipe( const Reference < XMultiServiceFactory > & rSmgr )
{
- Reference < XPipe > rPipe( Pipe::create(comphelper::ComponentContext(rSmgr).getUNOContext()), UNO_QUERY_THROW );
+ Reference < XPipe > rPipe( Pipe::create(comphelper::getComponentContext(rSmgr)), UNO_QUERY_THROW );
{
Sequence < sal_Int8 > seq( 10 );
diff --git a/comphelper/source/container/enumerablemap.cxx b/comphelper/source/container/enumerablemap.cxx
index 45f1c5cb4eae..058310e4cd09 100644
--- a/comphelper/source/container/enumerablemap.cxx
+++ b/comphelper/source/container/enumerablemap.cxx
@@ -22,7 +22,6 @@
#include "comphelper/anytostring.hxx"
#include "comphelper/anycompare.hxx"
#include "comphelper/componentbase.hxx"
-#include "comphelper/componentcontext.hxx"
#include "comphelper/extract.hxx"
#include <com/sun/star/container/XEnumerableMap.hpp>
@@ -191,7 +190,7 @@ namespace comphelper
,public ComponentBase
{
protected:
- EnumerableMap( const ComponentContext& _rContext );
+ EnumerableMap();
virtual ~EnumerableMap();
// XInitialization
@@ -238,7 +237,6 @@ namespace comphelper
private:
::osl::Mutex m_aMutex;
- ComponentContext m_aContext;
MapData m_aData;
::std::vector< ::com::sun::star::uno::WeakReference< XInterface > >
@@ -347,10 +345,9 @@ namespace comphelper
//= EnumerableMap
//====================================================================
//--------------------------------------------------------------------
- EnumerableMap::EnumerableMap( const ComponentContext& _rContext )
+ EnumerableMap::EnumerableMap()
:Map_IFace( m_aMutex )
,ComponentBase( Map_IFace::rBHelper )
- ,m_aContext( _rContext )
{
}
@@ -729,9 +726,9 @@ namespace comphelper
}
//--------------------------------------------------------------------
- Reference< XInterface > SAL_CALL EnumerableMap::Create( const Reference< XComponentContext >& _context )
+ Reference< XInterface > SAL_CALL EnumerableMap::Create( SAL_UNUSED_PARAMETER const Reference< XComponentContext >& )
{
- return *new EnumerableMap( ComponentContext( _context ) );
+ return *new EnumerableMap;
}
//====================================================================
diff --git a/comphelper/source/eventattachermgr/eventattachermgr.cxx b/comphelper/source/eventattachermgr/eventattachermgr.cxx
index 9b2402604b7c..85ed313a11fe 100644
--- a/comphelper/source/eventattachermgr/eventattachermgr.cxx
+++ b/comphelper/source/eventattachermgr/eventattachermgr.cxx
@@ -23,8 +23,8 @@
#endif
#include <osl/mutex.hxx>
#include <osl/diagnose.h>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/eventattachermgr.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/beans/XIntrospection.hpp>
#include <com/sun/star/io/XObjectInputStream.hpp>
#include <com/sun/star/io/XPersistObject.hpp>
@@ -45,7 +45,6 @@
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/implbase2.hxx>
-#include <comphelper/componentcontext.hxx>
#include <deque>
#include <algorithm>
@@ -363,7 +362,7 @@ Reference< XEventAttacherManager > createEventAttacherManager( const Reference<
if ( xIFace.is() )
{
Reference< XIntrospection > xIntrospection( xIFace, UNO_QUERY);
- return new ImplEventAttacherManager( xIntrospection, comphelper::ComponentContext(rSMgr).getUNOContext() );
+ return new ImplEventAttacherManager( xIntrospection, comphelper::getComponentContext(rSMgr) );
}
}
diff --git a/comphelper/source/misc/logging.cxx b/comphelper/source/misc/logging.cxx
index 19f7f42b7222..d5c4656c0db0 100644
--- a/comphelper/source/misc/logging.cxx
+++ b/comphelper/source/misc/logging.cxx
@@ -19,10 +19,10 @@
#include <comphelper/logging.hxx>
-#include <comphelper/componentcontext.hxx>
#include <com/sun/star/logging/LoggerPool.hpp>
#include <com/sun/star/logging/LogLevel.hpp>
+#include <com/sun/star/resource/OfficeResourceLoader.hpp>
#include <com/sun/star/resource/XResourceBundle.hpp>
#include <com/sun/star/resource/XResourceBundleLoader.hpp>
@@ -53,7 +53,7 @@ namespace comphelper
class EventLogger_Impl
{
private:
- ::comphelper::ComponentContext m_aContext;
+ Reference< XComponentContext > m_aContext;
::rtl::OUString m_sLoggerName;
Reference< XLogger > m_xLogger;
@@ -68,7 +68,7 @@ namespace comphelper
inline bool isValid() const { return m_xLogger.is(); }
inline const ::rtl::OUString& getName() const { return m_sLoggerName; }
inline const Reference< XLogger >& getLogger() const { return m_xLogger; }
- inline const ::comphelper::ComponentContext& getContext() const { return m_aContext; }
+ inline Reference< XComponentContext > getContext() const { return m_aContext; }
private:
void impl_createLogger_nothrow();
@@ -82,7 +82,7 @@ namespace comphelper
{
try
{
- Reference< XLoggerPool > xPool( LoggerPool::get( m_aContext.getUNOContext() ), UNO_QUERY_THROW );
+ Reference< XLoggerPool > xPool( LoggerPool::get( m_aContext ) );
if ( !m_sLoggerName.isEmpty() )
m_xLogger = xPool->getNamedLogger( m_sLoggerName );
else
@@ -224,7 +224,7 @@ namespace comphelper
};
//--------------------------------------------------------------------
- bool lcl_loadBundle_nothrow( const ComponentContext& _rContext, ResourceBasedEventLogger_Data& _rLoggerData )
+ bool lcl_loadBundle_nothrow( Reference< XComponentContext > const & _rContext, ResourceBasedEventLogger_Data& _rLoggerData )
{
if ( _rLoggerData.bBundleLoaded )
return _rLoggerData.xBundle.is();
@@ -234,7 +234,9 @@ namespace comphelper
try
{
- Reference< XResourceBundleLoader > xLoader( _rContext.getSingleton( "com.sun.star.resource.OfficeResourceLoader" ), UNO_QUERY_THROW );
+ Reference< XResourceBundleLoader > xLoader(
+ com::sun::star::resource::OfficeResourceLoader::get(
+ _rContext ) );
_rLoggerData.xBundle = Reference< XResourceBundle >( xLoader->loadBundle_Default( _rLoggerData.sBundleBaseName ), UNO_QUERY_THROW );
}
catch( const Exception& e )
diff --git a/comphelper/source/property/opropertybag.cxx b/comphelper/source/property/opropertybag.cxx
index 8331d2fd8d00..40764a409816 100644
--- a/comphelper/source/property/opropertybag.cxx
+++ b/comphelper/source/property/opropertybag.cxx
@@ -58,10 +58,9 @@ namespace comphelper
//= OPropertyBag
//====================================================================
//--------------------------------------------------------------------
- OPropertyBag::OPropertyBag( const Reference< XComponentContext >& _rxContext )
+ OPropertyBag::OPropertyBag()
:OPropertyBag_PBase( GetBroadcastHelper(), this )
,::cppu::IEventNotificationHook()
- ,m_aContext( _rxContext )
,m_bAutoAddProperties( false )
,m_NotifyListeners(m_aMutex)
,m_isModified(false)
@@ -116,9 +115,9 @@ namespace comphelper
}
//--------------------------------------------------------------------
- Reference< XInterface > SAL_CALL OPropertyBag::Create( const Reference< XComponentContext >& _rxContext )
+ Reference< XInterface > SAL_CALL OPropertyBag::Create( SAL_UNUSED_PARAMETER const Reference< XComponentContext >& )
{
- return *new OPropertyBag( _rxContext );
+ return *new OPropertyBag;
}
//--------------------------------------------------------------------
diff --git a/comphelper/source/property/opropertybag.hxx b/comphelper/source/property/opropertybag.hxx
index f5dbf4ebfd9c..2127c6611c94 100644
--- a/comphelper/source/property/opropertybag.hxx
+++ b/comphelper/source/property/opropertybag.hxx
@@ -30,11 +30,11 @@
#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/container/XSet.hpp>
+#include <boost/noncopyable.hpp>
#include <cppuhelper/implbase6.hxx>
#include <comphelper/propstate.hxx>
#include <comphelper/broadcasthelper.hxx>
#include <comphelper/propertybag.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/uno3.hxx>
#include <map>
@@ -76,11 +76,9 @@ namespace comphelper
,public OPropertyBag_PBase
,public OPropertyBag_Base
,public ::cppu::IEventNotificationHook
+ ,private boost::noncopyable
{
private:
- ::comphelper::ComponentContext
- m_aContext;
-
/// our IPropertyArrayHelper implementation
::std::auto_ptr< ::cppu::OPropertyArrayHelper >
m_pArrayHelper;
@@ -97,8 +95,6 @@ namespace comphelper
bool m_isModified;
public:
- OPropertyBag( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext );
-
// XServiceInfo - static versions
static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_static(void) throw( ::com::sun::star::uno::RuntimeException );
static ::rtl::OUString getImplementationName_static(void) throw( ::com::sun::star::uno::RuntimeException );
@@ -106,6 +102,7 @@ namespace comphelper
SAL_CALL Create(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
protected:
+ OPropertyBag();
virtual ~OPropertyBag();
DECLARE_XINTERFACE()
DECLARE_XTYPEPROVIDER()
@@ -215,10 +212,6 @@ namespace comphelper
*/
void impl_setPropertyValues_throw( const ::com::sun::star::uno::Sequence< ::com::sun::star::beans::PropertyValue >& _rProps );
- private:
- OPropertyBag(); // never implemented
- OPropertyBag( const OPropertyBag& ); // never implemented
- OPropertyBag& operator=( const OPropertyBag& ); // never implemented
protected:
using ::cppu::OPropertySetHelper::getPropertyValues;
using ::cppu::OPropertySetHelper::setPropertyValues;
diff --git a/comphelper/source/streaming/seekableinput.cxx b/comphelper/source/streaming/seekableinput.cxx
index 41ee54e70017..795b3b73a4a4 100644
--- a/comphelper/source/streaming/seekableinput.cxx
+++ b/comphelper/source/streaming/seekableinput.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/io/XOutputStream.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/seekableinput.hxx>
using namespace ::com::sun::star;
@@ -93,7 +93,7 @@ void OSeekableInputWrapper::PrepareCopy_Impl()
throw uno::RuntimeException();
uno::Reference< io::XOutputStream > xTempOut(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
copyInputToOutput_Impl( m_xOriginalStream, xTempOut );
diff --git a/connectivity/source/commontools/predicateinput.cxx b/connectivity/source/commontools/predicateinput.cxx
index 67ec21fcc810..4950de6fd7a7 100644
--- a/connectivity/source/commontools/predicateinput.cxx
+++ b/connectivity/source/commontools/predicateinput.cxx
@@ -19,6 +19,7 @@
#include <connectivity/predicateinput.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
#include <com/sun/star/i18n/LocaleData.hpp>
@@ -111,7 +112,7 @@ namespace dbtools
if ( m_xORB.is() )
{
m_xFormatter = Reference< XNumberFormatter >(
- NumberFormatter::create(comphelper::ComponentContext(m_xORB).getUNOContext()),
+ NumberFormatter::create(comphelper::getComponentContext(m_xORB)),
UNO_QUERY_THROW
);
}
@@ -125,7 +126,7 @@ namespace dbtools
// create the locale data
if ( m_xORB.is() )
{
- m_xLocaleData = LocaleData::create( comphelper::ComponentContext(m_xORB).getUNOContext() );
+ m_xLocaleData = LocaleData::create( comphelper::getComponentContext(m_xORB) );
}
}
catch( const Exception& )
diff --git a/connectivity/source/drivers/flat/ETable.cxx b/connectivity/source/drivers/flat/ETable.cxx
index 337d0f075698..14732280c6af 100644
--- a/connectivity/source/drivers/flat/ETable.cxx
+++ b/connectivity/source/drivers/flat/ETable.cxx
@@ -31,6 +31,7 @@
#include <stdio.h> //sprintf
#include <comphelper/extract.hxx>
#include <comphelper/numbers.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/string.hxx>
#include <comphelper/types.hxx>
@@ -423,7 +424,7 @@ void OFlatTable::construct()
Reference< ::com::sun::star::util::XNumberFormatsSupplier > xSupplier(m_pConnection->getDriver()->getFactory()->createInstanceWithArguments(::rtl::OUString("com.sun.star.util.NumberFormatsSupplier"),aArg),UNO_QUERY);
m_xNumberFormatter = Reference< ::com::sun::star::util::XNumberFormatter >(
::com::sun::star::util::NumberFormatter::create(
- comphelper::ComponentContext(m_pConnection->getDriver()->getFactory()).getUNOContext()),
+ comphelper::getComponentContext(m_pConnection->getDriver()->getFactory())),
UNO_QUERY_THROW);
m_xNumberFormatter->attachNumberFormatsSupplier(xSupplier);
Reference<XPropertySet> xProp(xSupplier->getNumberFormatSettings(),UNO_QUERY);
diff --git a/connectivity/source/drivers/hsqldb/HConnection.cxx b/connectivity/source/drivers/hsqldb/HConnection.cxx
index ee7c5b2bf6bc..685db4c6f1a4 100644
--- a/connectivity/source/drivers/hsqldb/HConnection.cxx
+++ b/connectivity/source/drivers/hsqldb/HConnection.cxx
@@ -35,8 +35,8 @@
#include <com/sun/star/beans/PropertyValue.hpp>
#include <com/sun/star/sdbc/XDatabaseMetaData2.hpp>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/listenernotification.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <rtl/ustrbuf.hxx>
@@ -344,7 +344,7 @@ namespace connectivity { namespace hsqldb
// create a graphic provider
Reference< XGraphicProvider > xProvider;
if ( m_xORB.is() )
- xProvider.set( GraphicProvider::create(::comphelper::ComponentContext(m_xORB).getUNOContext()) );
+ xProvider.set( GraphicProvider::create(::comphelper::getComponentContext(m_xORB)) );
// assemble the image URL
::rtl::OUStringBuffer aImageURL;
diff --git a/connectivity/source/parse/sqlnode.cxx b/connectivity/source/parse/sqlnode.cxx
index 9936d18f91c6..daf8ff5e768a 100644
--- a/connectivity/source/parse/sqlnode.cxx
+++ b/connectivity/source/parse/sqlnode.cxx
@@ -1286,7 +1286,7 @@ OSQLParser::OSQLParser(const ::com::sun::star::uno::Reference< ::com::sun::star:
s_pGarbageCollector = new OSQLParseNodesGarbageCollector();
if(!s_xLocaleData.is())
- s_xLocaleData = LocaleData::create(comphelper::ComponentContext(m_xServiceFactory).getUNOContext());
+ s_xLocaleData = LocaleData::create(comphelper::getComponentContext(m_xServiceFactory));
// reset to 0
memset(OSQLParser::s_nRuleIDs,0,sizeof(OSQLParser::s_nRuleIDs[0]) * (OSQLParseNode::rule_count+1));
diff --git a/cui/source/customize/acccfg.cxx b/cui/source/customize/acccfg.cxx
index 8ed9d6c09381..4ba939ee736e 100644
--- a/cui/source/customize/acccfg.cxx
+++ b/cui/source/customize/acccfg.cxx
@@ -67,7 +67,6 @@
//-----------------------------------------------
// include other projects
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <svtools/acceleratorexecute.hxx>
#include <svtools/svlbitm.hxx>
@@ -853,7 +852,7 @@ void SfxAcceleratorConfigPage::InitAccCfg()
m_xSMGR = ::comphelper::getProcessServiceFactory();
m_xUICmdDescription = css::frame::UICommandDescription::create(
- comphelper::ComponentContext(m_xSMGR).getUNOContext());
+ comphelper::getComponentContext(m_xSMGR));
// get the current active frame, which should be our "parent"
// for this session
@@ -866,7 +865,7 @@ void SfxAcceleratorConfigPage::InitAccCfg()
// identify module
css::uno::Reference< css::frame::XModuleManager2 > xModuleManager(
- css::frame::ModuleManager::create(comphelper::ComponentContext(m_xSMGR).getUNOContext()));
+ css::frame::ModuleManager::create(comphelper::getComponentContext(m_xSMGR)));
m_sModuleLongName = xModuleManager->identify(m_xFrame);
::comphelper::SequenceAsHashMap lModuleProps(xModuleManager->getByName(m_sModuleLongName));
m_sModuleShortName = lModuleProps.getUnpackedValueOrDefault(MODULEPROP_SHORTNAME, ::rtl::OUString());
@@ -877,7 +876,7 @@ void SfxAcceleratorConfigPage::InitAccCfg()
// get module accelerator configuration
- css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(css::ui::ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(m_xSMGR).getUNOContext()));
+ css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xModuleCfgSupplier(css::ui::ModuleUIConfigurationManagerSupplier::create(comphelper::getComponentContext(m_xSMGR)));
css::uno::Reference< css::ui::XUIConfigurationManager > xUICfgManager = xModuleCfgSupplier->getUIConfigurationManager(m_sModuleLongName);
m_xModule = css::uno::Reference< css::ui::XAcceleratorConfiguration >(xUICfgManager->getShortCutManager(), css::uno::UNO_QUERY_THROW);
}
diff --git a/cui/source/customize/cfg.cxx b/cui/source/customize/cfg.cxx
index 626a25dd6828..f7dc04eae4c4 100644
--- a/cui/source/customize/cfg.cxx
+++ b/cui/source/customize/cfg.cxx
@@ -65,7 +65,6 @@
#include "eventdlg.hxx"
#include <dialmgr.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/documentinfo.hxx>
#include <comphelper/processfactory.hxx>
#include <unotools/configmgr.hxx>
@@ -915,7 +914,7 @@ SaveInData::SaveInData(
uno::Reference< container::XNameAccess > xNameAccess(
css::frame::UICommandDescription::create(
- comphelper::ComponentContext(m_xServiceManager).getUNOContext()) );
+ comphelper::getComponentContext(m_xServiceManager)) );
xNameAccess->getByName( aModuleId ) >>= m_xCommandToLabelMap;
@@ -1915,7 +1914,7 @@ void SvxConfigPage::Reset( const SfxItemSet& )
}
uno::Reference< css::frame::XModuleManager2 > xModuleManager(
- css::frame::ModuleManager::create( comphelper::ComponentContext(xServiceManager).getUNOContext() ) );
+ css::frame::ModuleManager::create( comphelper::getComponentContext(xServiceManager) ) );
try
{
diff --git a/cui/source/customize/cfgutil.cxx b/cui/source/customize/cfgutil.cxx
index 0f08675ec4da..405c6fa83e10 100644
--- a/cui/source/customize/cfgutil.cxx
+++ b/cui/source/customize/cfgutil.cxx
@@ -59,7 +59,6 @@
#include "cuires.hrc"
#include <sfx2/app.hxx>
#include <sfx2/minfitem.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/documentinfo.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -587,7 +586,7 @@ void SfxConfigGroupListBox_Impl::Init(const css::uno::Reference< css::lang::XMul
m_xGlobalCategoryInfo = css::uno::Reference< css::container::XNameAccess >(m_xSMGR->createInstance(SERVICE_UICATEGORYDESCRIPTION), css::uno::UNO_QUERY_THROW);
m_xModuleCategoryInfo = css::uno::Reference< css::container::XNameAccess >(m_xGlobalCategoryInfo->getByName(m_sModuleLongName) , css::uno::UNO_QUERY_THROW);
m_xUICmdDescription = css::frame::UICommandDescription::create(
- ::comphelper::ComponentContext(m_xSMGR).getUNOContext());
+ ::comphelper::getComponentContext(m_xSMGR));
InitModule();
InitBasic();
diff --git a/cui/source/customize/selector.cxx b/cui/source/customize/selector.cxx
index 280393a6486f..c0023032d8ea 100644
--- a/cui/source/customize/selector.cxx
+++ b/cui/source/customize/selector.cxx
@@ -44,7 +44,6 @@
#include <comphelper/documentinfo.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/componentcontext.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/script/provider/XScriptProviderSupplier.hpp>
@@ -352,8 +351,7 @@ void SvxConfigGroupListBox_Impl::fillScriptList( const Reference< browse::XBrows
SvLBoxEntry* pNewEntry = InsertEntry( sUIName, _pParentEntry );
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
- Image aImage = GetImage( theChild, aContext.getUNOContext(), bIsRootNode );
+ Image aImage = GetImage( theChild, comphelper::getProcessComponentContext(), bIsRootNode );
SetExpandedEntryBmp( pNewEntry, aImage );
SetCollapsedEntryBmp( pNewEntry, aImage );
@@ -400,16 +398,11 @@ void SvxConfigGroupListBox_Impl::Init()
SetUpdateMode(sal_False);
ClearAll();
- Reference< XComponentContext > xContext;
- Reference < beans::XPropertySet > xProps(
- ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
-
- xContext.set( xProps->getPropertyValue(
- rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))),
- UNO_QUERY );
+ Reference< XComponentContext > xContext(
+ comphelper::getProcessComponentContext() );
// are we showing builtin commands?
- if ( m_bShowSlots && xContext.is() && m_xFrame.is() )
+ if ( m_bShowSlots && m_xFrame.is() )
{
Reference< lang::XMultiComponentFactory > xMCF =
xContext->getServiceManager();
@@ -502,45 +495,38 @@ void SvxConfigGroupListBox_Impl::Init()
}
}
- if ( xContext.is() )
- {
- // Add Scripting Framework entries
- Reference< browse::XBrowseNode > rootNode;
- Reference< XComponentContext> xCtx;
+ // Add Scripting Framework entries
+ Reference< browse::XBrowseNode > rootNode;
- try
- {
- Reference < beans::XPropertySet > _xProps(
- ::comphelper::getProcessServiceFactory(), UNO_QUERY_THROW );
- xCtx.set( _xProps->getPropertyValue( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "DefaultContext" ))), UNO_QUERY_THROW );
- Reference< browse::XBrowseNodeFactory > xFac( xCtx->getValueByName(
- OUString(RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory")) ), UNO_QUERY_THROW );
- rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
- }
- catch( const Exception& )
- {
- DBG_UNHANDLED_EXCEPTION();
- }
+ try
+ {
+ Reference< browse::XBrowseNodeFactory > xFac( xContext->getValueByName(
+ OUString(RTL_CONSTASCII_USTRINGPARAM( "/singletons/com.sun.star.script.browse.theBrowseNodeFactory")) ), UNO_QUERY_THROW );
+ rootNode.set( xFac->createView( browse::BrowseNodeFactoryViewTypes::MACROSELECTOR ) );
+ }
+ catch( const Exception& )
+ {
+ DBG_UNHANDLED_EXCEPTION();
+ }
- if ( rootNode.is() )
+ if ( rootNode.is() )
+ {
+ if ( m_bShowSlots )
{
- if ( m_bShowSlots )
- {
- SvxGroupInfo_Impl *pInfo =
- new SvxGroupInfo_Impl( SVX_CFGGROUP_SCRIPTCONTAINER, 0, rootNode );
+ SvxGroupInfo_Impl *pInfo =
+ new SvxGroupInfo_Impl( SVX_CFGGROUP_SCRIPTCONTAINER, 0, rootNode );
- String aTitle =
- String( CUI_RES( STR_SELECTOR_MACROS ) );
+ String aTitle =
+ String( CUI_RES( STR_SELECTOR_MACROS ) );
- SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL );
- pNewEntry->SetUserData( pInfo );
- pNewEntry->EnableChildrenOnDemand( sal_True );
- aArr.push_back( pInfo );
- }
- else
- {
- fillScriptList( rootNode, NULL, false );
- }
+ SvLBoxEntry *pNewEntry = InsertEntry( aTitle, NULL );
+ pNewEntry->SetUserData( pInfo );
+ pNewEntry->EnableChildrenOnDemand( sal_True );
+ aArr.push_back( pInfo );
+ }
+ else
+ {
+ fillScriptList( rootNode, NULL, false );
}
}
MakeVisible( GetEntry( 0,0 ) );
diff --git a/cui/source/options/treeopt.cxx b/cui/source/options/treeopt.cxx
index c40bfdae7541..19c6a5070690 100644
--- a/cui/source/options/treeopt.cxx
+++ b/cui/source/options/treeopt.cxx
@@ -67,7 +67,6 @@
#include <com/sun/star/frame/ModuleManager.hpp>
#include <com/sun/star/loader/CannotActivateFactoryException.hpp>
#include <com/sun/star/util/XMacroExpander.hpp>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <editeng/optitems.hxx>
#include <editeng/unolingu.hxx>
@@ -1945,7 +1944,7 @@ rtl::OUString OfaTreeOptionsDialog::GetModuleIdentifier(
{
rtl::OUString sModule;
Reference < XFrame > xCurrentFrame( rFrame );
- Reference < XModuleManager2 > xModuleManager( ModuleManager::create(comphelper::ComponentContext(xMFac).getUNOContext()) );
+ Reference < XModuleManager2 > xModuleManager( ModuleManager::create(comphelper::getComponentContext(xMFac)) );
if ( !xCurrentFrame.is() )
{
diff --git a/dbaccess/source/ui/app/AppDetailView.cxx b/dbaccess/source/ui/app/AppDetailView.cxx
index 5067b1634f5e..7ebc0993aa64 100644
--- a/dbaccess/source/ui/app/AppDetailView.cxx
+++ b/dbaccess/source/ui/app/AppDetailView.cxx
@@ -43,7 +43,7 @@
#include "dbtreelistbox.hxx"
#include "IApplicationController.hxx"
#include "imageprovider.hxx"
-#include "comphelper/componentcontext.hxx"
+#include "comphelper/processfactory.hxx"
using namespace ::dbaui;
using namespace ::com::sun::star::uno;
@@ -476,7 +476,7 @@ void OTasksWindow::fillTaskEntryList( const TaskEntryList& _rList )
try
{
Reference< XModuleUIConfigurationManagerSupplier > xModuleCfgMgrSupplier(
- ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(getDetailView()->getBorderWin().getView()->getORB()).getUNOContext()) );
+ ModuleUIConfigurationManagerSupplier::create(comphelper::getComponentContext(getDetailView()->getBorderWin().getView()->getORB())) );
Reference< XUIConfigurationManager > xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(
::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.sdb.OfficeDatabaseDocument" ) )
);
diff --git a/dbaccess/source/ui/browser/brwctrlr.cxx b/dbaccess/source/ui/browser/brwctrlr.cxx
index 348d33a4bb17..c918fa04a3b8 100644
--- a/dbaccess/source/ui/browser/brwctrlr.cxx
+++ b/dbaccess/source/ui/browser/brwctrlr.cxx
@@ -65,6 +65,7 @@
#include <comphelper/enumhelper.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/string.hxx>
#include <connectivity/dbexception.hxx>
@@ -778,7 +779,7 @@ void SbaXDataBrowserController::initFormatter()
{
// create a new formatter
m_xFormatter = Reference< util::XNumberFormatter > (
- util::NumberFormatter::create(comphelper::ComponentContext(getORB()).getUNOContext()), UNO_QUERY_THROW);
+ util::NumberFormatter::create(comphelper::getComponentContext(getORB())), UNO_QUERY_THROW);
m_xFormatter->attachNumberFormatsSupplier(xSupplier);
}
else // clear the formatter
diff --git a/dbaccess/source/ui/browser/genericcontroller.cxx b/dbaccess/source/ui/browser/genericcontroller.cxx
index f62772ed383e..11178af047ec 100644
--- a/dbaccess/source/ui/browser/genericcontroller.cxx
+++ b/dbaccess/source/ui/browser/genericcontroller.cxx
@@ -28,7 +28,7 @@
#include <osl/diagnose.h>
#include "dbustrings.hrc"
#include <vcl/stdtext.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <framework/titlehelper.hxx>
#include <comphelper/sequence.hxx>
@@ -199,7 +199,7 @@ OGenericUnoController::OGenericUnoController(const Reference< XMultiServiceFacto
try
{
- m_xUrlTransformer = URLTransformer::create(comphelper::ComponentContext(_rM).getUNOContext());
+ m_xUrlTransformer = URLTransformer::create(comphelper::getComponentContext(_rM));
}
catch(Exception&)
{
diff --git a/dbaccess/source/ui/control/ColumnControlWindow.cxx b/dbaccess/source/ui/control/ColumnControlWindow.cxx
index d96da5c2ed0e..ca661bceaa08 100644
--- a/dbaccess/source/ui/control/ColumnControlWindow.cxx
+++ b/dbaccess/source/ui/control/ColumnControlWindow.cxx
@@ -23,7 +23,7 @@
#include <connectivity/dbtools.hxx>
#include "UITools.hxx"
#include "dbu_resource.hrc"
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/util/NumberFormatter.hpp>
@@ -105,7 +105,7 @@ Reference< XNumberFormatter > OColumnControlWindow::GetFormatter() const
if ( xSupplier.is() )
{
// create a new formatter
- m_xFormatter.set( NumberFormatter::create(comphelper::ComponentContext(m_xORB).getUNOContext()), UNO_QUERY_THROW);
+ m_xFormatter.set( NumberFormatter::create(comphelper::getComponentContext(m_xORB)), UNO_QUERY_THROW);
m_xFormatter->attachNumberFormatsSupplier(xSupplier);
}
}
diff --git a/dbaccess/source/ui/control/toolboxcontroller.cxx b/dbaccess/source/ui/control/toolboxcontroller.cxx
index f5c28384d606..cf9242e92598 100644
--- a/dbaccess/source/ui/control/toolboxcontroller.cxx
+++ b/dbaccess/source/ui/control/toolboxcontroller.cxx
@@ -36,7 +36,7 @@
#include <osl/mutex.hxx>
#include "dbu_reghelper.hxx"
#include "UITools.hxx"
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
extern "C" void SAL_CALL createRegistryInfo_OToolboxController()
@@ -186,7 +186,7 @@ namespace dbaui
try
{
- Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(getServiceManager()).getUNOContext()));
+ Reference<XModuleUIConfigurationManagerSupplier> xModuleCfgMgrSupplier(ModuleUIConfigurationManagerSupplier::create(comphelper::getComponentContext(getServiceManager())));
Reference<XUIConfigurationManager> xUIConfigMgr = xModuleCfgMgrSupplier->getUIConfigurationManager(::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.sdb.OfficeDatabaseDocument")));
Reference<XImageManager> xImageMgr(xUIConfigMgr->getImageManager(),UNO_QUERY);
diff --git a/dbaccess/source/ui/dlg/dbwizsetup.cxx b/dbaccess/source/ui/dlg/dbwizsetup.cxx
index 273efc5c0de0..274c81353e90 100644
--- a/dbaccess/source/ui/dlg/dbwizsetup.cxx
+++ b/dbaccess/source/ui/dlg/dbwizsetup.cxx
@@ -76,9 +76,9 @@
#include <svl/filenotation.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/namedvaluecollection.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
@@ -841,7 +841,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
}
else if ( m_pCollection->isFileSystemBased(eType) )
{
- Reference< XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::ComponentContext(getORB()).getUNOContext()));
+ Reference< XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getComponentContext(getORB())));
INetURLObject aDBPathURL(m_sWorkPath);
aDBPathURL.Append(m_aDocURL.getBase());
createUniqueFolderName(&aDBPathURL);
@@ -909,7 +909,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
//-------------------------------------------------------------------------
void ODbTypeWizDialogSetup::createUniqueFolderName(INetURLObject* pURL)
{
- Reference< XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::ComponentContext(getORB()).getUNOContext()));
+ Reference< XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getComponentContext(getORB())));
:: rtl::OUString sLastSegmentName = pURL->getName();
sal_Bool bFolderExists = sal_True;
sal_Int32 i = 1;
@@ -927,7 +927,7 @@ sal_Bool ODbTypeWizDialogSetup::SaveDatabaseDocument()
//-------------------------------------------------------------------------
String ODbTypeWizDialogSetup::createUniqueFileName(const INetURLObject& _rURL)
{
- Reference< XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::ComponentContext(getORB()).getUNOContext()));
+ Reference< XSimpleFileAccess2 > xSimpleFileAccess(ucb::SimpleFileAccess::create(comphelper::getComponentContext(getORB())));
:: rtl::OUString sFilename = _rURL.getName();
::rtl::OUString BaseName = _rURL.getBase();
::rtl::OUString sExtension = _rURL.getExtension();
diff --git a/dbaccess/source/ui/dlg/paramdialog.cxx b/dbaccess/source/ui/dlg/paramdialog.cxx
index a6d48cf4bb02..94895690ea92 100644
--- a/dbaccess/source/ui/dlg/paramdialog.cxx
+++ b/dbaccess/source/ui/dlg/paramdialog.cxx
@@ -25,6 +25,7 @@
#include "moduledbu.hxx"
#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
+#include <comphelper/processfactory.hxx>
#include <connectivity/dbtools.hxx>
#include "dbustrings.hrc"
#include <vcl/svapp.hxx>
@@ -81,7 +82,7 @@ DBG_NAME(OParameterDialog)
DBG_CTOR(OParameterDialog,NULL);
if (_rxORB.is())
- m_xFormatter = Reference< XNumberFormatter>( NumberFormatter::create(comphelper::ComponentContext(_rxORB).getUNOContext()), UNO_QUERY_THROW);
+ m_xFormatter = Reference< XNumberFormatter>( NumberFormatter::create(comphelper::getComponentContext(_rxORB)), UNO_QUERY_THROW);
else {
OSL_FAIL("OParameterDialog::OParameterDialog: need a service factory!");
}
diff --git a/dbaccess/source/ui/misc/TokenWriter.cxx b/dbaccess/source/ui/misc/TokenWriter.cxx
index 286650f5c8a8..ad091cc66c21 100644
--- a/dbaccess/source/ui/misc/TokenWriter.cxx
+++ b/dbaccess/source/ui/misc/TokenWriter.cxx
@@ -25,6 +25,7 @@
#include "HtmlReader.hxx"
#include "dbustrings.hrc"
#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
@@ -730,7 +731,7 @@ void OHTMLImportExport::WriteHeader()
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "misc", "Ocke.Janssen@sun.com", "OHTMLImportExport::WriteHeader" );
uno::Reference<document::XDocumentProperties> xDocProps(
- document::DocumentProperties::create( comphelper::ComponentContext(m_xFactory).getUNOContext() ) );
+ document::DocumentProperties::create( comphelper::getComponentContext(m_xFactory) ) );
if (xDocProps.is()) {
xDocProps->setTitle(m_sName);
}
diff --git a/dbaccess/source/ui/misc/UITools.cxx b/dbaccess/source/ui/misc/UITools.cxx
index 578e6e054113..4131abc204e0 100644
--- a/dbaccess/source/ui/misc/UITools.cxx
+++ b/dbaccess/source/ui/misc/UITools.cxx
@@ -1627,7 +1627,7 @@ Reference< XNumberFormatter > getNumberFormatter(const Reference< XConnection >&
{
// create a new formatter
xFormatter = Reference< util::XNumberFormatter > (
- util::NumberFormatter::create(comphelper::ComponentContext(_rMF).getUNOContext()), UNO_QUERY_THROW);
+ util::NumberFormatter::create(comphelper::getComponentContext(_rMF)), UNO_QUERY_THROW);
xFormatter->attachNumberFormatsSupplier(xSupplier);
}
}
diff --git a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
index 785b31b8859c..09718e39b6d4 100644
--- a/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
+++ b/dbaccess/source/ui/misc/dbsubcomponentcontroller.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/util/NumberFormatter.hpp>
#include <com/sun/star/lang/IllegalArgumentException.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbexception.hxx>
@@ -298,7 +298,7 @@ namespace dbaui
if(xSupplier.is())
{
m_pImpl->m_xFormatter = Reference< XNumberFormatter >(
- NumberFormatter::create(comphelper::ComponentContext(getORB()).getUNOContext()), UNO_QUERY_THROW);
+ NumberFormatter::create(comphelper::getComponentContext(getORB())), UNO_QUERY_THROW);
m_pImpl->m_xFormatter->attachNumberFormatsSupplier(xSupplier);
}
OSL_ENSURE(m_pImpl->m_xFormatter.is(),"No NumberFormatter!");
diff --git a/desktop/source/migration/migration.cxx b/desktop/source/migration/migration.cxx
index fe98ad01036f..bcc67ed4a801 100644
--- a/desktop/source/migration/migration.cxx
+++ b/desktop/source/migration/migration.cxx
@@ -35,7 +35,6 @@
#include "migration_impl.hxx"
#include <unotools/textsearch.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequence.hxx>
#include <unotools/bootstrap.hxx>
@@ -275,7 +274,7 @@ sal_Bool MigrationImpl::doMigration()
lArgs[1] <<= embed::ElementModes::READ;
uno::Reference< lang::XSingleServiceFactory > xStorageFactory(
- embed::FileSystemStorageFactory::create(comphelper::ComponentContext(m_xFactory).getUNOContext()));
+ embed::FileSystemStorageFactory::create(comphelper::getComponentContext(m_xFactory)));
uno::Reference< embed::XStorage > xModules(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
uno::Reference< ui::XUIConfigurationManager > xOldCfgManager( m_xFactory->createInstance( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.UIConfigurationManager"))), uno::UNO_QUERY );
uno::Reference< ui::XUIConfigurationStorage > xOldCfgStorage( xOldCfgManager, uno::UNO_QUERY );
@@ -997,7 +996,7 @@ void MigrationImpl::runServices()
lArgs[1] <<= embed::ElementModes::READ;
uno::Reference< lang::XSingleServiceFactory > xStorageFactory(
- embed::FileSystemStorageFactory::create(comphelper::ComponentContext(m_xFactory).getUNOContext()));
+ embed::FileSystemStorageFactory::create(comphelper::getComponentContext(m_xFactory)));
uno::Reference< embed::XStorage > xModules;
xModules = uno::Reference< embed::XStorage >(xStorageFactory->createInstanceWithArguments(lArgs), uno::UNO_QUERY);
diff --git a/editeng/source/xml/xmltxtimp.cxx b/editeng/source/xml/xmltxtimp.cxx
index 2604ab818b0a..cc5d11115436 100644
--- a/editeng/source/xml/xmltxtimp.cxx
+++ b/editeng/source/xml/xmltxtimp.cxx
@@ -200,7 +200,7 @@ void SvxReadXML( EditEngine& rEditEngine, SvStream& rStream, const ESelection& r
break;
}
- uno::Reference< XInterface > xPipe( Pipe::create(comphelper::ComponentContext(xServiceFactory).getUNOContext()), UNO_QUERY );
+ uno::Reference< XInterface > xPipe( Pipe::create(comphelper::getComponentContext(xServiceFactory)), UNO_QUERY );
// connect pipe's output stream to the data source
xSource->setOutputStream( uno::Reference< io::XOutputStream >::query( xPipe ) );
diff --git a/embeddedobj/source/commonembedding/embedobj.cxx b/embeddedobj/source/commonembedding/embedobj.cxx
index 06ad663ee351..ae8ef08665d6 100644
--- a/embeddedobj/source/commonembedding/embedobj.cxx
+++ b/embeddedobj/source/commonembedding/embedobj.cxx
@@ -46,7 +46,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/embed/EmbedMisc.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <rtl/logfile.hxx>
@@ -323,7 +323,7 @@ void OCommonEmbeddedObject::SwitchStateTo_Impl( sal_Int32 nNextState )
uno::Reference< embed::XComponentSupplier > xCompSupl( m_xClientSite, uno::UNO_QUERY_THROW );
uno::Reference< uno::XInterface > xContDoc( xCompSupl->getComponent(), uno::UNO_QUERY_THROW );
- uno::Reference< frame::XModuleManager2 > xManager( frame::ModuleManager::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) );
+ uno::Reference< frame::XModuleManager2 > xManager( frame::ModuleManager::create(comphelper::getComponentContext(m_xFactory)) );
aModuleName = xManager->identify( xContDoc );
}
diff --git a/embeddedobj/source/commonembedding/persistence.cxx b/embeddedobj/source/commonembedding/persistence.cxx
index 4cd67ef22b18..f881f108f022 100644
--- a/embeddedobj/source/commonembedding/persistence.cxx
+++ b/embeddedobj/source/commonembedding/persistence.cxx
@@ -54,8 +54,8 @@
#include <com/sun/star/beans/IllegalTypeException.hpp>
#include <com/sun/star/chart2/XChartDocument.hpp>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/fileformat.h>
+#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/namedvaluecollection.hxx>
@@ -134,7 +134,7 @@ uno::Reference< io::XInputStream > createTempInpStreamFromStor(
uno::Reference< io::XInputStream > xResult;
- uno::Reference < io::XStream > xTempStream( io::TempFile::create(comphelper::ComponentContext(xFactory).getUNOContext()),
+ uno::Reference < io::XStream > xTempStream( io::TempFile::create(comphelper::getComponentContext(xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference < lang::XSingleServiceFactory > xStorageFactory(
@@ -585,7 +585,7 @@ uno::Reference< io::XInputStream > OCommonEmbeddedObject::StoreDocumentToTempStr
const ::rtl::OUString& aHierarchName )
{
uno::Reference < io::XOutputStream > xTempOut(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference< io::XInputStream > aResult( xTempOut, uno::UNO_QUERY );
diff --git a/embeddedobj/source/general/docholder.cxx b/embeddedobj/source/general/docholder.cxx
index fd073eda383d..2f9e617230e5 100644
--- a/embeddedobj/source/general/docholder.cxx
+++ b/embeddedobj/source/general/docholder.cxx
@@ -74,7 +74,6 @@
#include <osl/diagnose.h>
#include <rtl/process.h>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/namedvaluecollection.hxx>
@@ -576,14 +575,14 @@ uno::Reference< container::XIndexAccess > DocumentHolder::RetrieveOwnMenu_Impl()
if ( !xResult.is() )
{
// no internal document configuration, use the one from the module
- uno::Reference< frame::XModuleManager2 > xModuleMan( frame::ModuleManager::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) );
+ uno::Reference< frame::XModuleManager2 > xModuleMan( frame::ModuleManager::create(comphelper::getComponentContext(m_xFactory)) );
::rtl::OUString aModuleIdent =
xModuleMan->identify( uno::Reference< uno::XInterface >( m_xComponent, uno::UNO_QUERY ) );
if ( !aModuleIdent.isEmpty() )
{
uno::Reference< ui::XModuleUIConfigurationManagerSupplier > xModConfSupplier(
- ui::ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) );
+ ui::ModuleUIConfigurationManagerSupplier::create(comphelper::getComponentContext(m_xFactory)) );
uno::Reference< ::com::sun::star::ui::XUIConfigurationManager > xModUIConfMan(
xModConfSupplier->getUIConfigurationManager( aModuleIdent ),
uno::UNO_QUERY_THROW );
diff --git a/embeddedobj/source/msole/olecomponent.cxx b/embeddedobj/source/msole/olecomponent.cxx
index f4fe34691e0f..4389a2cc505d 100644
--- a/embeddedobj/source/msole/olecomponent.cxx
+++ b/embeddedobj/source/msole/olecomponent.cxx
@@ -38,8 +38,8 @@
#include <platform.h>
#include <cppuhelper/interfacecontainer.h>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/mimeconfighelper.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <osl/file.hxx>
#include <rtl/ref.hxx>
@@ -1598,7 +1598,7 @@ uno::Any SAL_CALL OleComponent::getTransferData( const datatransfer::DataFlavor&
// allow to retrieve stream-representation of the object persistence
bSupportedFlavor = sal_True;
uno::Reference < io::XStream > xTempFileStream(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference< io::XOutputStream > xTempOutStream = xTempFileStream->getOutputStream();
diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx
index 14db754ff4f9..d829944a6d1d 100644
--- a/embeddedobj/source/msole/oleembed.cxx
+++ b/embeddedobj/source/msole/oleembed.cxx
@@ -53,8 +53,8 @@
#include <com/sun/star/system/SystemShellExecuteFlags.hpp>
#include <rtl/logfile.hxx>
-#include <comphelper/componentcontext.hxx>
#include <cppuhelper/interfacecontainer.h>
+#include <comphelper/processfactory.hxx>
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/storagehelper.hxx>
@@ -706,7 +706,7 @@ namespace
// the solution is only active for Unix systems
#ifndef WNT
uno::Reference <beans::XPropertySet> xNativeTempFile(
- io::TempFile::create(comphelper::ComponentContext(xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(xFactory)),
uno::UNO_QUERY_THROW);
uno::Reference < io::XStream > xStream(xNativeTempFile, uno::UNO_QUERY_THROW);
@@ -740,7 +740,7 @@ namespace
xNativeTempFile = uno::Reference<beans::XPropertySet>();
uno::Reference < ucb::XSimpleFileAccess2 > xSimpleFileAccess(
- ucb::SimpleFileAccess::create( comphelper::ComponentContext(xFactory).getUNOContext() ) );
+ ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) );
xSimpleFileAccess->setReadOnly(sUrl, sal_True);
}
@@ -879,7 +879,7 @@ void SAL_CALL OleEmbeddedObject::doVerb( sal_Int32 nVerbID )
if (!m_aTempDumpURL.isEmpty())
{
uno::Reference< ::com::sun::star::system::XSystemShellExecute > xSystemShellExecute(
- ::com::sun::star::system::SystemShellExecute::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) );
+ ::com::sun::star::system::SystemShellExecute::create(comphelper::getComponentContext(m_xFactory)) );
xSystemShellExecute->execute(m_aTempDumpURL, ::rtl::OUString(), ::com::sun::star::system::SystemShellExecuteFlags::URIS_ONLY);
}
else
diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx
index 7939ad527499..edebfc3e1a3d 100644
--- a/embeddedobj/source/msole/olepersist.cxx
+++ b/embeddedobj/source/msole/olepersist.cxx
@@ -49,7 +49,7 @@
#include <rtl/logfile.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/mimeconfighelper.hxx>
#include <comphelper/classids.hxx>
@@ -72,7 +72,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang:
try
{
uno::Reference < ucb::XSimpleFileAccess2 > xAccess(
- ucb::SimpleFileAccess::create( comphelper::ComponentContext(xFactory).getUNOContext() ) );
+ ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) );
xAccess->kill( aURL );
bRet = sal_True;
@@ -92,7 +92,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang:
::rtl::OUString aResult;
uno::Reference < beans::XPropertySet > xTempFile(
- io::TempFile::create(comphelper::ComponentContext(xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(xFactory)),
uno::UNO_QUERY_THROW );
try {
@@ -124,7 +124,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang:
{
try {
uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess(
- ucb::SimpleFileAccess::create( comphelper::ComponentContext(xFactory).getUNOContext() ) );
+ ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) );
uno::Reference< io::XOutputStream > xTempOutStream = xTempAccess->openFileWrite( aResult );
if ( xTempOutStream.is() )
@@ -170,7 +170,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang:
try
{
uno::Reference < beans::XPropertySet > xTempFile(
- io::TempFile::create(comphelper::ComponentContext(xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(xFactory)),
uno::UNO_QUERY );
uno::Reference < io::XStream > xTempStream( xTempFile, uno::UNO_QUERY_THROW );
@@ -276,7 +276,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::GetNewFilledTempStream_Impl( co
OSL_ENSURE( xInStream.is(), "Wrong parameter is provided!\n" );
uno::Reference < io::XStream > xTempFile(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference< io::XOutputStream > xTempOutStream = xTempFile->getOutputStream();
@@ -353,7 +353,7 @@ uno::Reference< io::XStream > OleEmbeddedObject::TryToGetAcceptableFormat_Impl(
{
// this is either a bitmap or a metafile clipboard format, retrieve the pure stream
uno::Reference < io::XStream > xResult(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference < io::XSeekable > xResultSeek( xResult, uno::UNO_QUERY_THROW );
uno::Reference < io::XOutputStream > xResultOut = xResult->getOutputStream();
@@ -401,7 +401,7 @@ void OleEmbeddedObject::InsertVisualCache_Impl( const uno::Reference< io::XStrea
xCachedSeek->seek( 0 );
uno::Reference < io::XStream > xTempFile(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference< io::XSeekable > xTempSeek( xTempFile, uno::UNO_QUERY_THROW );
@@ -587,7 +587,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream()
{
// open temporary file for reading
uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess(
- ucb::SimpleFileAccess::create( comphelper::ComponentContext(m_xFactory).getUNOContext() ) );
+ ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) );
xStream = xTempAccess->openFileRead( m_aTempURL );
}
@@ -1053,7 +1053,7 @@ void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream >
// open temporary file for reading
uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess(
- ucb::SimpleFileAccess::create( comphelper::ComponentContext(m_xFactory).getUNOContext() ) );
+ ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) );
uno::Reference< io::XInputStream > xTempInStream = xTempAccess->openFileRead( m_aTempURL );
OSL_ENSURE( xTempInStream.is(), "The object's temporary file can not be reopened for reading!\n" );
diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx
index c5bb43ad9b11..a9bec9648a3e 100644
--- a/embeddedobj/source/msole/ownview.cxx
+++ b/embeddedobj/source/msole/ownview.cxx
@@ -47,7 +47,7 @@
#include <com/sun/star/document/XTypeDetection.hpp>
#include <com/sun/star/container/XNameAccess.hpp>
#include <cppuhelper/implbase1.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/mimeconfighelper.hxx>
@@ -277,7 +277,7 @@ sal_Bool OwnView_Impl::ReadContentsAndGenerateTempFile( const uno::Reference< io
// create m_aNativeTempURL
::rtl::OUString aNativeTempURL;
uno::Reference < beans::XPropertySet > xNativeTempFile(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference < io::XStream > xNativeTempStream( xNativeTempFile, uno::UNO_QUERY_THROW );
uno::Reference < io::XOutputStream > xNativeOutTemp = xNativeTempStream->getOutputStream();
@@ -424,7 +424,7 @@ void OwnView_Impl::CreateNative()
try
{
uno::Reference < ucb::XSimpleFileAccess2 > xAccess(
- ucb::SimpleFileAccess::create( comphelper::ComponentContext(m_xFactory).getUNOContext() ) );
+ ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) );
uno::Reference< io::XInputStream > xInStream = xAccess->openFileRead( m_aTempFileURL );
if ( !xInStream.is() )
diff --git a/embedserv/source/embed/ed_ipersiststr.cxx b/embedserv/source/embed/ed_ipersiststr.cxx
index 9e9ef8ca7f18..92feee5d6356 100644
--- a/embedserv/source/embed/ed_ipersiststr.cxx
+++ b/embedserv/source/embed/ed_ipersiststr.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 <osl/mutex.hxx>
#include <osl/diagnose.h>
@@ -65,7 +65,7 @@ uno::Reference< io::XInputStream > createTempXInStreamFromIStream(
if ( !pStream )
return xResult;
- uno::Reference < io::XOutputStream > xTempOut( io::TempFile::create(comphelper::ComponentContext(xFactory).getUNOContext()),
+ uno::Reference < io::XOutputStream > xTempOut( io::TempFile::create(comphelper::getComponentContext(xFactory)),
uno::UNO_QUERY_THROW );
ULARGE_INTEGER nNewPos;
LARGE_INTEGER aZero = { 0L, 0L };
@@ -216,7 +216,7 @@ uno::Sequence< beans::PropertyValue > EmbedDocument_Impl::fillArgsForLoading_Imp
rtl::OUString sDocUrl;
if ( pFilePath )
{
- uno::Reference< util::XURLTransformer > aTransformer( util::URLTransformer::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) );
+ uno::Reference< util::XURLTransformer > aTransformer( util::URLTransformer::create(comphelper::getComponentContext(m_xFactory)) );
util::URL aURL;
aURL.Complete = ::rtl::OUString( reinterpret_cast<const sal_Unicode*>(pFilePath) );
@@ -616,7 +616,7 @@ STDMETHODIMP EmbedDocument_Impl::Save( IStorage *pStgSave, BOOL fSameAsLoad )
HRESULT hr = E_FAIL;
- uno::Reference < io::XOutputStream > xTempOut( io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ uno::Reference < io::XOutputStream > xTempOut( io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference< frame::XStorable > xStorable( m_pDocHolder->GetDocument(), uno::UNO_QUERY );
@@ -872,7 +872,7 @@ STDMETHODIMP EmbedDocument_Impl::Save( LPCOLESTR pszFileName, BOOL fRemember )
util::URL aURL;
aURL.Complete = ::rtl::OUString( reinterpret_cast<const sal_Unicode*>( pszFileName ) );
- uno::Reference< util::XURLTransformer > aTransformer( util::URLTransformer::create(comphelper::ComponentContext(m_xFactory).getUNOContext()) );
+ uno::Reference< util::XURLTransformer > aTransformer( util::URLTransformer::create(comphelper::getComponentContext(m_xFactory)) );
if ( aTransformer->parseSmart( aURL, ::rtl::OUString() ) && aURL.Complete.getLength() )
{
diff --git a/eventattacher/source/eventattacher.cxx b/eventattacher/source/eventattacher.cxx
index 0d04048ffca2..3b22b496386f 100644
--- a/eventattacher/source/eventattacher.cxx
+++ b/eventattacher/source/eventattacher.cxx
@@ -33,7 +33,7 @@
// InvocationToAllListenerMapper
#include <com/sun/star/script/XInvocation.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/weak.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/implbase1.hxx>
@@ -408,7 +408,7 @@ Reference< XIdlReflection > EventAttacherImpl::getReflection() throw( Exception
Guard< Mutex > aGuard( m_aMutex );
if( !m_xReflection.is() )
{
- m_xReflection = theCoreReflection::get(comphelper::ComponentContext(m_xSMgr).getUNOContext());
+ m_xReflection = theCoreReflection::get(comphelper::getComponentContext(m_xSMgr));
}
return m_xReflection;
}
@@ -434,7 +434,7 @@ Reference< XTypeConverter > EventAttacherImpl::getConverter() throw( Exception )
Guard< Mutex > aGuard( m_aMutex );
if( !m_xConverter.is() )
{
- m_xConverter = Converter::create(comphelper::ComponentContext(m_xSMgr).getUNOContext());
+ m_xConverter = Converter::create(comphelper::getComponentContext(m_xSMgr));
}
return m_xConverter;
}
diff --git a/extensions/source/dbpilots/groupboxwiz.cxx b/extensions/source/dbpilots/groupboxwiz.cxx
index 00d7dabb52e5..b5552e8bace0 100644
--- a/extensions/source/dbpilots/groupboxwiz.cxx
+++ b/extensions/source/dbpilots/groupboxwiz.cxx
@@ -33,7 +33,7 @@
#include <vcl/msgbox.hxx>
#include "optiongrouplayouter.hxx"
#include "dbpilots.hrc"
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#define GBW_STATE_OPTIONLIST 0
#define GBW_STATE_DEFAULTOPTION 1
@@ -169,7 +169,7 @@ namespace dbp
{
try
{
- OOptionGroupLayouter aLayouter(comphelper::ComponentContext(getServiceFactory()).getUNOContext());
+ OOptionGroupLayouter aLayouter(comphelper::getComponentContext(getServiceFactory()));
aLayouter.doLayout(getContext(), getSettings());
}
catch(const Exception&)
diff --git a/extensions/source/ole/unoobjw.cxx b/extensions/source/ole/unoobjw.cxx
index cb0c40839c6d..b79626004b75 100644
--- a/extensions/source/ole/unoobjw.cxx
+++ b/extensions/source/ole/unoobjw.cxx
@@ -1122,7 +1122,7 @@ HRESULT InterfaceOleWrapper_Impl::InvokeGeneral( DISPID dispidMember, unsigned s
sal_Bool bStruct= sal_False;
- Reference<XIdlReflection> xRefl = theCoreReflection::get(comphelper::ComponentContext(m_smgr).getUNOContext());
+ Reference<XIdlReflection> xRefl = theCoreReflection::get(comphelper::getComponentContext(m_smgr));
// the first parameter is in DISPPARAMS rgvargs contains the name of the struct.
CComVariant arg;
if( pdispparams->cArgs == 1 && SUCCEEDED( arg.ChangeType( VT_BSTR, &pdispparams->rgvarg[0])) )
diff --git a/extensions/source/plugin/base/xplugin.cxx b/extensions/source/plugin/base/xplugin.cxx
index 9192f2f67252..6ad9b2cb3784 100644
--- a/extensions/source/plugin/base/xplugin.cxx
+++ b/extensions/source/plugin/base/xplugin.cxx
@@ -43,7 +43,6 @@
#include <com/sun/star/loader/XImplementationLoader.hpp>
#include <com/sun/star/plugin/PluginManager.hpp>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <plugin/impl.hxx>
#include <tools/fsys.hxx>
@@ -895,7 +894,7 @@ void XPlugin_Impl::setPosSize( sal_Int32 nX_, sal_Int32 nY_, sal_Int32 nWidth_,
PluginDescription XPlugin_Impl::fitDescription( const OUString& rURL )
{
- uno::Reference< XPluginManager > xPMgr( plugin::PluginManager::create(comphelper::ComponentContext(m_xSMgr).getUNOContext()) );
+ uno::Reference< XPluginManager > xPMgr( plugin::PluginManager::create(comphelper::getComponentContext(m_xSMgr)) );
Sequence< PluginDescription > aDescrs = xPMgr->getPluginDescriptions();
const PluginDescription* pDescrs = aDescrs.getConstArray();
diff --git a/extensions/source/propctrlr/unourl.cxx b/extensions/source/propctrlr/unourl.cxx
index b0c02f7861c4..0ab9711d5924 100644
--- a/extensions/source/propctrlr/unourl.cxx
+++ b/extensions/source/propctrlr/unourl.cxx
@@ -29,7 +29,7 @@
#include "unourl.hxx"
#include <com/sun/star/util/URLTransformer.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
//........................................................................
namespace pcr
@@ -53,7 +53,7 @@ namespace pcr
{
if ( _rxORB.is() )
{
- xTransform.set( URLTransformer::create(comphelper::ComponentContext(_rxORB).getUNOContext()) );
+ xTransform.set( URLTransformer::create(comphelper::getComponentContext(_rxORB)) );
OSL_ENSURE( xTransform.is(), "UnoURL::UnoURL: could not create an URL transformer!" );
if ( xTransform.is() )
xTransform->parseStrict( m_aURL );
diff --git a/extensions/test/ole/cpnt/cpnt.cxx b/extensions/test/ole/cpnt/cpnt.cxx
index 0f9448815f95..a47f18eebe56 100644
--- a/extensions/test/ole/cpnt/cpnt.cxx
+++ b/extensions/test/ole/cpnt/cpnt.cxx
@@ -33,7 +33,7 @@
#include <com/sun/star/registry/XRegistryKey.hpp>
#include <osl/diagnose.h>
#include <uno/environment.h>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/factory.hxx>
// OPTIONAL is a constant in com.sun.star.beans.PropertyAttributes but it must be
// undef'd in some header files
@@ -1493,7 +1493,7 @@ void SAL_CALL OComponent::testInterface( const Reference< XCallback >& xCallbac
}
case 101:
{
- Reference<XIdlReflection> xRefl( theCoreReflection::get(comphelper::ComponentContext(m_rFactory).getUNOContext()) );
+ Reference<XIdlReflection> xRefl( theCoreReflection::get(comphelper::getComponentContext(m_rFactory)) );
Reference<XIdlClass> xClass= xRefl->forName(L"oletest.SimpleStruct");
Any any;
if( xClass.is())
diff --git a/filter/source/config/cache/typedetection.cxx b/filter/source/config/cache/typedetection.cxx
index 51badc95ab7d..5f3251985eee 100644
--- a/filter/source/config/cache/typedetection.cxx
+++ b/filter/source/config/cache/typedetection.cxx
@@ -41,7 +41,7 @@
#include <framework/interaction.hxx>
#include <tools/urlobj.hxx>
#include <unotools/localfilehelper.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
namespace filter{
@@ -75,7 +75,7 @@ TypeDetection::~TypeDetection()
css::util::URL aURL;
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(aURL);
// set std types as minimum requirement first!
@@ -259,7 +259,7 @@ struct EqualByName : public std::binary_function<FlatDetectionInfo, FlatDetectio
css::util::URL aURL;
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(aURL);
rtl::OUString aSelectedFilter = stlDescriptor.getUnpackedValueOrDefault(
diff --git a/filter/source/graphicfilter/icgm/actimpr.cxx b/filter/source/graphicfilter/icgm/actimpr.cxx
index 7d541272bbed..bde6c5e33d21 100644
--- a/filter/source/graphicfilter/icgm/actimpr.cxx
+++ b/filter/source/graphicfilter/icgm/actimpr.cxx
@@ -48,7 +48,6 @@
#include <com/sun/star/text/XTextRange.hpp>
#include <com/sun/star/style/HorizontalAlignment.hpp>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <toolkit/helper/vclunohelper.hxx>
@@ -451,7 +450,7 @@ void CGMImpressOutAct::EndGroup()
if( aAny >>= aXShapeGrouper )
{
uno::Reference< drawing::XShapes > aXShapes(
- drawing::ShapeCollection::create(comphelper::ComponentContext(maXServiceManagerSC).getUNOContext()) );
+ drawing::ShapeCollection::create(comphelper::getComponentContext(maXServiceManagerSC)) );
for ( sal_uInt32 i = mnFirstIndex; i < mnCurrentCount; i++ )
{
uno::Reference< drawing::XShape > aXShape = *(uno::Reference< drawing::XShape > *)maXShapes->getByIndex( i ).getValue();
diff --git a/filter/source/svg/svgreader.cxx b/filter/source/svg/svgreader.cxx
index 21d55ef2b81d..147f3f3b71c9 100644
--- a/filter/source/svg/svgreader.cxx
+++ b/filter/source/svg/svgreader.cxx
@@ -49,7 +49,6 @@
#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
#include <com/sun/star/xml/dom/NodeType.hpp>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <basegfx/polygon/b2dpolygoncutandtouch.hxx>
#include <basegfx/polygon/b2dpolypolygoncutter.hxx>
@@ -1904,7 +1903,7 @@ SVGReader::SVGReader(const uno::Reference<lang::XMultiServiceFactory>& xServ
sal_Bool SVGReader::parseAndConvert()
{
- uno::Reference<xml::dom::XDocumentBuilder> xDomBuilder(xml::dom::DocumentBuilder::create(comphelper::ComponentContext(m_xServiceFactory).getUNOContext()));
+ uno::Reference<xml::dom::XDocumentBuilder> xDomBuilder(xml::dom::DocumentBuilder::create(comphelper::getComponentContext(m_xServiceFactory)));
uno::Reference<xml::dom::XDocument> xDom(
xDomBuilder->parse(m_xInputStream),
diff --git a/filter/source/xsltfilter/OleHandler.cxx b/filter/source/xsltfilter/OleHandler.cxx
index 715058ca507e..e76b57efb9de 100644
--- a/filter/source/xsltfilter/OleHandler.cxx
+++ b/filter/source/xsltfilter/OleHandler.cxx
@@ -48,8 +48,8 @@
#include <package/Inflater.hxx>
#include <package/Deflater.hxx>
-#include <comphelper/componentcontext.hxx>
#include <cppuhelper/factory.hxx>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/servicefactory.hxx>
#include <com/sun/star/uno/Any.hxx>
#include <com/sun/star/uno/XInterface.hpp>
@@ -73,7 +73,7 @@ namespace XSLT
{
Reference<XStream> SAL_CALL OleHandler::createTempFile() {
Reference<XStream> tempFile(
- TempFile::create(comphelper::ComponentContext(m_msf).getUNOContext()),
+ TempFile::create(comphelper::getComponentContext(m_msf)),
UNO_QUERY);
OSL_ASSERT(tempFile.is());
return tempFile;
diff --git a/filter/source/xsltfilter/XSLTFilter.cxx b/filter/source/xsltfilter/XSLTFilter.cxx
index 4ebabc7846c4..a5b28d571c9b 100644
--- a/filter/source/xsltfilter/XSLTFilter.cxx
+++ b/filter/source/xsltfilter/XSLTFilter.cxx
@@ -41,8 +41,8 @@
#include <rtl/strbuf.hxx>
#include <tools/urlobj.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/interaction.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/lang/XComponent.hpp>
#include <com/sun/star/lang/EventObject.hpp>
@@ -247,7 +247,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
XSLTFilter::rel2abs(const OUString& s)
{
- css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::ComponentContext(m_rServiceFactory).getUNOContext() );
+ css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::getComponentContext(m_rServiceFactory) );
css::uno::Reference<XStringSubstitution>
subs(css::util::PathSubstitution::create(xContext));
OUString aWorkingDir(subs->getSubstituteVariableValue(OUString( "$(progurl)")));
@@ -344,7 +344,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
// create pipe
css::uno::Reference<XOutputStream> pipeout(
- Pipe::create(comphelper::ComponentContext(m_rServiceFactory).getUNOContext()),
+ Pipe::create(comphelper::getComponentContext(m_rServiceFactory)),
UNO_QUERY);
css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY);
@@ -497,7 +497,7 @@ m_rServiceFactory(r), m_bTerminated(sal_False), m_bError(sal_False)
// create pipe
css::uno::Reference<XOutputStream> pipeout(
- Pipe::create(comphelper::ComponentContext(m_rServiceFactory).getUNOContext()),
+ Pipe::create(comphelper::getComponentContext(m_rServiceFactory)),
UNO_QUERY);
css::uno::Reference<XInputStream> pipein(pipeout, UNO_QUERY);
diff --git a/forms/source/component/DatabaseForm.cxx b/forms/source/component/DatabaseForm.cxx
index d3dd3385fd56..d73487cd883d 100644
--- a/forms/source/component/DatabaseForm.cxx
+++ b/forms/source/component/DatabaseForm.cxx
@@ -64,11 +64,11 @@
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/util/XModifiable2.hpp>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/basicio.hxx>
#include <comphelper/container.hxx>
#include <comphelper/enumhelper.hxx>
#include <comphelper/extract.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/seqstream.hxx>
#include <comphelper/sequence.hxx>
#include <comphelper/stl_types.hxx>
@@ -2241,7 +2241,7 @@ void ODatabaseForm::submit_impl(const Reference<XControl>& Control, const ::com:
if (!xFrame.is())
return;
- Reference<XURLTransformer> xTransformer(URLTransformer::create(comphelper::ComponentContext(m_xServiceFactory).getUNOContext()));
+ Reference<XURLTransformer> xTransformer(URLTransformer::create(comphelper::getComponentContext(m_xServiceFactory)));
// URL encoding
if( eSubmitEncoding == FormSubmitEncoding_URL )
diff --git a/forms/source/helper/urltransformer.cxx b/forms/source/helper/urltransformer.cxx
index 28aea0b33b5e..11776a9b80a8 100644
--- a/forms/source/helper/urltransformer.cxx
+++ b/forms/source/helper/urltransformer.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <tools/debug.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
//........................................................................
namespace frm
@@ -60,7 +60,7 @@ namespace frm
{
if ( m_xORB.is() )
{
- m_xTransformer.set(URLTransformer::create(comphelper::ComponentContext(m_xORB).getUNOContext()));
+ m_xTransformer.set(URLTransformer::create(comphelper::getComponentContext(m_xORB)));
}
m_bTriedToCreateTransformer = true;
diff --git a/forms/source/solar/component/navbarcontrol.cxx b/forms/source/solar/component/navbarcontrol.cxx
index b2ad7ff45c45..b675d01ee848 100644
--- a/forms/source/solar/component/navbarcontrol.cxx
+++ b/forms/source/solar/component/navbarcontrol.cxx
@@ -42,7 +42,7 @@
#include <com/sun/star/awt/XControlModel.hpp>
#include <com/sun/star/graphic/XGraphic.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
#include <vcl/svapp.hxx>
@@ -285,7 +285,7 @@ namespace frm
_pParentWindow,
lcl_getWinBits_nothrow( _rxModel ),
createDocumentCommandImageProvider( _rxORB, xContextDocument ),
- createDocumentCommandDescriptionProvider( comphelper::ComponentContext(_rxORB).getUNOContext(), xContextDocument )
+ createDocumentCommandDescriptionProvider( comphelper::getComponentContext(_rxORB), xContextDocument )
);
// some knittings
diff --git a/forms/source/xforms/submission.cxx b/forms/source/xforms/submission.cxx
index 82a239869cea..e5d740126793 100644
--- a/forms/source/xforms/submission.cxx
+++ b/forms/source/xforms/submission.cxx
@@ -58,7 +58,6 @@
#include <com/sun/star/xforms/InvalidDataOnSubmitException.hpp>
#include <com/sun/star/frame/XFrame.hpp>
#include <cppuhelper/typeprovider.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/propertysetinfo.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/processfactory.hxx>
@@ -663,7 +662,7 @@ Reference< XDocument > Submission::getInstanceDocument(const Reference< XXPathOb
Reference< XDocumentFragment > Submission::createSubmissionDocument(const Reference< XXPathObject >& aObj, sal_Bool bRemoveWSNodes)
{
using namespace com::sun::star::xml::xpath;
- Reference< XDocumentBuilder > aDocBuilder(DocumentBuilder::create(comphelper::ComponentContext(m_aFactory).getUNOContext()));
+ Reference< XDocumentBuilder > aDocBuilder(DocumentBuilder::create(comphelper::getComponentContext(m_aFactory)));
Reference< XDocument > aDocument = aDocBuilder->newDocument();
Reference< XDocumentFragment > aFragment = aDocument->createDocumentFragment();
diff --git a/forms/source/xforms/submission/submission_get.cxx b/forms/source/xforms/submission/submission_get.cxx
index e7934a1bb594..9ae7b6803cc9 100644
--- a/forms/source/xforms/submission/submission_get.cxx
+++ b/forms/source/xforms/submission/submission_get.cxx
@@ -36,7 +36,7 @@
#include <rtl/strbuf.hxx>
#include <rtl/string.hxx>
#include <osl/file.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/content.hxx>
#include <com/sun/star/io/Pipe.hpp>
@@ -98,8 +98,8 @@ CSubmission::SubmissionResult CSubmissionGet::submit(const CSS::uno::Reference<
aUTF8QueryURL.append(aQueryString.makeStringAndClear());
}
OUString aQueryURL = OStringToOUString(aUTF8QueryURL.makeStringAndClear(), RTL_TEXTENCODING_UTF8);
- ucbhelper::Content aContent(aQueryURL, aEnvironment, comphelper::ComponentContext(m_aFactory).getUNOContext());
- CSS::uno::Reference< XOutputStream > aPipe( CSS::io::Pipe::create(comphelper::ComponentContext(m_aFactory).getUNOContext()), UNO_QUERY_THROW );
+ ucbhelper::Content aContent(aQueryURL, aEnvironment, comphelper::getComponentContext(m_aFactory));
+ CSS::uno::Reference< XOutputStream > aPipe( CSS::io::Pipe::create(comphelper::getComponentContext(m_aFactory)), UNO_QUERY_THROW );
aContent.openStream(aPipe);
// get reply
try {
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) );
diff --git a/i18npool/source/characterclassification/cclass_unicode_parser.cxx b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
index f538933c6207..24ec060fc613 100644
--- a/i18npool/source/characterclassification/cclass_unicode_parser.cxx
+++ b/i18npool/source/characterclassification/cclass_unicode_parser.cxx
@@ -27,7 +27,7 @@
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <com/sun/star/i18n/LocaleData.hpp>
#include <com/sun/star/i18n/NativeNumberMode.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <string.h> // memcpy()
@@ -401,7 +401,7 @@ sal_Bool cclass_Unicode::setupInternational( const Locale& rLocale )
}
if ( !mxLocaleData.is() )
{
- mxLocaleData.set( LocaleData::create(comphelper::ComponentContext(xMSF).getUNOContext()) );
+ mxLocaleData.set( LocaleData::create(comphelper::getComponentContext(xMSF)) );
}
return bChanged;
}
diff --git a/i18npool/source/collator/collatorImpl.cxx b/i18npool/source/collator/collatorImpl.cxx
index 12a3cc62cbaa..d2a85d2c72a3 100644
--- a/i18npool/source/collator/collatorImpl.cxx
+++ b/i18npool/source/collator/collatorImpl.cxx
@@ -22,7 +22,7 @@
#include <com/sun/star/i18n/CollatorOptions.hpp>
#include <com/sun/star/i18n/LocaleData.hpp>
#include <rtl/ustrbuf.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
using namespace com::sun::star;
using namespace com::sun::star::lang;
@@ -35,7 +35,7 @@ namespace com { namespace sun { namespace star { namespace i18n {
CollatorImpl::CollatorImpl( const Reference < XMultiServiceFactory >& rxMSF ) : xMSF(rxMSF)
{
- mxLocaleData.set(LocaleData::create(comphelper::ComponentContext(xMSF).getUNOContext()));
+ mxLocaleData.set(LocaleData::create(comphelper::getComponentContext(xMSF)));
cachedItem = NULL;
}
diff --git a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
index dc2e6089d77f..4cb947c20a53 100644
--- a/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
+++ b/i18npool/source/defaultnumberingprovider/defaultnumberingprovider.cxx
@@ -25,7 +25,7 @@
#include <nativenumbersupplier.hxx>
#include <stdio.h>
#include <string.h>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
// Cyrillic upper case
#define C_CYR_A "\xD0\x90"
@@ -272,7 +272,7 @@ DefaultNumberingProvider::~DefaultNumberingProvider()
void DefaultNumberingProvider::impl_loadTranslit()
{
if ( !translit )
- translit = new TransliterationImpl(comphelper::ComponentContext(xSMgr).getUNOContext());
+ translit = new TransliterationImpl(comphelper::getComponentContext(xSMgr));
}
Sequence< Reference<container::XIndexAccess> >
diff --git a/i18npool/source/registerservices/registerservices.cxx b/i18npool/source/registerservices/registerservices.cxx
index 3eba12e2cc3c..6345b916690a 100644
--- a/i18npool/source/registerservices/registerservices.cxx
+++ b/i18npool/source/registerservices/registerservices.cxx
@@ -21,7 +21,7 @@
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/registry/XRegistryKey.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/factory.hxx>
#include <cppuhelper/weak.hxx>
#include <osl/mutex.hxx>
@@ -110,7 +110,7 @@
{ \
return ::com::sun::star::uno::Reference < \
::com::sun::star::uno::XInterface >( ( ::cppu::OWeakObject* ) \
- new ImplName( comphelper::ComponentContext(rxMSF).getUNOContext() ) ); \
+ new ImplName( comphelper::getComponentContext(rxMSF) ) ); \
}
typedef ::com::sun::star::uno::Reference<
diff --git a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
index 548a32b2a003..521f60ab43e4 100644
--- a/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
+++ b/lotuswordpro/source/filter/LotusWordProImportFilter.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/io/XInputStream.hpp>
#include <com/sun/star/uno/Reference.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <xmloff/attrlist.hxx>
#include <ucbhelper/content.hxx>
@@ -323,7 +323,7 @@ OUString SAL_CALL LotusWordProImportFilter::detect( com::sun::star::uno::Sequenc
{
try
{
- ::ucbhelper::Content aContent(sURL, xEnv, comphelper::ComponentContext(mxMSF).getUNOContext());
+ ::ucbhelper::Content aContent(sURL, xEnv, comphelper::getComponentContext(mxMSF));
xInputStream = aContent.openStream();
}
catch ( Exception& )
diff --git a/oox/source/ole/olehelper.cxx b/oox/source/ole/olehelper.cxx
index b6d9376128ca..43079819f172 100644
--- a/oox/source/ole/olehelper.cxx
+++ b/oox/source/ole/olehelper.cxx
@@ -40,7 +40,6 @@
#include <tools/globname.hxx>
#include <unotools/streamwrap.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/componentcontext.hxx>
namespace oox {
namespace ole {
@@ -354,15 +353,6 @@ lcl_getFrame( const Reference< ::com::sun::star::frame::XModel >& rxModel )
return xFrame;
}
-Reference< XComponentContext >
-lcl_getUnoCtx()
-{
- comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() );
- return aCtx.getUNOContext();
-}
-
-
-
class OleFormCtrlExportHelper
{
::oox::ole::EmbeddedControl maControl;
@@ -476,7 +466,7 @@ void OleFormCtrlExportHelper::exportControl( const Reference< XOutputStream >& r
}
}
-MSConvertOCXControls::MSConvertOCXControls( const Reference< ::com::sun::star::frame::XModel >& rxModel ) : SvxMSConvertOCXControls( rxModel ), mxCtx( lcl_getUnoCtx() ), maGrfHelper( mxCtx, lcl_getFrame( rxModel ), StorageRef() )
+MSConvertOCXControls::MSConvertOCXControls( const Reference< ::com::sun::star::frame::XModel >& rxModel ) : SvxMSConvertOCXControls( rxModel ), mxCtx( comphelper::getProcessComponentContext() ), maGrfHelper( mxCtx, lcl_getFrame( rxModel ), StorageRef() )
{
}
@@ -589,7 +579,7 @@ sal_Bool MSConvertOCXControls::WriteOCXStream( const Reference< XModel >& rxMode
{
SvGlobalName aName;
- OleFormCtrlExportHelper exportHelper( lcl_getUnoCtx(), rxModel, rxControlModel );
+ OleFormCtrlExportHelper exportHelper( comphelper::getProcessComponentContext(), rxModel, rxControlModel );
if ( !exportHelper.isValid() )
return sal_False;
diff --git a/package/source/xstor/owriteablestream.cxx b/package/source/xstor/owriteablestream.cxx
index ce8b36e2382b..88371544f4b4 100644
--- a/package/source/xstor/owriteablestream.cxx
+++ b/package/source/xstor/owriteablestream.cxx
@@ -237,7 +237,7 @@ const sal_Int32 n_ConstBufferSize = 32000;
::rtl::OUString aTempURL;
uno::Reference < beans::XPropertySet > xTempFile(
- io::TempFile::create(comphelper::ComponentContext(xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(xFactory)),
uno::UNO_QUERY_THROW );
try {
@@ -1511,7 +1511,7 @@ void OWriteStream_Impl::CreateReadonlyCopyBasedOnData( const uno::Reference< io:
uno::Reference < io::XStream > xTempFile;
if ( !xTargetStream.is() )
xTempFile = uno::Reference < io::XStream >(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY );
else
xTempFile = xTargetStream;
diff --git a/package/source/xstor/selfterminatefilestream.cxx b/package/source/xstor/selfterminatefilestream.cxx
index ee726ca691b5..f47e95b5a6f1 100644
--- a/package/source/xstor/selfterminatefilestream.cxx
+++ b/package/source/xstor/selfterminatefilestream.cxx
@@ -21,7 +21,6 @@
#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include "selfterminatefilestream.hxx"
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
using namespace ::com::sun::star;
@@ -38,7 +37,7 @@ OSelfTerminateFileStream::OSelfTerminateFileStream( const uno::Reference< lang::
// otherwise an exception is thrown in constructor
m_xFileAccess.set( ucb::SimpleFileAccess::create(
- comphelper::ComponentContext(xOwnFactory).getUNOContext() ) );
+ comphelper::getComponentContext(xOwnFactory) ) );
m_xInputStream.set( m_xFileAccess->openFileRead( aURL ), uno::UNO_SET_THROW );
m_xSeekable.set( m_xInputStream, uno::UNO_QUERY_THROW );
diff --git a/package/source/xstor/switchpersistencestream.cxx b/package/source/xstor/switchpersistencestream.cxx
index 359a65a0ac40..16581fa73ecf 100644
--- a/package/source/xstor/switchpersistencestream.cxx
+++ b/package/source/xstor/switchpersistencestream.cxx
@@ -20,7 +20,7 @@
#include <osl/diagnose.h>
#include <com/sun/star/io/TempFile.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include <switchpersistencestream.hxx>
@@ -176,7 +176,7 @@ void SwitchablePersistenceStream::CopyAndSwitchPersistenceTo( const uno::Referen
if ( !xTargetStream.is() )
{
xTargetStream = uno::Reference < io::XStream >(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
xTargetSeek = uno::Reference< io::XSeekable >( xTargetStream, uno::UNO_QUERY_THROW );
diff --git a/package/source/xstor/xfactory.cxx b/package/source/xstor/xfactory.cxx
index 302334646d25..2faad113d31d 100644
--- a/package/source/xstor/xfactory.cxx
+++ b/package/source/xstor/xfactory.cxx
@@ -25,7 +25,7 @@
#include <com/sun/star/io/TempFile.hpp>
#include <com/sun/star/io/XSeekable.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
#include "xfactory.hxx"
@@ -85,7 +85,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstance()
{
// TODO: reimplement TempStream service to support XStream interface
uno::Reference < io::XStream > xTempStream(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
return uno::Reference< uno::XInterface >(
@@ -155,7 +155,7 @@ uno::Reference< uno::XInterface > SAL_CALL OStorageFactory::createInstanceWithAr
uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess(
ucb::SimpleFileAccess::create(
- comphelper::ComponentContext(m_xFactory).getUNOContext() ) );
+ comphelper::getComponentContext(m_xFactory) ) );
if ( nStorageMode & embed::ElementModes::WRITE )
xStream = xTempAccess->openFileReadWrite( aURL );
diff --git a/package/source/xstor/xstorage.cxx b/package/source/xstor/xstorage.cxx
index 9900cbc4dcad..3908e8acaf3d 100644
--- a/package/source/xstor/xstorage.cxx
+++ b/package/source/xstor/xstorage.cxx
@@ -145,7 +145,7 @@ uno::Reference< io::XInputStream > GetSeekableTempCopy( uno::Reference< io::XInp
uno::Reference< lang::XMultiServiceFactory > xFactory )
{
uno::Reference < io::XOutputStream > xTempOut(
- io::TempFile::create(comphelper::ComponentContext(xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(xFactory)),
uno::UNO_QUERY );
uno::Reference < io::XInputStream > xTempIn( xTempOut, uno::UNO_QUERY );
@@ -3801,7 +3801,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getPlainRawStreamElement(
throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
uno::Reference < io::XOutputStream > xTempOut(
- io::TempFile::create(comphelper::ComponentContext(m_pImpl->GetServiceFactory()).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_pImpl->GetServiceFactory())),
uno::UNO_QUERY );
xTempIn = uno::Reference < io::XInputStream >( xTempOut, uno::UNO_QUERY );
uno::Reference < io::XSeekable > xSeek( xTempOut, uno::UNO_QUERY );
@@ -3913,7 +3913,7 @@ uno::Reference< io::XInputStream > SAL_CALL OStorage::getRawEncrStreamElement(
throw io::IOException( ::rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( OSL_LOG_PREFIX ) ), uno::Reference< uno::XInterface >() );
uno::Reference < io::XOutputStream > xTempOut(
- io::TempFile::create(comphelper::ComponentContext(m_pImpl->GetServiceFactory()).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_pImpl->GetServiceFactory())),
uno::UNO_QUERY );
xTempIn = uno::Reference < io::XInputStream >( xTempOut, uno::UNO_QUERY );
uno::Reference < io::XSeekable > xSeek( xTempOut, uno::UNO_QUERY );
@@ -5948,7 +5948,7 @@ void SAL_CALL OStorage::attachToURL( const ::rtl::OUString& sURL,
uno::Reference < ucb::XSimpleFileAccess2 > xAccess(
ucb::SimpleFileAccess::create(
- comphelper::ComponentContext(m_pImpl->m_xFactory).getUNOContext() ) );
+ comphelper::getComponentContext(m_pImpl->m_xFactory) ) );
try
{
diff --git a/package/source/zippackage/ZipPackage.cxx b/package/source/zippackage/ZipPackage.cxx
index a9c4ba0db6fd..5e2b2cf2bc47 100644
--- a/package/source/zippackage/ZipPackage.cxx
+++ b/package/source/zippackage/ZipPackage.cxx
@@ -73,7 +73,7 @@
#include <vector>
#include <ucbhelper/fileidentifierconverter.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/seekableinput.hxx>
#include <comphelper/storagehelper.hxx>
#include <comphelper/ofopxmlhelper.hxx>
@@ -177,7 +177,7 @@ sal_Bool ZipPackage::isLocalFile() const
OUString aSystemPath;
uno::Reference< XUniversalContentBroker > xUcb(
UniversalContentBroker::create(
- comphelper::ComponentContext( m_xFactory ).getUNOContext() ) );
+ comphelper::getComponentContext( m_xFactory ) ) );
try
{
aSystemPath = getSystemPathFromFileURL( xUcb, m_aURL );
@@ -633,7 +633,7 @@ void SAL_CALL ZipPackage::initialize( const uno::Sequence< Any >& aArguments )
Content aContent(
m_aURL, uno::Reference< XCommandEnvironment >(),
- comphelper::ComponentContext( m_xFactory ).getUNOContext() );
+ comphelper::getComponentContext( m_xFactory ) );
Any aAny = aContent.getPropertyValue("Size");
sal_uInt64 aSize = 0;
// kind of optimisation: treat empty files as nonexistent files
@@ -1165,7 +1165,7 @@ uno::Reference< io::XInputStream > ZipPackage::writeTempFile()
if( bUseTemp )
{
// create temporary file
- uno::Reference < io::XStream > xTempFile( io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()), UNO_QUERY_THROW );
+ uno::Reference < io::XStream > xTempFile( io::TempFile::create(comphelper::getComponentContext(m_xFactory)), UNO_QUERY_THROW );
xTempOut.set( xTempFile->getOutputStream(), UNO_SET_THROW );
xTempIn.set( xTempFile->getInputStream(), UNO_SET_THROW );
}
@@ -1320,7 +1320,7 @@ uno::Reference< XActiveDataStreamer > ZipPackage::openOriginalForOutput()
// open and truncate the original file
Content aOriginalContent(
m_aURL, uno::Reference< XCommandEnvironment >(),
- comphelper::ComponentContext( m_xFactory ).getUNOContext() );
+ comphelper::getComponentContext( m_xFactory ) );
uno::Reference< XActiveDataStreamer > xSink = new ActiveDataStreamer;
if ( m_eMode == e_IMode_URL )
@@ -1455,7 +1455,7 @@ void SAL_CALL ZipPackage::commitChanges()
{
// write directly in case of local file
uno::Reference< ::com::sun::star::ucb::XSimpleFileAccess2 > xSimpleAccess(
- SimpleFileAccess::create( comphelper::ComponentContext(m_xFactory).getUNOContext() ) );
+ SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) );
OSL_ENSURE( xSimpleAccess.is(), "Can't instatiate SimpleFileAccess service!\n" );
uno::Reference< io::XTruncate > xOrigTruncate;
if ( xSimpleAccess.is() )
@@ -1503,7 +1503,7 @@ void SAL_CALL ZipPackage::commitChanges()
OUString sTargetFolder = m_aURL.copy ( 0, m_aURL.lastIndexOf ( static_cast < sal_Unicode > ( '/' ) ) );
Content aContent(
sTargetFolder, uno::Reference< XCommandEnvironment >(),
- comphelper::ComponentContext( m_xFactory ).getUNOContext() );
+ comphelper::getComponentContext( m_xFactory ) );
OUString sTempURL;
Any aAny = xPropSet->getPropertyValue ("Uri");
diff --git a/package/source/zippackage/ZipPackageStream.cxx b/package/source/zippackage/ZipPackageStream.cxx
index 5c7feb7645ca..fa8b17dbdb73 100644
--- a/package/source/zippackage/ZipPackageStream.cxx
+++ b/package/source/zippackage/ZipPackageStream.cxx
@@ -38,7 +38,7 @@
#include <osl/diagnose.h>
#include "wrapstreamforshare.hxx"
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/seekableinput.hxx>
#include <comphelper/storagehelper.hxx>
@@ -177,7 +177,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::GetRawEncrStreamNoHeaderCop
// create temporary stream
uno::Reference < io::XOutputStream > xTempOut(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference < io::XInputStream > xTempIn( xTempOut, UNO_QUERY_THROW );
uno::Reference < io::XSeekable > xTempSeek( xTempOut, UNO_QUERY_THROW );
@@ -282,7 +282,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
{
// create temporary file
uno::Reference < io::XStream > xTempStream(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
// create a package based on it
@@ -339,7 +339,7 @@ uno::Reference< io::XInputStream > ZipPackageStream::TryToGetRawFromDataStream(
// create another temporary file
uno::Reference < io::XOutputStream > xTempOut(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference < io::XInputStream > xTempIn( xTempOut, UNO_QUERY_THROW );
uno::Reference < io::XSeekable > xTempSeek( xTempOut, UNO_QUERY_THROW );
diff --git a/package/source/zippackage/zipfileaccess.cxx b/package/source/zippackage/zipfileaccess.cxx
index 64f244c9d69c..0ee088f6ffda 100644
--- a/package/source/zippackage/zipfileaccess.cxx
+++ b/package/source/zippackage/zipfileaccess.cxx
@@ -23,7 +23,7 @@
#include <com/sun/star/io/XActiveDataSink.hpp>
#include <com/sun/star/io/XStream.hpp>
#include <com/sun/star/io/XSeekable.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <zipfileaccess.hxx>
#include <ZipEnumeration.hxx>
#include <ZipPackageSink.hxx>
@@ -188,7 +188,7 @@ void SAL_CALL OZipFileAccess::initialize( const uno::Sequence< uno::Any >& aArgu
::ucbhelper::Content aContent(
aParamURL,
uno::Reference< ::com::sun::star::ucb::XCommandEnvironment >(),
- comphelper::ComponentContext( m_xFactory ).getUNOContext() );
+ comphelper::getComponentContext( m_xFactory ) );
uno::Reference < io::XActiveDataSink > xSink = new ZipPackageSink;
if ( aContent.openStream ( xSink ) )
{
diff --git a/reportdesign/source/ui/report/ReportController.cxx b/reportdesign/source/ui/report/ReportController.cxx
index ad1074589e46..e1f076fa974f 100644
--- a/reportdesign/source/ui/report/ReportController.cxx
+++ b/reportdesign/source/ui/report/ReportController.cxx
@@ -57,9 +57,9 @@
#include "rptui_slotid.hrc"
#include "reportformula.hxx"
-#include <comphelper/componentcontext.hxx>
#include <comphelper/documentconstants.hxx>
#include <comphelper/mediadescriptor.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/property.hxx>
#include <comphelper/sequenceashashmap.hxx>
#include <comphelper/types.hxx>
@@ -1701,7 +1701,7 @@ void OReportController::impl_initialize( )
listen(true);
setEditable( !m_aReportModel->IsReadOnly() );
- m_xFormatter.set(util::NumberFormatter::create(comphelper::ComponentContext(getORB()).getUNOContext()), UNO_QUERY_THROW);
+ m_xFormatter.set(util::NumberFormatter::create(comphelper::getComponentContext(getORB())), UNO_QUERY_THROW);
m_xFormatter->attachNumberFormatsSupplier(Reference< XNumberFormatsSupplier>(m_xReportDefinition,uno::UNO_QUERY));
::comphelper::MediaDescriptor aDescriptor( m_xReportDefinition->getArgs() );
diff --git a/sc/source/filter/excel/excimp8.cxx b/sc/source/filter/excel/excimp8.cxx
index 3dbc3cf5aede..3ea56ebae788 100644
--- a/sc/source/filter/excel/excimp8.cxx
+++ b/sc/source/filter/excel/excimp8.cxx
@@ -113,7 +113,7 @@
#include <oox/ole/vbaproject.hxx>
#include <oox/ole/olestorage.hxx>
#include <unotools/streamwrap.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
using namespace com::sun::star;
using namespace ::comphelper;
@@ -356,14 +356,14 @@ void ImportExcel8::ReadBasic( void )
}
try
{
- ::comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() );
+ uno::Reference< uno::XComponentContext > aCtx( ::comphelper::getProcessComponentContext() );
SfxMedium& rMedium = GetMedium();
uno::Reference< io::XInputStream > xIn = rMedium.GetInputStream();
- oox::ole::OleStorage root( aCtx.getUNOContext(), xIn, false );
+ oox::ole::OleStorage root( aCtx, xIn, false );
oox::StorageRef vbaStg = root.openSubStorage( CREATE_OUSTRING( "_VBA_PROJECT_CUR" ), false );
if ( vbaStg.get() )
{
- oox::ole::VbaProject aVbaPrj( aCtx.getUNOContext(), pShell->GetModel(), CREATE_OUSTRING( "Calc") );
+ oox::ole::VbaProject aVbaPrj( aCtx, pShell->GetModel(), CREATE_OUSTRING( "Calc") );
// collect names of embedded form controls, as specified in the VBA project
uno::Reference< container::XNameContainer > xOleNameOverrideSink( new OleNameOverrideContainer );
aVbaPrj.setOleOverridesSink( xOleNameOverrideSink );
diff --git a/sc/source/filter/excel/xiescher.cxx b/sc/source/filter/excel/xiescher.cxx
index 900d2e6f86d2..37077e36b5ab 100644
--- a/sc/source/filter/excel/xiescher.cxx
+++ b/sc/source/filter/excel/xiescher.cxx
@@ -113,8 +113,6 @@
#include "namebuff.hxx"
#include <boost/shared_ptr.hpp>
-#include <comphelper/componentcontext.hxx>
-#include <comphelper/processfactory.hxx>
#include <comphelper/mediadescriptor.hxx>
#include <sfx2/docfile.hxx>
@@ -3160,14 +3158,6 @@ bool XclImpSimpleDffConverter::GetColorFromPalette( sal_uInt16 nIndex, Color& rC
return 1;
}
-// ----------------------------------------------------------------------------
-Reference< XComponentContext >
-lcl_getUnoCtx()
-{
- comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() );
- return aCtx.getUNOContext();
-}
-
XclImpDffConverter::XclImpDffConvData::XclImpDffConvData(
XclImpDrawing& rDrawing, SdrModel& rSdrModel, SdrPage& rSdrPage ) :
mrDrawing( rDrawing ),
diff --git a/sd/source/filter/ppt/pptin.cxx b/sd/source/filter/ppt/pptin.cxx
index b4366325e98d..acda309c46da 100644
--- a/sd/source/filter/ppt/pptin.cxx
+++ b/sd/source/filter/ppt/pptin.cxx
@@ -97,20 +97,11 @@
#include <com/sun/star/document/XDocumentProperties.hpp>
#include <com/sun/star/document/XDocumentPropertiesSupplier.hpp>
-#include <comphelper/processfactory.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/string.hxx>
#include <oox/ole/olehelper.hxx>
using namespace ::com::sun::star;
-uno::Reference< uno::XComponentContext >
-lcl_getUnoCtx()
-{
- comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() );
- return aCtx.getUNOContext();
-}
-
SdPPTImport::SdPPTImport( SdDrawDocument* pDocument, SvStream& rDocStream, SvStorage& rStorage, SfxMedium& rMedium )
{
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;
}
diff --git a/sot/source/unoolestorage/xolesimplestorage.cxx b/sot/source/unoolestorage/xolesimplestorage.cxx
index a1a93ae5f3d5..85ec2b361623 100644
--- a/sot/source/unoolestorage/xolesimplestorage.cxx
+++ b/sot/source/unoolestorage/xolesimplestorage.cxx
@@ -24,8 +24,8 @@
#include <com/sun/star/io/XTruncate.hpp>
#include <com/sun/star/io/TempFile.hpp>
+#include <comphelper/processfactory.hxx>
#include <comphelper/storagehelper.hxx>
-#include <comphelper/componentcontext.hxx>
#include <unotools/ucbstreamhelper.hxx>
@@ -258,7 +258,7 @@ void SAL_CALL OLESimpleStorage::initialize( const uno::Sequence< uno::Any >& aAr
else
{
uno::Reference < io::XStream > xTempFile(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference < io::XSeekable > xTempSeek( xTempFile, uno::UNO_QUERY_THROW );
uno::Reference< io::XOutputStream > xTempOut = xTempFile->getOutputStream();
@@ -443,7 +443,7 @@ uno::Any SAL_CALL OLESimpleStorage::getByName( const ::rtl::OUString& aName )
uno::Any aResult;
uno::Reference< io::XStream > xTempFile(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY );
uno::Reference< io::XSeekable > xSeekable( xTempFile, uno::UNO_QUERY_THROW );
uno::Reference< io::XOutputStream > xOutputStream = xTempFile->getOutputStream();
diff --git a/svl/source/fsstor/fsstorage.cxx b/svl/source/fsstor/fsstorage.cxx
index 00f93802562a..98908c3abf1c 100644
--- a/svl/source/fsstor/fsstorage.cxx
+++ b/svl/source/fsstor/fsstorage.cxx
@@ -46,7 +46,6 @@
#include <comphelper/processfactory.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/storagehelper.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <cppuhelper/exc_hlp.hxx>
@@ -476,7 +475,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::openStreamElement(
{
uno::Reference<ucb::XSimpleFileAccess2> xSimpleFileAccess(
ucb::SimpleFileAccess::create(
- comphelper::ComponentContext(m_pImpl->m_xFactory).getUNOContext() ) );
+ comphelper::getComponentContext(m_pImpl->m_xFactory) ) );
xResult = xSimpleFileAccess->openFileReadWrite( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) );
}
else
@@ -685,7 +684,7 @@ uno::Reference< io::XStream > SAL_CALL FSStorage::cloneStreamElement( const ::rt
uno::Reference< io::XInputStream > xInStream = aResultContent.openStream();
xTempResult = uno::Reference < io::XStream >(
- io::TempFile::create(comphelper::ComponentContext(m_pImpl->m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_pImpl->m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference < io::XOutputStream > xTempOut = xTempResult->getOutputStream();
uno::Reference < io::XInputStream > xTempIn = xTempResult->getInputStream();
@@ -1466,7 +1465,7 @@ uno::Reference< embed::XExtendedStorageStream > SAL_CALL FSStorage::openStreamEl
{
uno::Reference<ucb::XSimpleFileAccess2> xSimpleFileAccess(
ucb::SimpleFileAccess::create(
- comphelper::ComponentContext(m_pImpl->m_xFactory).getUNOContext() ) );
+ comphelper::getComponentContext(m_pImpl->m_xFactory) ) );
uno::Reference< io::XStream > xStream =
xSimpleFileAccess->openFileReadWrite( aFileURL.GetMainURL( INetURLObject::NO_DECODE ) );
diff --git a/svl/source/misc/documentlockfile.cxx b/svl/source/misc/documentlockfile.cxx
index 119ebcdd6a1c..cebc89b26b1c 100644
--- a/svl/source/misc/documentlockfile.cxx
+++ b/svl/source/misc/documentlockfile.cxx
@@ -37,7 +37,6 @@
#include <rtl/ustrbuf.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/componentcontext.hxx>
#include <unotools/bootstrap.hxx>
@@ -93,7 +92,7 @@ sal_Bool DocumentLockFile::CreateOwnLockFile()
try
{
uno::Reference< io::XStream > xTempFile(
- io::TempFile::create(comphelper::ComponentContext(m_xFactory).getUNOContext()),
+ io::TempFile::create(comphelper::getComponentContext(m_xFactory)),
uno::UNO_QUERY_THROW );
uno::Reference< io::XSeekable > xSeekable( xTempFile, uno::UNO_QUERY_THROW );
diff --git a/svtools/source/misc/acceleratorexecute.cxx b/svtools/source/misc/acceleratorexecute.cxx
index 8351bf147454..bbaa4247029c 100644
--- a/svtools/source/misc/acceleratorexecute.cxx
+++ b/svtools/source/misc/acceleratorexecute.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/lang/DisposedException.hpp>
#include <com/sun/star/util/URLTransformer.hpp>
#include <toolkit/helper/vclunohelper.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <vcl/window.hxx>
#include <vcl/svapp.hxx>
@@ -389,7 +389,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
const css::uno::Reference< css::frame::XFrame >& xFrame)
{
css::uno::Reference< css::frame::XModuleManager2 > xModuleDetection(
- css::frame::ModuleManager::create(comphelper::ComponentContext(xSMGR).getUNOContext()));
+ css::frame::ModuleManager::create(comphelper::getComponentContext(xSMGR)));
::rtl::OUString sModule;
try
@@ -402,7 +402,7 @@ css::uno::Reference< css::ui::XAcceleratorConfiguration > AcceleratorExecute::st
{ return css::uno::Reference< css::ui::XAcceleratorConfiguration >(); }
css::uno::Reference< css::ui::XModuleUIConfigurationManagerSupplier > xUISupplier(
- css::ui::ModuleUIConfigurationManagerSupplier::create(comphelper::ComponentContext(xSMGR).getUNOContext()) );
+ css::ui::ModuleUIConfigurationManagerSupplier::create(comphelper::getComponentContext(xSMGR)) );
css::uno::Reference< css::ui::XAcceleratorConfiguration > xAccCfg;
try
@@ -442,7 +442,7 @@ css::uno::Reference< css::util::XURLTransformer > AcceleratorExecute::impl_ts_ge
// <- SAFE ----------------------------------
css::uno::Reference< css::util::XURLTransformer > xParser(
- css::util::URLTransformer::create( ::comphelper::ComponentContext(xSMGR).getUNOContext() ) );
+ css::util::URLTransformer::create( ::comphelper::getComponentContext(xSMGR) ) );
// SAFE -> ----------------------------------
aLock.reset();
diff --git a/svtools/source/misc/imageresourceaccess.cxx b/svtools/source/misc/imageresourceaccess.cxx
index b34eea012426..65494581997e 100644
--- a/svtools/source/misc/imageresourceaccess.cxx
+++ b/svtools/source/misc/imageresourceaccess.cxx
@@ -38,7 +38,7 @@
#include <tools/stream.hxx>
#include <unotools/streamwrap.hxx>
#include <cppuhelper/implbase2.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
//........................................................................
namespace svt
@@ -154,7 +154,7 @@ namespace svt
try
{
// get a GraphicProvider
- Reference< XGraphicProvider > xProvider = ::com::sun::star::graphic::GraphicProvider::create(comphelper::ComponentContext(_rxORB).getUNOContext());
+ Reference< XGraphicProvider > xProvider = ::com::sun::star::graphic::GraphicProvider::create(comphelper::getComponentContext(_rxORB));
// let it create a graphic from the given URL
Sequence< PropertyValue > aMediaProperties( 1 );
diff --git a/svtools/source/uno/framestatuslistener.cxx b/svtools/source/uno/framestatuslistener.cxx
index 909170dd4da5..dfae43732116 100644
--- a/svtools/source/uno/framestatuslistener.cxx
+++ b/svtools/source/uno/framestatuslistener.cxx
@@ -32,7 +32,7 @@
#include <com/sun/star/util/URLTransformer.hpp>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
using namespace ::cppu;
using namespace ::com::sun::star::awt;
@@ -105,7 +105,7 @@ throw (::com::sun::star::uno::RuntimeException)
try
{
Reference< XDispatch > xDispatch( pIter->second );
- Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() ) );
+ Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ) );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = pIter->first;
xURLTransformer->parseStrict( aTargetURL );
@@ -192,7 +192,7 @@ void FrameStatusListener::addStatusListener( const rtl::OUString& aCommandURL )
Reference< XDispatchProvider > xDispatchProvider( m_xFrame, UNO_QUERY );
if ( m_xServiceManager.is() && xDispatchProvider.is() )
{
- Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() ) );
+ Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ) );
aTargetURL.Complete = aCommandURL;
xURLTransformer->parseStrict( aTargetURL );
xDispatch = xDispatchProvider->queryDispatch( aTargetURL, ::rtl::OUString(), 0 );
@@ -250,7 +250,7 @@ void FrameStatusListener::bindListener()
URLToDispatchMap::iterator pIter = m_aListenerMap.begin();
while ( pIter != m_aListenerMap.end() )
{
- Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() ) );
+ Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ) );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = pIter->first;
xURLTransformer->parseStrict( aTargetURL );
@@ -319,7 +319,7 @@ void FrameStatusListener::unbindListener()
URLToDispatchMap::iterator pIter = m_aListenerMap.begin();
while ( pIter != m_aListenerMap.end() )
{
- Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() ) );
+ Reference< XURLTransformer > xURLTransformer( com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ) );
com::sun::star::util::URL aTargetURL;
aTargetURL.Complete = pIter->first;
xURLTransformer->parseStrict( aTargetURL );
diff --git a/svtools/source/uno/generictoolboxcontroller.cxx b/svtools/source/uno/generictoolboxcontroller.cxx
index 91c99a70d3ee..d6a1dae2ca74 100644
--- a/svtools/source/uno/generictoolboxcontroller.cxx
+++ b/svtools/source/uno/generictoolboxcontroller.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/frame/status/ItemStatus.hpp>
#include <com/sun/star/frame/status/ItemState.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <osl/mutex.hxx>
#include <vcl/svapp.hxx>
@@ -108,7 +108,7 @@ throw ( RuntimeException )
m_xServiceManager.is() &&
!m_aCommandURL.isEmpty() )
{
- xURLTransformer = com::sun::star::util::URLTransformer::create( ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() );
+ xURLTransformer = com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) );
aCommandURL = m_aCommandURL;
URLToDispatchMap::iterator pIter = m_aListenerMap.find( m_aCommandURL );
diff --git a/svtools/source/uno/popupmenucontrollerbase.cxx b/svtools/source/uno/popupmenucontrollerbase.cxx
index 7f0c90211993..3b5607b3b4be 100644
--- a/svtools/source/uno/popupmenucontrollerbase.cxx
+++ b/svtools/source/uno/popupmenucontrollerbase.cxx
@@ -41,7 +41,7 @@
#include <rtl/ustrbuf.hxx>
#include <rtl/logfile.hxx>
#include <osl/mutex.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
//_________________________________________________________________________________________________________________
// Defines
@@ -77,7 +77,7 @@ PopupMenuControllerBase::PopupMenuControllerBase( const Reference< XMultiService
m_xServiceManager( xServiceManager )
{
if ( m_xServiceManager.is() )
- m_xURLTransformer.set( util::URLTransformer::create( ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() ) );
+ m_xURLTransformer.set( util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) ) );
}
PopupMenuControllerBase::~PopupMenuControllerBase()
diff --git a/svtools/source/uno/statusbarcontroller.cxx b/svtools/source/uno/statusbarcontroller.cxx
index 55f383e87786..88ca99e49c9c 100644
--- a/svtools/source/uno/statusbarcontroller.cxx
+++ b/svtools/source/uno/statusbarcontroller.cxx
@@ -40,7 +40,7 @@
#include <svtools/imgdef.hxx>
#include <svtools/miscopt.hxx>
#include <toolkit/unohlp.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
using namespace ::cppu;
using namespace ::com::sun::star::awt;
@@ -94,7 +94,7 @@ Reference< XURLTransformer > StatusbarController::getURLTransformer() const
SolarMutexGuard aSolarMutexGuard;
if ( !m_xURLTransformer.is() && m_xServiceManager.is() )
{
- m_xURLTransformer = com::sun::star::util::URLTransformer::create( ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() );
+ m_xURLTransformer = com::sun::star::util::URLTransformer::create( ::comphelper::getComponentContext(m_xServiceManager) );
}
return m_xURLTransformer;
diff --git a/svtools/source/uno/toolboxcontroller.cxx b/svtools/source/uno/toolboxcontroller.cxx
index 10b9e85862a4..a296f6ccea74 100644
--- a/svtools/source/uno/toolboxcontroller.cxx
+++ b/svtools/source/uno/toolboxcontroller.cxx
@@ -40,7 +40,7 @@
#include <svtools/miscopt.hxx>
#include <toolkit/unohlp.hxx>
#include <vcl/toolbox.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
const int TOOLBARCONTROLLER_PROPHANDLE_SUPPORTSVISIBLE = 1;
const char TOOLBARCONTROLLER_PROPNAME_SUPPORTSVISIBLE[] = "SupportsVisible";
@@ -107,7 +107,7 @@ ToolboxController::ToolboxController(
{
m_pImpl->m_xUrlTransformer.set(
::com::sun::star::util::URLTransformer::create(
- ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() ) );
+ ::comphelper::getComponentContext(m_xServiceManager) ) );
}
catch(const Exception&)
{
@@ -245,7 +245,7 @@ throw ( Exception, RuntimeException )
if ( !m_pImpl->m_xUrlTransformer.is() && m_xServiceManager.is() )
m_pImpl->m_xUrlTransformer.set(
::com::sun::star::util::URLTransformer::create(
- ::comphelper::ComponentContext(m_xServiceManager).getUNOContext() ) );
+ ::comphelper::getComponentContext(m_xServiceManager) ) );
}
catch(const Exception&)
{
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx
index f6e7ad5d47b3..4c6cf8413ed8 100644
--- a/svx/source/dialog/docrecovery.cxx
+++ b/svx/source/dialog/docrecovery.cxx
@@ -34,7 +34,6 @@
#include "docrecovery.hxx"
#include "docrecovery.hrc"
-#include <comphelper/componentcontext.hxx>
#include <comphelper/configurationhelper.hxx>
#include <comphelper/processfactory.hxx>
#include <comphelper/sequenceashashmap.hxx>
@@ -584,7 +583,7 @@ void RecoveryCore::impl_startListening()
aURL.Complete = RECOVERY_CMD_DO_EMERGENCY_SAVE;
else
aURL.Complete = RECOVERY_CMD_DO_RECOVERY;
- 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(aURL);
/* Note: addStatusListener() call us synchronous back ... so we
@@ -604,7 +603,7 @@ void RecoveryCore::impl_stopListening()
aURL.Complete = RECOVERY_CMD_DO_EMERGENCY_SAVE;
else
aURL.Complete = RECOVERY_CMD_DO_RECOVERY;
- 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(aURL);
m_xRealCore->removeStatusListener(static_cast< css::frame::XStatusListener* >(this), aURL);
@@ -617,7 +616,7 @@ css::util::URL RecoveryCore::impl_getParsedURL(const ::rtl::OUString& sURL)
css::util::URL aURL;
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(aURL);
return aURL;
diff --git a/svx/source/form/fmpgeimp.cxx b/svx/source/form/fmpgeimp.cxx
index 59affa5eaeea..241a967ab99e 100644
--- a/svx/source/form/fmpgeimp.cxx
+++ b/svx/source/form/fmpgeimp.cxx
@@ -55,7 +55,6 @@
#include <vcl/stdtext.hxx>
#include <svx/dialmgr.hxx>
#include <comphelper/processfactory.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/types.hxx>
#include <unotools/streamwrap.hxx>
@@ -304,8 +303,7 @@ Reference< XMap > FmFormPageImpl::impl_createControlShapeMap_nothrow()
try
{
- ::comphelper::ComponentContext aContext( ::comphelper::getProcessServiceFactory() );
- xMap.set( EnumerableMap::create( aContext.getUNOContext(),
+ xMap.set( EnumerableMap::create( comphelper::getProcessComponentContext(),
::cppu::UnoType< XControlModel >::get(),
::cppu::UnoType< XControlShape >::get()
).get(), UNO_SET_THROW );
diff --git a/svx/source/tbxctrls/tbunosearchcontrollers.cxx b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
index 382e04212bcb..5005d9c40cd7 100644
--- a/svx/source/tbxctrls/tbunosearchcontrollers.cxx
+++ b/svx/source/tbxctrls/tbunosearchcontrollers.cxx
@@ -31,7 +31,7 @@
#include <svx/dialogs.hrc>
#include <svx/dialmgr.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XLayoutManager.hpp>
#include <com/sun/star/text/XTextRange.hpp>
@@ -62,7 +62,7 @@ static const sal_Int32 REMEMBER_SIZE = 10;
void impl_executeSearch( const css::uno::Reference< css::lang::XMultiServiceFactory >& rSMgr, const css::uno::Reference< css::frame::XFrame >& xFrame, const css::uno::Sequence< css::beans::PropertyValue >& lArgs )
{
- css::uno::Reference< css::util::XURLTransformer > xURLTransformer( css::util::URLTransformer::create(::comphelper::ComponentContext(rSMgr).getUNOContext()) );
+ css::uno::Reference< css::util::XURLTransformer > xURLTransformer( css::util::URLTransformer::create(::comphelper::getComponentContext(rSMgr)) );
css::util::URL aURL;
aURL.Complete = rtl::OUString(COMMAND_EXECUTESEARCH);
xURLTransformer->parseStrict(aURL);
diff --git a/sw/source/filter/ww8/wrtw8esh.cxx b/sw/source/filter/ww8/wrtw8esh.cxx
index e1061c087d0f..c71bae931b7d 100644
--- a/sw/source/filter/ww8/wrtw8esh.cxx
+++ b/sw/source/filter/ww8/wrtw8esh.cxx
@@ -53,7 +53,6 @@
#include <svx/svdoole2.hxx>
#include <editeng/editeng.hxx>
#include <editeng/flditem.hxx>
-#include <comphelper/seqstream.hxx>
#include <unotools/ucbstreamhelper.hxx>
#include <svx/fmglob.hxx>
#include <svx/svdouno.hxx>
@@ -97,10 +96,8 @@
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/form/XFormComponent.hpp>
-#include <comphelper/processfactory.hxx>
#include "docsh.hxx"
#include <oox/ole/olehelper.hxx>
-#include <comphelper/componentcontext.hxx>
#include <fstream>
#include <unotools/streamwrap.hxx>
@@ -2773,14 +2770,6 @@ sal_uInt32 SwEscherEx::QueryTextID(
return nId;
}
-uno::Reference< uno::XComponentContext >
-lcl_getUnoCtx()
-{
- comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() );
- return aCtx.getUNOContext();
-}
-
-
SwMSConvertControls::SwMSConvertControls( SfxObjectShell *pDSh,SwPaM *pP ) : oox
::ole::MSConvertOCXControls( pDSh ? pDSh->GetModel() : NULL ), pPaM( pP )
{
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx
index dc89f507a0f6..5fc820f5e37c 100644
--- a/sw/source/filter/ww8/ww8par.cxx
+++ b/sw/source/filter/ww8/ww8par.cxx
@@ -132,8 +132,6 @@ using namespace nsHdFtFlags;
#include <comphelper/mediadescriptor.hxx>
#include <oox/ole/vbaproject.hxx>
#include <oox/ole/olestorage.hxx>
-#include <comphelper/componentcontext.hxx>
-
using ::comphelper::MediaDescriptor;
using ::comphelper::getProcessServiceFactory;
@@ -145,8 +143,7 @@ class BasicProjImportHelper
public:
BasicProjImportHelper( SwDocShell& rShell ) : mrDocShell( rShell )
{
- comphelper::ComponentContext aCtx( ::comphelper::getProcessServiceFactory() );
- mxCtx = aCtx.getUNOContext();
+ mxCtx = comphelper::getProcessComponentContext();
}
bool import( const uno::Reference< io::XInputStream >& rxIn );
rtl::OUString getProjectName();
diff --git a/ucb/source/cacher/cachedcontentresultset.cxx b/ucb/source/cacher/cachedcontentresultset.cxx
index d1cc70444721..5e26adc6cf13 100644
--- a/ucb/source/cacher/cachedcontentresultset.cxx
+++ b/ucb/source/cacher/cachedcontentresultset.cxx
@@ -36,7 +36,7 @@
#include <com/sun/star/sdbc/ResultSetType.hpp>
#include <rtl/ustring.hxx>
#include <osl/diagnose.h>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
using namespace com::sun::star::beans;
using namespace com::sun::star::lang;
@@ -2149,7 +2149,7 @@ const Reference< XTypeConverter >& CachedContentResultSet::getTypeConverter()
if ( !m_bTriedToGetTypeConverter && !m_xTypeConverter.is() )
{
m_bTriedToGetTypeConverter = sal_True;
- m_xTypeConverter = Reference< XTypeConverter >( Converter::create(comphelper::ComponentContext(m_xSMgr).getUNOContext()) );
+ m_xTypeConverter = Reference< XTypeConverter >( Converter::create(comphelper::getComponentContext(m_xSMgr)) );
OSL_ENSURE( m_xTypeConverter.is(),
"PropertyValueSet::getTypeConverter() - "
diff --git a/ucb/source/core/ucbcmds.cxx b/ucb/source/core/ucbcmds.cxx
index 56f6d915a63d..0f6794b59b1c 100644
--- a/ucb/source/core/ucbcmds.cxx
+++ b/ucb/source/core/ucbcmds.cxx
@@ -33,7 +33,7 @@
*************************************************************************/
#include <osl/diagnose.h>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/exc_hlp.hxx>
#include <rtl/ustring.h>
@@ -968,7 +968,7 @@ uno::Reference< io::XInputStream > getInputStream(
try
{
- uno::Reference< io::XOutputStream > xOutputStream( io::Pipe::create(comphelper::ComponentContext(rContext.xSMgr).getUNOContext()), uno::UNO_QUERY_THROW );
+ uno::Reference< io::XOutputStream > xOutputStream( io::Pipe::create(comphelper::getComponentContext(rContext.xSMgr)), uno::UNO_QUERY_THROW );
ucb::OpenCommandArgument2 aArg;
aArg.Mode = ucb::OpenMode::DOCUMENT;
diff --git a/ucb/source/ucp/ext/ucpext_content.cxx b/ucb/source/ucp/ext/ucpext_content.cxx
index 290a49570c6d..dcfe4ed4de2c 100644
--- a/ucb/source/ucp/ext/ucpext_content.cxx
+++ b/ucb/source/ucp/ext/ucpext_content.cxx
@@ -55,8 +55,9 @@
#include <ucbhelper/cancelcommandexecution.hxx>
#include <ucbhelper/content.hxx>
#include <tools/diagnose_ex.h>
-#include <comphelper/string.hxx>
#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
+#include <comphelper/string.hxx>
#include <rtl/ustrbuf.hxx>
#include <rtl/uri.hxx>
#include <sal/macros.h>
@@ -286,7 +287,7 @@ namespace ucb { namespace ucp { namespace ext
if ( aOpenCommand.Sink.is() )
{
const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() );
- ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment, comphelper::ComponentContext(m_xSMgr).getUNOContext() );
+ ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEvironment, comphelper::getComponentContext(m_xSMgr) );
aRet = aRequestedContent.executeCommand( ::rtl::OUString( "open" ), makeAny( aOpenCommand ) );
}
}
@@ -502,7 +503,7 @@ namespace ucb { namespace ucp { namespace ext
case E_EXTENSION_CONTENT:
{
const ::rtl::OUString sPhysicalContentURL( getPhysicalURL() );
- ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv, comphelper::ComponentContext(m_xSMgr).getUNOContext() );
+ ::ucbhelper::Content aRequestedContent( sPhysicalContentURL, i_rEnv, comphelper::getComponentContext(m_xSMgr) );
// translate the property request
Sequence< ::rtl::OUString > aPropertyNames( i_rProperties.getLength() );
diff --git a/ucb/source/ucp/ext/ucpext_datasupplier.cxx b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
index aec7058c1f24..28a7fa2aa6c2 100644
--- a/ucb/source/ucp/ext/ucpext_datasupplier.cxx
+++ b/ucb/source/ucp/ext/ucpext_datasupplier.cxx
@@ -34,6 +34,7 @@
#include <ucbhelper/contentidentifier.hxx>
#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/providerhelper.hxx>
#include <ucbhelper/content.hxx>
#include <ucbhelper/propertyvalueset.hxx>
@@ -178,7 +179,7 @@ namespace ucb { namespace ucp { namespace ext
case E_EXTENSION_CONTENT:
{
const ::rtl::OUString sPackageLocation( m_pImpl->m_xContent->getPhysicalURL() );
- ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment(), comphelper::ComponentContext(m_pImpl->m_xSMgr).getUNOContext() );
+ ::ucbhelper::Content aWrappedContent( sPackageLocation, getResultSet()->getEnvironment(), comphelper::getComponentContext(m_pImpl->m_xSMgr) );
// obtain the properties which our result set is set up for from the wrapped content
Sequence< ::rtl::OUString > aPropertyNames(1);
diff --git a/ucb/source/ucp/file/filrow.cxx b/ucb/source/ucp/file/filrow.cxx
index 90fe7c917ace..4ded9894b545 100644
--- a/ucb/source/ucp/file/filrow.cxx
+++ b/ucb/source/ucp/file/filrow.cxx
@@ -30,7 +30,7 @@
#include "shell.hxx"
#include "prov.hxx"
#include <com/sun/star/script/Converter.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
using namespace fileaccess;
using namespace com::sun::star;
@@ -53,7 +53,7 @@ sal_Bool convert( shell* pShell,
if( ! xConverter.is() )
{
xConverter = uno::Reference< script::XTypeConverter >(
- script::Converter::create(comphelper::ComponentContext(pShell->m_xMultiServiceFactory).getUNOContext()) );
+ script::Converter::create(comphelper::getComponentContext(pShell->m_xMultiServiceFactory)) );
}
try
diff --git a/ucb/source/ucp/ftp/ftpcontentprovider.cxx b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
index 7d9db3d8b582..f05ce18bf107 100644
--- a/ucb/source/ucp/ftp/ftpcontentprovider.cxx
+++ b/ucb/source/ucp/ftp/ftpcontentprovider.cxx
@@ -34,7 +34,7 @@
*************************************************************************/
#include <com/sun/star/ucb/UniversalContentBroker.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <osl/socket.hxx>
#include "ftpcontentprovider.hxx"
#include "ftpcontent.hxx"
@@ -261,7 +261,7 @@ FTPContentProvider::getHttpProvider()
// used for access to ftp-proxy
return
UniversalContentBroker::create(
- comphelper::ComponentContext(m_xSMgr).getUNOContext())->
+ comphelper::getComponentContext(m_xSMgr))->
queryContentProvider("http:");
}
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index 037a8379db09..4ebee9119df8 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -69,7 +69,7 @@
#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
#include <com/sun/star/ucb/UnsupportedOpenModeException.hpp>
#include <com/sun/star/ucb/NameClashException.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/interactionrequest.hxx>
@@ -1450,7 +1450,7 @@ Content::createTempStream(
// Something badly wrong happened - can't seek => stream to a temporary file
uno::Reference < io::XOutputStream > xTempOut =
uno::Reference < io::XOutputStream >
- ( io::TempFile::create(comphelper::ComponentContext(m_xSMgr).getUNOContext()), uno::UNO_QUERY );
+ ( io::TempFile::create(comphelper::getComponentContext(m_xSMgr)), uno::UNO_QUERY );
if ( !xTempOut.is() )
cancelCommandExecution( GNOME_VFS_ERROR_IO, xEnv );
diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx
index db824294aa10..5ca37c71461f 100644
--- a/ucb/source/ucp/odma/odma_content.cxx
+++ b/ucb/source/ucp/odma/odma_content.cxx
@@ -40,7 +40,7 @@
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/ucb/XCommandInfo.hpp>
#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
@@ -352,7 +352,7 @@ uno::Any SAL_CALL Content::execute(
delete m_pContent;
m_pContent = new ::ucbhelper::Content
(sFileURL,NULL,
- comphelper::ComponentContext(m_xSMgr).getUNOContext());
+ comphelper::getComponentContext(m_xSMgr));
if(!m_pContent->isDocument())
{
rtl::OUString sErrorMsg("File: ");
@@ -511,7 +511,7 @@ uno::Any SAL_CALL Content::execute(
// Create a new Content object for the "shadow" file
// corresponding to the opened document from the DMS.
::ucbhelper::Content aContent(sFileURL.copy(0,nLastIndex),NULL,
- comphelper::ComponentContext(m_xSMgr).getUNOContext());
+ comphelper::getComponentContext(m_xSMgr));
// aTransferInfo.NameClash = ucb::NameClash::OVERWRITE;
aTransferInfo.NewTitle = sFileURL.copy( 1 + nLastIndex );
// Copy our saved backup copy to the "shadow" file.
diff --git a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
index c3a94836d76a..87532955d52a 100644
--- a/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_docmgr.cxx
@@ -37,9 +37,9 @@
#include "rtl/ref.hxx"
#include "cppuhelper/weak.hxx"
-#include "comphelper/componentcontext.hxx"
-#include "comphelper/namedvaluecollection.hxx"
#include "comphelper/documentinfo.hxx"
+#include "comphelper/namedvaluecollection.hxx"
+#include "comphelper/processfactory.hxx"
#include "com/sun/star/awt/XTopWindow.hpp"
#include "com/sun/star/beans/XPropertySet.hpp"
@@ -703,7 +703,7 @@ bool OfficeDocumentsManager::isBasicIDE(
try
{
m_xModuleMgr = frame::ModuleManager::create(
- comphelper::ComponentContext(m_xSMgr).getUNOContext());
+ comphelper::getComponentContext(m_xSMgr));
}
catch ( uno::Exception const & )
{
diff --git a/unotools/source/config/moduleoptions.cxx b/unotools/source/config/moduleoptions.cxx
index e81f3ad7f955..1d008d74d65b 100644
--- a/unotools/source/config/moduleoptions.cxx
+++ b/unotools/source/config/moduleoptions.cxx
@@ -22,7 +22,6 @@
#include <comphelper/sequenceashashmap.hxx>
#include <unotools/configmgr.hxx>
#include <unotools/configitem.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/processfactory.hxx>
#include <osl/diagnose.h>
#include <rtl/ustrbuf.hxx>
@@ -271,7 +270,7 @@ struct FactoryInfo
{
if ( !xSubstVars.is() )
{
- css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::ComponentContext(xSMgr).getUNOContext() );
+ css::uno::Reference< css::uno::XComponentContext > xContext( comphelper::getComponentContext(xSMgr) );
xSubstVars
= css::uno::Reference< css::util::XStringSubstitution >(
css::util::PathSubstitution::create(xContext) );
diff --git a/unotools/source/i18n/localedatawrapper.cxx b/unotools/source/i18n/localedatawrapper.cxx
index 93eda0d0fd2c..d6dee74d9435 100644
--- a/unotools/source/i18n/localedatawrapper.cxx
+++ b/unotools/source/i18n/localedatawrapper.cxx
@@ -37,7 +37,7 @@
#include <com/sun/star/i18n/CalendarDisplayIndex.hpp>
#include <com/sun/star/i18n/NumberFormatIndex.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <rtl/instance.hxx>
#include <rtl/ustrbuf.hxx>
#include <sal/macros.h>
@@ -71,7 +71,7 @@ LocaleDataWrapper::LocaleDataWrapper(
)
:
xSMgr( xSF ),
- xLD( LocaleData::create(comphelper::ComponentContext(xSMgr).getUNOContext()) ),
+ xLD( LocaleData::create(comphelper::getComponentContext(xSMgr)) ),
bLocaleDataItemValid( sal_False ),
bReservedWordValid( sal_False )
{
diff --git a/unoxml/source/dom/saxbuilder.cxx b/unoxml/source/dom/saxbuilder.cxx
index a9ae0e01b5f0..cd7045652f1e 100644
--- a/unoxml/source/dom/saxbuilder.cxx
+++ b/unoxml/source/dom/saxbuilder.cxx
@@ -23,7 +23,7 @@
#include "saxbuilder.hxx"
#include <com/sun/star/xml/dom/DocumentBuilder.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
namespace DOM
@@ -167,7 +167,7 @@ namespace DOM
if (!m_aState == SAXDocumentBuilderState_READY)
throw SAXException();
- Reference< XDocumentBuilder > aBuilder(DocumentBuilder::create(comphelper::ComponentContext(m_aServiceManager).getUNOContext()));
+ Reference< XDocumentBuilder > aBuilder(DocumentBuilder::create(comphelper::getComponentContext(m_aServiceManager)));
Reference< XDocument > aDocument = aBuilder->newDocument();
m_aNodeStack.push(Reference< XNode >(aDocument, UNO_QUERY));
m_aDocument = aDocument;
diff --git a/uui/source/iahndl-authentication.cxx b/uui/source/iahndl-authentication.cxx
index 6e03e22f1b04..bf09e7e3e1d1 100644
--- a/uui/source/iahndl-authentication.cxx
+++ b/uui/source/iahndl-authentication.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "comphelper/componentcontext.hxx"
+#include "comphelper/processfactory.hxx"
#include "com/sun/star/task/DocumentPasswordRequest.hpp"
#include "com/sun/star/task/DocumentPasswordRequest2.hpp"
@@ -206,7 +206,7 @@ handleAuthenticationRequest_(
//////////////////////////
// First, try to obtain credentials from password container service.
- uui::PasswordContainerHelper aPwContainerHelper(comphelper::ComponentContext(xServiceFactory).getUNOContext());
+ uui::PasswordContainerHelper aPwContainerHelper(comphelper::getComponentContext(xServiceFactory));
if (aPwContainerHelper.handleAuthenticationRequest(rRequest,
xSupplyAuthentication,
rURL,
diff --git a/uui/source/passwordcontainer.cxx b/uui/source/passwordcontainer.cxx
index 546d795bded4..5a688c622197 100644
--- a/uui/source/passwordcontainer.cxx
+++ b/uui/source/passwordcontainer.cxx
@@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
-#include "comphelper/componentcontext.hxx"
+#include "comphelper/processfactory.hxx"
#include "cppuhelper/factory.hxx"
#include "com/sun/star/lang/XMultiServiceFactory.hpp"
@@ -416,7 +416,7 @@ PasswordContainerInteractionHandler_CreateInstance(
throw( uno::Exception )
{
lang::XServiceInfo * pX = static_cast< lang::XServiceInfo * >(
- new PasswordContainerInteractionHandler( comphelper::ComponentContext(rSMgr).getUNOContext() ) );
+ new PasswordContainerInteractionHandler( comphelper::getComponentContext(rSMgr) ) );
return uno::Reference< uno::XInterface >::query( pX );
}
diff --git a/uui/source/sslwarndlg.cxx b/uui/source/sslwarndlg.cxx
index eba78e197b47..b00ca79fa160 100644
--- a/uui/source/sslwarndlg.cxx
+++ b/uui/source/sslwarndlg.cxx
@@ -23,7 +23,7 @@
#include <sslwarndlg.hrc>
#include <sslwarndlg.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
// -----------------------------------------------------------------------
@@ -40,7 +40,7 @@ IMPL_LINK_NOARG(SSLWarnDialog, ViewCertHdl_Impl)
{
uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures;
- xDocumentDigitalSignatures = ::com::sun::star::security::DocumentDigitalSignatures::createDefault( comphelper::ComponentContext(getServiceFactory()).getUNOContext() );
+ xDocumentDigitalSignatures = ::com::sun::star::security::DocumentDigitalSignatures::createDefault( comphelper::getComponentContext(getServiceFactory()) );
xDocumentDigitalSignatures.get()->showCertificate(getCert());
diff --git a/uui/source/unknownauthdlg.cxx b/uui/source/unknownauthdlg.cxx
index c53e5bb8d0bf..dc0e551ac163 100644
--- a/uui/source/unknownauthdlg.cxx
+++ b/uui/source/unknownauthdlg.cxx
@@ -22,7 +22,7 @@
#include <ids.hrc>
#include <unknownauthdlg.hrc>
#include <unknownauthdlg.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/security/DocumentDigitalSignatures.hpp>
@@ -48,7 +48,7 @@ IMPL_LINK_NOARG(UnknownAuthDialog, ViewCertHdl_Impl)
uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures > xDocumentDigitalSignatures;
xDocumentDigitalSignatures = uno::Reference< ::com::sun::star::security::XDocumentDigitalSignatures >(
- ::com::sun::star::security::DocumentDigitalSignatures::createDefault(comphelper::ComponentContext(getServiceFactory()).getUNOContext()) );
+ ::com::sun::star::security::DocumentDigitalSignatures::createDefault(comphelper::getComponentContext(getServiceFactory())) );
xDocumentDigitalSignatures.get()->showCertificate(getCert());
diff --git a/vcl/source/app/unohelp.cxx b/vcl/source/app/unohelp.cxx
index 3b144f52668c..329159250b95 100644
--- a/vcl/source/app/unohelp.cxx
+++ b/vcl/source/app/unohelp.cxx
@@ -41,7 +41,6 @@
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/processfactory.hxx>
-#include <comphelper/componentcontext.hxx>
#include <com/sun/star/i18n/XBreakIterator.hpp>
#include <com/sun/star/i18n/XCharacterClassification.hpp>
@@ -102,7 +101,7 @@ uno::Reference< lang::XMultiServiceFactory > vcl::unohelper::GetMultiServiceFact
{
pSVData->maAppData.mxMSF = ::cppu::createRegistryServiceFactory( aTempFileName, rtl::OUString(), sal_False );
uno::Reference < registry::XImplementationRegistration > xReg(
- registry::ImplementationRegistration::create( comphelper::ComponentContext(pSVData->maAppData.mxMSF).getUNOContext() ) );
+ registry::ImplementationRegistration::create( comphelper::getComponentContext(pSVData->maAppData.mxMSF) ) );
if( xReg.is() )
{
diff --git a/vcl/source/gdi/pdfwriter_impl2.cxx b/vcl/source/gdi/pdfwriter_impl2.cxx
index 1855d43a7505..f167c044522c 100644
--- a/vcl/source/gdi/pdfwriter_impl2.cxx
+++ b/vcl/source/gdi/pdfwriter_impl2.cxx
@@ -42,7 +42,6 @@
#include "unotools/streamwrap.hxx"
#include "comphelper/processfactory.hxx"
-#include "comphelper/componentcontext.hxx"
#include "com/sun/star/beans/PropertyValue.hpp"
#include "com/sun/star/io/XSeekable.hpp"
@@ -196,7 +195,7 @@ void PDFWriterImpl::implWriteBitmapEx( const Point& i_rPoint, const Size& i_rSiz
{
uno::Reference < io::XStream > xStream = new utl::OStreamWrapper( aStrm );
uno::Reference< io::XSeekable > xSeekable( xStream, UNO_QUERY_THROW );
- uno::Reference< uno::XComponentContext > xContext( comphelper::ComponentContext(ImplGetSVData()->maAppData.mxMSF).getUNOContext() );
+ uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(ImplGetSVData()->maAppData.mxMSF) );
uno::Reference< graphic::XGraphicProvider > xGraphicProvider( graphic::GraphicProvider::create(xContext) );
uno::Reference< graphic::XGraphic > xGraphic( aGraphic.GetXGraphic() );
uno::Reference < io::XOutputStream > xOut( xStream->getOutputStream() );
diff --git a/xmloff/source/core/DocumentSettingsContext.cxx b/xmloff/source/core/DocumentSettingsContext.cxx
index 99e6ee4895d5..d470eb25a18d 100644
--- a/xmloff/source/core/DocumentSettingsContext.cxx
+++ b/xmloff/source/core/DocumentSettingsContext.cxx
@@ -40,7 +40,7 @@
#include <xmloff/nmspmap.hxx>
#include <xmloff/xmluconv.hxx>
#include <tools/debug.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <list>
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
@@ -718,7 +718,7 @@ void XMLConfigItemContext::ManipulateConfigItem()
{
if( GetImport().getServiceFactory().is() ) try
{
- uno::Reference< uno::XComponentContext > xContext( comphelper::ComponentContext(GetImport().getServiceFactory()).getUNOContext() );
+ uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(GetImport().getServiceFactory()) );
uno::Reference< util::XStringSubstitution > xStringSubsitution( util::PathSubstitution::create(xContext) );
rtl::OUString aURL;
diff --git a/xmloff/source/core/SettingsExportHelper.cxx b/xmloff/source/core/SettingsExportHelper.cxx
index 79c21a2651be..7d61bdd932a7 100644
--- a/xmloff/source/core/SettingsExportHelper.cxx
+++ b/xmloff/source/core/SettingsExportHelper.cxx
@@ -34,8 +34,8 @@
#include <xmloff/xmltoken.hxx>
#include <tools/debug.hxx>
#include <tools/diagnose_ex.h>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/extract.hxx>
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/linguistic2/XSupportedLocales.hpp>
#include <com/sun/star/i18n/XForbiddenCharacters.hpp>
@@ -547,7 +547,7 @@ void XMLSettingsExportHelper::ManipulateSetting( uno::Any& rAny, const rtl::OUSt
{
if( m_rContext.GetServiceFactory().is() ) try
{
- uno::Reference< uno::XComponentContext > xContext( comphelper::ComponentContext(m_rContext.GetServiceFactory()).getUNOContext() );
+ uno::Reference< uno::XComponentContext > xContext( comphelper::getComponentContext(m_rContext.GetServiceFactory()) );
const_cast< XMLSettingsExportHelper* >(this)->mxStringSubsitution =
util::PathSubstitution::create(xContext);
}
diff --git a/xmloff/source/core/xmluconv.cxx b/xmloff/source/core/xmluconv.cxx
index 197cdf369835..45e67fb41ad1 100644
--- a/xmloff/source/core/xmluconv.cxx
+++ b/xmloff/source/core/xmluconv.cxx
@@ -50,7 +50,7 @@
#include <com/sun/star/i18n/XCharacterClassification.hpp>
#include <com/sun/star/i18n/UnicodeType.hpp>
#include <basegfx/vector/b3dvector.hxx>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <sax/tools/converter.hxx>
@@ -98,7 +98,7 @@ void SvXMLUnitConverter::Impl::createNumTypeInfo() const
{
if (m_xServiceFactory.is())
{
- Reference<XComponentContext> xContext( comphelper::ComponentContext(m_xServiceFactory).getUNOContext() );
+ Reference<XComponentContext> xContext( comphelper::getComponentContext(m_xServiceFactory) );
Reference<XDefaultNumberingProvider> xDefNum = DefaultNumberingProvider::create(xContext);
const_cast<Impl*>(this)->m_xNumTypeInfo =
Reference<XNumberingTypeInfo>(xDefNum, uno::UNO_QUERY);
diff --git a/xmloff/source/draw/shapeexport4.cxx b/xmloff/source/draw/shapeexport4.cxx
index 28bfd296bf46..951f66a4d3d1 100644
--- a/xmloff/source/draw/shapeexport4.cxx
+++ b/xmloff/source/draw/shapeexport4.cxx
@@ -70,7 +70,7 @@
#include "xmloff/xmlnmspe.hxx"
#include "XMLBase64Export.hxx"
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
using ::rtl::OUString;
using ::rtl::OUStringBuffer;
@@ -1235,7 +1235,7 @@ void XMLShapeExport::ImpExportTableShape( const uno::Reference< drawing::XShape
xPictureStream.set( xPictureStorage->openStreamElement( sPictureName, ::embed::ElementModes::READWRITE ), UNO_QUERY_THROW );
}
- Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(comphelper::ComponentContext(xSM).getUNOContext()) );
+ Reference< graphic::XGraphicProvider > xProvider( graphic::GraphicProvider::create(comphelper::getComponentContext(xSM)) );
Sequence< beans::PropertyValue > aArgs( 2 );
aArgs[ 0 ].Name = OUString( RTL_CONSTASCII_USTRINGPARAM( "MimeType" ) );
aArgs[ 0 ].Value <<= OUString( RTL_CONSTASCII_USTRINGPARAM( "image/x-vclgraphic" ) );