[Libreoffice-commits] core.git: 16 commits - chart2/source connectivity/source dbaccess/inc dbaccess/source extensions/source filter/Library_placeware.mk filter/source linguistic/inc linguistic/source offapi/com offapi/type_reference offapi/UnoApi_offapi.mk sc/CppunitTest_sc_tablesheetobj.mk sc/CppunitTest_sc_tablesheetsobj.mk sc/source sd/source sfx2/inc sfx2/source slideshow/source svtools/inc svtools/source svx/source sw/source toolkit/source xmloff/source
Noel Grandin
noel at peralex.com
Tue Mar 19 22:33:40 PDT 2013
chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx | 2
chart2/source/view/main/ChartView.cxx | 23 -
connectivity/source/drivers/jdbc/JConnection.cxx | 8
connectivity/source/drivers/jdbc/JDriver.cxx | 10
connectivity/source/inc/java/sql/Driver.hxx | 8
connectivity/source/manager/mdrivermanager.cxx | 4
dbaccess/inc/pch/precompiled_dbu.hxx | 1
dbaccess/source/core/api/OptimisticSet.cxx | 4
dbaccess/source/core/api/OptimisticSet.hxx | 3
dbaccess/source/core/api/RowSet.cxx | 17 -
dbaccess/source/core/api/RowSet.hxx | 4
dbaccess/source/core/api/RowSetBase.cxx | 4
dbaccess/source/core/api/RowSetBase.hxx | 5
dbaccess/source/core/api/RowSetCache.cxx | 4
dbaccess/source/core/api/RowSetCache.hxx | 5
dbaccess/source/core/api/SingleSelectQueryComposer.cxx | 16 -
dbaccess/source/core/api/query.cxx | 2
dbaccess/source/core/api/query.hxx | 2
dbaccess/source/core/api/querycontainer.cxx | 10
dbaccess/source/core/dataaccess/ComponentDefinition.cxx | 8
dbaccess/source/core/dataaccess/ComponentDefinition.hxx | 4
dbaccess/source/core/dataaccess/ContentHelper.cxx | 8
dbaccess/source/core/dataaccess/ModelImpl.cxx | 20 -
dbaccess/source/core/dataaccess/ModelImpl.hxx | 7
dbaccess/source/core/dataaccess/commandcontainer.cxx | 10
dbaccess/source/core/dataaccess/commandcontainer.hxx | 2
dbaccess/source/core/dataaccess/commanddefinition.cxx | 8
dbaccess/source/core/dataaccess/commanddefinition.hxx | 4
dbaccess/source/core/dataaccess/connection.cxx | 20 -
dbaccess/source/core/dataaccess/connection.hxx | 5
dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx | 15 -
dbaccess/source/core/dataaccess/databasecontext.cxx | 6
dbaccess/source/core/dataaccess/databasecontext.hxx | 4
dbaccess/source/core/dataaccess/databasedocument.cxx | 43 +-
dbaccess/source/core/dataaccess/databasedocument.hxx | 2
dbaccess/source/core/dataaccess/databaseregistrations.cxx | 12
dbaccess/source/core/dataaccess/databaseregistrations.hxx | 7
dbaccess/source/core/dataaccess/datasource.cxx | 14
dbaccess/source/core/dataaccess/definitioncontainer.cxx | 2
dbaccess/source/core/dataaccess/documentcontainer.cxx | 16 -
dbaccess/source/core/dataaccess/documentcontainer.hxx | 2
dbaccess/source/core/dataaccess/documentdefinition.cxx | 36 +-
dbaccess/source/core/dataaccess/documentdefinition.hxx | 8
dbaccess/source/core/dataaccess/documenteventexecutor.cxx | 6
dbaccess/source/core/dataaccess/documenteventexecutor.hxx | 7
dbaccess/source/core/inc/ContentHelper.hxx | 8
dbaccess/source/core/inc/SingleSelectQueryComposer.hxx | 5
dbaccess/source/core/inc/definitioncontainer.hxx | 2
dbaccess/source/core/inc/querycontainer.hxx | 2
dbaccess/source/core/inc/recovery/dbdocrecovery.hxx | 8
dbaccess/source/core/inc/sdbcoretools.hxx | 8
dbaccess/source/core/misc/sdbcoretools.cxx | 9
dbaccess/source/core/recovery/dbdocrecovery.cxx | 12
dbaccess/source/core/recovery/storagestream.cxx | 5
dbaccess/source/core/recovery/storagestream.hxx | 22 -
dbaccess/source/core/recovery/storagetextstream.cxx | 6
dbaccess/source/core/recovery/storagetextstream.hxx | 2
dbaccess/source/core/recovery/storagexmlstream.cxx | 10
dbaccess/source/core/recovery/storagexmlstream.hxx | 9
dbaccess/source/core/recovery/subcomponentrecovery.cxx | 9
dbaccess/source/core/recovery/subcomponentrecovery.hxx | 14
dbaccess/source/ext/macromigration/docinteraction.cxx | 8
dbaccess/source/ext/macromigration/docinteraction.hxx | 9
dbaccess/source/ext/macromigration/macromigrationdialog.cxx | 10
dbaccess/source/ext/macromigration/macromigrationdialog.hxx | 5
dbaccess/source/ext/macromigration/macromigrationpages.cxx | 1
dbaccess/source/ext/macromigration/macromigrationwizard.cxx | 3
dbaccess/source/ext/macromigration/migrationengine.cxx | 21 -
dbaccess/source/ext/macromigration/migrationengine.hxx | 8
dbaccess/source/filter/xml/dbloader2.cxx | 42 +-
dbaccess/source/sdbtools/connection/connectiondependent.hxx | 8
dbaccess/source/sdbtools/connection/connectiontools.cxx | 4
dbaccess/source/sdbtools/connection/connectiontools.hxx | 4
dbaccess/source/sdbtools/connection/datasourcemetadata.cxx | 3
dbaccess/source/sdbtools/connection/datasourcemetadata.hxx | 2
dbaccess/source/sdbtools/connection/objectnames.cxx | 29 +
dbaccess/source/sdbtools/connection/objectnames.hxx | 3
dbaccess/source/sdbtools/connection/tablename.cxx | 3
dbaccess/source/sdbtools/connection/tablename.hxx | 2
dbaccess/source/ui/app/AppController.cxx | 5
dbaccess/source/ui/browser/dbloader.cxx | 1
dbaccess/source/ui/dlg/ConnectionHelper.cxx | 1
dbaccess/source/ui/inc/unoadmin.hxx | 2
dbaccess/source/ui/inc/unosqlmessage.hxx | 2
dbaccess/source/ui/misc/TableCopyHelper.cxx | 7
dbaccess/source/ui/misc/UITools.cxx | 1
dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx | 9
dbaccess/source/ui/uno/DBTypeWizDlg.cxx | 7
dbaccess/source/ui/uno/DBTypeWizDlg.hxx | 2
dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx | 7
dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx | 2
dbaccess/source/ui/uno/TableFilterDlg.cxx | 7
dbaccess/source/ui/uno/TableFilterDlg.hxx | 2
dbaccess/source/ui/uno/UserSettingsDlg.cxx | 7
dbaccess/source/ui/uno/UserSettingsDlg.hxx | 2
dbaccess/source/ui/uno/admindlg.cxx | 7
dbaccess/source/ui/uno/admindlg.hxx | 2
dbaccess/source/ui/uno/composerdialogs.cxx | 32 +-
dbaccess/source/ui/uno/composerdialogs.hxx | 6
dbaccess/source/ui/uno/copytablewizard.cxx | 23 -
dbaccess/source/ui/uno/textconnectionsettings_uno.cxx | 44 ++
dbaccess/source/ui/uno/unoDirectSql.cxx | 15 -
dbaccess/source/ui/uno/unoDirectSql.hxx | 2
dbaccess/source/ui/uno/unoadmin.cxx | 4
dbaccess/source/ui/uno/unosqlmessage.cxx | 5
extensions/source/abpilot/abspage.cxx | 2
extensions/source/abpilot/abspage.hxx | 2
extensions/source/abpilot/abspilot.cxx | 10
extensions/source/abpilot/abspilot.hxx | 7
extensions/source/abpilot/admininvokationpage.cxx | 2
extensions/source/abpilot/datasourcehandling.cxx | 27 -
extensions/source/abpilot/datasourcehandling.hxx | 7
extensions/source/abpilot/fieldmappingpage.cxx | 2
extensions/source/abpilot/typeselectionpage.cxx | 2
extensions/source/abpilot/unodialogabp.cxx | 7
extensions/source/abpilot/unodialogabp.hxx | 2
extensions/source/dbpilots/unoautopilot.hxx | 3
extensions/source/dbpilots/unoautopilot.inl | 6
extensions/source/propctrlr/MasterDetailLinkDialog.cxx | 2
extensions/source/propctrlr/formcomponenthandler.cxx | 2
extensions/source/propctrlr/pcrunodialogs.cxx | 2
extensions/source/propctrlr/taborder.cxx | 4
extensions/source/propctrlr/taborder.hxx | 4
filter/Library_placeware.mk | 1
filter/source/flash/swfdialog.cxx | 7
filter/source/flash/swfdialog.hxx | 2
filter/source/flash/swfexporter.cxx | 12
filter/source/flash/swfexporter.hxx | 11
filter/source/flash/swffilter.cxx | 16 -
filter/source/pdf/pdfdialog.cxx | 8
filter/source/pdf/pdfdialog.hxx | 2
filter/source/placeware/exporter.cxx | 11
filter/source/placeware/exporter.hxx | 12
filter/source/placeware/filter.cxx | 13
filter/source/svg/svgdialog.cxx | 7
filter/source/svg/svgdialog.hxx | 2
filter/source/svg/svgexport.cxx | 39 +-
filter/source/xsltdialog/xmlfilterdialogcomponent.cxx | 6
filter/source/xsltdialog/xsltdlg.component | 4
linguistic/inc/linguistic/misc.hxx | 1
linguistic/source/gciterator.cxx | 2
linguistic/source/lngsvcmgr.cxx | 8
offapi/UnoApi_offapi.mk | 13
offapi/com/sun/star/drawing/GraphicExportFilter.idl | 51 ---
offapi/com/sun/star/drawing/XGraphicExportFilter.idl | 85 +++++
offapi/com/sun/star/frame/Bibliography.idl | 37 ++
offapi/com/sun/star/graphic/PrimitiveFactory2D.idl | 37 ++
offapi/com/sun/star/i18n/IndexEntrySupplier.idl | 8
offapi/com/sun/star/linguistic2/ProofreadingIterator.idl | 2
offapi/com/sun/star/scanner/ScannerManager.idl | 8
offapi/com/sun/star/scanner/XScannerManager2.idl | 2
offapi/com/sun/star/sdb/TextConnectionSettings.idl | 38 ++
offapi/com/sun/star/sdb/XTextConnectionSettings.idl | 44 ++
offapi/com/sun/star/text/AutoTextContainer.idl | 13
offapi/com/sun/star/text/XAutoTextContainer2.idl | 45 +++
offapi/com/sun/star/ui/dialogs/XSLTFilterDialog.idl | 38 ++
offapi/type_reference/types.rdb |binary
sc/CppunitTest_sc_tablesheetobj.mk | 22 -
sc/CppunitTest_sc_tablesheetsobj.mk | 22 -
sc/source/ui/app/scmod.cxx | 12
sd/source/filter/grf/sdgrffilter.cxx | 179 +++++-------
sd/source/filter/html/htmlex.cxx | 15 -
sd/source/ui/remotecontrol/ImagePreparer.cxx | 16 -
sd/source/ui/view/drviewsa.cxx | 25 -
sd/source/ui/view/drviewsb.cxx | 11
sfx2/inc/frmload.hxx | 6
sfx2/source/appl/appserv.cxx | 9
sfx2/source/view/frame2.cxx | 6
sfx2/source/view/frmload.cxx | 16 -
slideshow/source/engine/shapes/gdimtftools.cxx | 23 -
svtools/inc/svtools/genericunodialog.hxx | 4
svtools/source/filter/SvFilterOptionsDialog.cxx | 9
svtools/source/filter/SvFilterOptionsDialog.hxx | 11
svtools/source/filter/exportdialog.cxx | 75 ++---
svtools/source/filter/exportdialog.hxx | 6
svtools/source/uno/addrtempuno.cxx | 11
svtools/source/uno/genericunodialog.cxx | 18 -
svx/source/form/fmundo.cxx | 2
svx/source/form/fmview.cxx | 4
svx/source/form/xfm_addcondition.cxx | 5
svx/source/inc/xfm_addcondition.hxx | 2
svx/source/svdraw/charthelper.cxx | 41 +-
svx/source/svdraw/sdrpagewindow.cxx | 29 -
svx/source/svdraw/svdoashp.cxx | 6
svx/source/svdraw/svdouno.cxx | 8
svx/source/unodraw/UnoGraphicExporter.cxx | 6
svx/source/xml/xmlexport.cxx | 42 --
sw/source/core/doc/docnew.cxx | 21 -
sw/source/core/docnode/swthreadjoiner.cxx | 8
sw/source/core/swg/SwXMLTextBlocks1.cxx | 120 +++-----
sw/source/core/tox/toxhlp.cxx | 23 -
sw/source/filter/ww8/ww8par.cxx | 1
sw/source/filter/xml/wrtxml.cxx | 28 -
sw/source/filter/xml/wrtxml.hxx | 4
sw/source/ui/app/swmodule.cxx | 14
sw/source/ui/config/mailconfigpage.cxx | 138 ++++-----
sw/source/ui/dbui/addresslistdialog.cxx | 2
sw/source/ui/dbui/dbinsdlg.cxx | 1
sw/source/ui/dbui/dbmgr.cxx | 6
sw/source/ui/dbui/mailmergehelper.cxx | 124 ++++----
sw/source/ui/dbui/mmconfigitem.cxx | 41 +-
sw/source/ui/envelp/label1.cxx | 2
sw/source/ui/envelp/labelexp.cxx | 24 -
sw/source/ui/envelp/swuilabimp.hxx | 3
sw/source/ui/inc/glossary.hxx | 3
sw/source/ui/inc/unoatxt.hxx | 25 -
sw/source/ui/index/swuiidxmrk.cxx | 15 -
sw/source/ui/misc/glossary.cxx | 13
sw/source/ui/shells/annotsh.cxx | 11
sw/source/ui/shells/drawsh.cxx | 11
sw/source/ui/shells/drwtxtex.cxx | 11
sw/source/ui/shells/frmsh.cxx | 11
sw/source/ui/shells/textsh1.cxx | 11
sw/source/ui/uno/dlelstnr.cxx | 6
sw/source/ui/vba/vbatemplate.cxx | 6
toolkit/source/controls/grid/defaultgridcolumnmodel.cxx | 8
toolkit/source/controls/grid/defaultgridcolumnmodel.hxx | 2
xmloff/source/text/XMLAutoTextEventExport.cxx | 3
xmloff/source/text/XMLAutoTextEventImport.cxx | 4
219 files changed, 1514 insertions(+), 1413 deletions(-)
New commits:
commit a066525b42a1ab8dc60e10a5d62819c259904f32
Author: Noel Grandin <noel at peralex.com>
Date: Tue Mar 19 13:08:47 2013 +0200
fdo#46808, Convert a bunch of comphelper::ComponentContext stuff
.. to Reference<XComponentContext>
mostly in the dbaccess module, but it also affected some other
modules.
Change-Id: I09b3f6fe7a9b33498b11d98b5521b5aeeb8882be
diff --git a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
index a218633..6a91a9a 100644
--- a/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
+++ b/chart2/source/controller/dialogs/dlg_ChartType_UNO.cxx
@@ -101,7 +101,7 @@ void ChartTypeUnoDlg::implInitialize(const uno::Any& _rValue)
//------------------------------------------------------------------------------
Dialog* ChartTypeUnoDlg::createDialog(Window* _pParent)
{
- return new ChartTypeDialog( _pParent, m_xChartModel, m_aContext.getUNOContext() );
+ return new ChartTypeDialog( _pParent, m_xChartModel, m_aContext );
}
//-------------------------------------------------------------------------
//-------------------------------------------------------------------------
diff --git a/connectivity/source/drivers/jdbc/JConnection.cxx b/connectivity/source/drivers/jdbc/JConnection.cxx
index 9207cdb..ec2e62b 100644
--- a/connectivity/source/drivers/jdbc/JConnection.cxx
+++ b/connectivity/source/drivers/jdbc/JConnection.cxx
@@ -259,7 +259,7 @@ jclass java_sql_Connection::theClass = 0;
java_sql_Connection::java_sql_Connection( const java_sql_Driver& _rDriver )
:java_lang_Object()
,OSubComponent<java_sql_Connection, java_sql_Connection_BASE>((::cppu::OWeakObject*)(&_rDriver), this)
- ,m_xContext( _rDriver.getContext().getUNOContext() )
+ ,m_xContext( _rDriver.getContext() )
,m_pDriver( &_rDriver )
,m_pDriverobject(NULL)
,m_pDriverClassLoader()
@@ -470,7 +470,7 @@ Reference< XStatement > SAL_CALL java_sql_Connection::createStatement( ) throw(
{
try
{
- OSQLParser aParser( m_pDriver->getContext().getUNOContext() );
+ OSQLParser aParser( m_pDriver->getContext() );
::rtl::OUString sErrorMessage;
::rtl::OUString sNewSql;
OSQLParseNode* pNode = aParser.parseTree(sErrorMessage,_sSQL);
@@ -702,7 +702,7 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri
LocalRef< jobject > driverClassLoader(t.env());
loadClass(
- m_pDriver->getContext().getUNOContext(),
+ m_pDriver->getContext(),
t.env(), _sDriverClassPath, _sDriverClass, &driverClassLoader, &driverClass );
m_pDriverClassLoader.set( driverClassLoader );
@@ -759,7 +759,7 @@ void java_sql_Connection::loadDriverFromProperties( const ::rtl::OUString& _sDri
{
static const ::rtl::OUString s_sNodeName("org.openoffice.Office.DataAccess/JDBC/DriverClassPaths");
::utl::OConfigurationTreeRoot aNamesRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext(
- m_pDriver->getContext().getUNOContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
+ m_pDriver->getContext(), s_sNodeName, -1, ::utl::OConfigurationTreeRoot::CM_READONLY);
::rtl::OUString sURL;
if ( aNamesRoot.isValid() && aNamesRoot.hasByName( _sDriverClass ) )
{
diff --git a/connectivity/source/drivers/jdbc/JDriver.cxx b/connectivity/source/drivers/jdbc/JDriver.cxx
index 2e03671..d99dfee 100644
--- a/connectivity/source/drivers/jdbc/JDriver.cxx
+++ b/connectivity/source/drivers/jdbc/JDriver.cxx
@@ -30,7 +30,7 @@
#include "resource/jdbc_log.hrc"
#include "resource/common_res.hrc"
#include "resource/sharedresources.hxx"
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
using namespace connectivity;
using namespace ::com::sun::star::uno;
@@ -40,9 +40,9 @@ using namespace ::com::sun::star::container;
using namespace ::com::sun::star::lang;
// -------------------------------------------------------------------------
-java_sql_Driver::java_sql_Driver(const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory)
- :m_aContext( _rxFactory )
- ,m_aLogger( m_aContext.getUNOContext(), "sdbcl", "org.openoffice.sdbc.jdbcBridge" )
+java_sql_Driver::java_sql_Driver(const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext)
+ :m_aContext( _rxContext )
+ ,m_aLogger( _rxContext, "sdbcl", "org.openoffice.sdbc.jdbcBridge" )
{
}
// --------------------------------------------------------------------------------
@@ -68,7 +68,7 @@ Sequence< ::rtl::OUString > java_sql_Driver::getSupportedServiceNames_Static( )
//------------------------------------------------------------------
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface > SAL_CALL connectivity::java_sql_Driver_CreateInstance(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory) throw( ::com::sun::star::uno::Exception )
{
- return *(new java_sql_Driver(_rxFactory));
+ return *(new java_sql_Driver( comphelper::getComponentContext(_rxFactory)));
}
// --------------------------------------------------------------------------------
::rtl::OUString SAL_CALL java_sql_Driver::getImplementationName( ) throw(RuntimeException)
diff --git a/connectivity/source/inc/java/sql/Driver.hxx b/connectivity/source/inc/java/sql/Driver.hxx
index 6c272e2..838ce18 100644
--- a/connectivity/source/inc/java/sql/Driver.hxx
+++ b/connectivity/source/inc/java/sql/Driver.hxx
@@ -24,10 +24,8 @@
#include "java/lang/Object.hxx"
#include <cppuhelper/implbase2.hxx>
#include <com/sun/star/lang/XServiceInfo.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <comphelper/logging.hxx>
-#include <comphelper/componentcontext.hxx>
namespace connectivity
{
@@ -35,14 +33,14 @@ namespace connectivity
class java_sql_Driver : public ::cppu::WeakImplHelper2< ::com::sun::star::sdbc::XDriver,::com::sun::star::lang::XServiceInfo>
{
- ::comphelper::ComponentContext m_aContext;
+ css::uno::Reference<css::uno::XComponentContext> m_aContext;
::comphelper::ResourceBasedEventLogger m_aLogger;
protected:
virtual ~java_sql_Driver();
public:
- java_sql_Driver(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory);
+ java_sql_Driver(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext);
static rtl::OUString getImplementationName_Static( ) throw(::com::sun::star::uno::RuntimeException);
static ::com::sun::star::uno::Sequence< ::rtl::OUString > getSupportedServiceNames_Static( ) throw (::com::sun::star::uno::RuntimeException);
@@ -59,7 +57,7 @@ namespace connectivity
virtual sal_Int32 SAL_CALL getMajorVersion( ) throw(::com::sun::star::uno::RuntimeException) ;
virtual sal_Int32 SAL_CALL getMinorVersion( ) throw(::com::sun::star::uno::RuntimeException);
- const ::comphelper::ComponentContext& getContext() const { return m_aContext; }
+ const css::uno::Reference<css::uno::XComponentContext>& getContext() const { return m_aContext; }
const ::comphelper::ResourceBasedEventLogger& getLogger() const { return m_aLogger; }
};
diff --git a/connectivity/source/manager/mdrivermanager.cxx b/connectivity/source/manager/mdrivermanager.cxx
index 68411e7..a763d9f 100644
--- a/connectivity/source/manager/mdrivermanager.cxx
+++ b/connectivity/source/manager/mdrivermanager.cxx
@@ -30,6 +30,7 @@
#include <tools/diagnose_ex.h>
#include <comphelper/extract.hxx>
#include <comphelper/stl_types.hxx>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/implbase1.hxx>
#include <cppuhelper/weakref.hxx>
#include <osl/diagnose.h>
@@ -534,8 +535,7 @@ Sequence< ::rtl::OUString > SAL_CALL OSDBCDriverManager::getSupportedServiceName
//--------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OSDBCDriverManager::Create( const Reference< XMultiServiceFactory >& _rxFactory )
{
- ::comphelper::ComponentContext aContext( _rxFactory );
- return *( new OSDBCDriverManager( aContext.getUNOContext() ) );
+ return *( new OSDBCDriverManager( comphelper::getComponentContext(_rxFactory) ) );
}
//--------------------------------------------------------------------------
diff --git a/dbaccess/inc/pch/precompiled_dbu.hxx b/dbaccess/inc/pch/precompiled_dbu.hxx
index b385a5c..193a2d2 100644
--- a/dbaccess/inc/pch/precompiled_dbu.hxx
+++ b/dbaccess/inc/pch/precompiled_dbu.hxx
@@ -286,7 +286,6 @@
#include <com/sun/star/view/XSelectionSupplier.hpp>
#include <comphelper/basicio.hxx>
#include <comphelper/classids.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/containermultiplexer.hxx>
#include <comphelper/enumhelper.hxx>
#include <comphelper/extract.hxx>
diff --git a/dbaccess/source/core/api/OptimisticSet.cxx b/dbaccess/source/core/api/OptimisticSet.cxx
index 816b9d8..8ff2da8 100644
--- a/dbaccess/source/core/api/OptimisticSet.cxx
+++ b/dbaccess/source/core/api/OptimisticSet.cxx
@@ -84,14 +84,14 @@ namespace
DBG_NAME(OptimisticSet)
-OptimisticSet::OptimisticSet(const ::comphelper::ComponentContext& _rContext,
+OptimisticSet::OptimisticSet(const Reference<XComponentContext>& _rContext,
const Reference< XConnection>& i_xConnection,
const Reference< XSingleSelectQueryAnalyzer >& _xComposer,
const ORowSetValueVector& _aParameterValueForCache,
sal_Int32 i_nMaxRows,
sal_Int32& o_nRowCount)
:OKeySet(NULL,NULL,::rtl::OUString(),_xComposer,_aParameterValueForCache,i_nMaxRows,o_nRowCount)
- ,m_aSqlParser( _rContext.getUNOContext() )
+ ,m_aSqlParser( _rContext )
,m_aSqlIterator( i_xConnection, Reference<XTablesSupplier>(_xComposer,UNO_QUERY)->getTables(), m_aSqlParser, NULL )
,m_bResultSetChanged(false)
{
diff --git a/dbaccess/source/core/api/OptimisticSet.hxx b/dbaccess/source/core/api/OptimisticSet.hxx
index 0e97233..da6c034 100644
--- a/dbaccess/source/core/api/OptimisticSet.hxx
+++ b/dbaccess/source/core/api/OptimisticSet.hxx
@@ -29,7 +29,6 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <com/sun/star/sdb/XSingleSelectQueryAnalyzer.hpp>
#include <comphelper/stl_types.hxx>
-#include <comphelper/componentcontext.hxx>
namespace dbaccess
{
@@ -53,7 +52,7 @@ namespace dbaccess
virtual void makeNewStatement( );
virtual ~OptimisticSet();
public:
- OptimisticSet(const ::comphelper::ComponentContext& _rContext,
+ OptimisticSet(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext>& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& i_xConnection,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xComposer,
const ORowSetValueVector& _aParameterValueForCache,
diff --git a/dbaccess/source/core/api/RowSet.cxx b/dbaccess/source/core/api/RowSet.cxx
index c946f66..17437c9 100644
--- a/dbaccess/source/core/api/RowSet.cxx
+++ b/dbaccess/source/core/api/RowSet.cxx
@@ -56,7 +56,7 @@
#include <com/sun/star/uno/XNamingService.hpp>
#include <com/sun/star/util/XNumberFormatsSupplier.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/extract.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/property.hxx>
@@ -130,12 +130,12 @@ namespace dbaccess
Reference< XInterface > ORowSet_CreateInstance(const Reference< XMultiServiceFactory >& _rxFactory)
{
- return *(new ORowSet(_rxFactory));
+ return *(new ORowSet( comphelper::getComponentContext(_rxFactory) ));
}
-ORowSet::ORowSet( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB )
+ORowSet::ORowSet( const Reference< ::com::sun::star::uno::XComponentContext >& _rxContext )
:ORowSet_BASE1(m_aMutex)
- ,ORowSetBase( _rxORB, ORowSet_BASE1::rBHelper, &m_aMutex )
+ ,ORowSetBase( _rxContext, ORowSet_BASE1::rBHelper, &m_aMutex )
,m_pParameters( NULL )
,m_aRowsetListeners(*m_pMutex)
,m_aApproveListeners(*m_pMutex)
@@ -509,8 +509,7 @@ Sequence< OUString > SAL_CALL ORowSet::getSupportedServiceNames( ) throw(Runtim
Reference< XInterface > ORowSet::Create(const Reference< XComponentContext >& _rxContext)
{
- ::comphelper::ComponentContext aContext( _rxContext );
- return ORowSet_CreateInstance( aContext.getLegacyServiceFactory() );
+ return *(new ORowSet( _rxContext ));
}
// OComponentHelper
@@ -1464,7 +1463,7 @@ void SAL_CALL ORowSet::executeWithCompletion( const Reference< XInteractionHandl
calcConnection( _rxHandler );
m_bRebuildConnOnExecute = sal_False;
- Reference< XSingleSelectQueryComposer > xComposer = getCurrentSettingsComposer( this, m_aContext.getUNOContext() );
+ Reference< XSingleSelectQueryComposer > xComposer = getCurrentSettingsComposer( this, m_aContext );
Reference<XParametersSupplier> xParameters(xComposer, UNO_QUERY);
Reference<XIndexAccess> xParamsAsIndicies = xParameters.is() ? xParameters->getParameters() : Reference<XIndexAccess>();
@@ -2159,7 +2158,7 @@ Reference< XConnection > ORowSet::calcConnection(const Reference< XInteractionH
Reference< XConnection > xNewConn;
if ( !m_aDataSourceName.isEmpty() )
{
- Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(m_aContext.getUNOContext()) );
+ Reference< XDatabaseContext > xDatabaseContext( DatabaseContext::create(m_aContext) );
try
{
Reference< XDataSource > xDataSource( xDatabaseContext->getByName( m_aDataSourceName ), UNO_QUERY_THROW );
@@ -2721,7 +2720,7 @@ void ORowSet::impl_rebuild_throw(::osl::ResettableMutexGuard& _rGuard)
// ***********************************************************
DBG_NAME(ORowSetClone);
-ORowSetClone::ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex )
+ORowSetClone::ORowSetClone( const Reference<XComponentContext>& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex )
:OSubComponent(m_aMutex, rParent)
,ORowSetBase( _rContext, OComponentHelper::rBHelper, _pMutex )
,m_pParent(&rParent)
diff --git a/dbaccess/source/core/api/RowSet.hxx b/dbaccess/source/core/api/RowSet.hxx
index 9a0aee6..0e3558a 100644
--- a/dbaccess/source/core/api/RowSet.hxx
+++ b/dbaccess/source/core/api/RowSet.hxx
@@ -243,7 +243,7 @@ namespace dbaccess
virtual ~ORowSet();
public:
- ORowSet(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&);
+ ORowSet(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&);
// com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);
@@ -475,7 +475,7 @@ namespace dbaccess
virtual void SAL_CALL setFastPropertyValue_NoBroadcast(sal_Int32 nHandle,const ::com::sun::star::uno::Any& rValue) throw (::com::sun::star::uno::Exception);
public:
- ORowSetClone( const ::comphelper::ComponentContext& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex );
+ ORowSetClone( const css::uno::Reference<css::uno::XComponentContext>& _rContext, ORowSet& rParent, ::osl::Mutex* _pMutex );
virtual ~ORowSetClone();
// com::sun::star::lang::XTypeProvider
diff --git a/dbaccess/source/core/api/RowSetBase.cxx b/dbaccess/source/core/api/RowSetBase.cxx
index e9a12da..80f2c46 100644
--- a/dbaccess/source/core/api/RowSetBase.cxx
+++ b/dbaccess/source/core/api/RowSetBase.cxx
@@ -83,7 +83,7 @@ connectivity::sdbcx::ObjectType OEmptyCollection::createObject(const ::rtl::OUSt
// =========================================================================
DBG_NAME(ORowSetBase)
-ORowSetBase::ORowSetBase( const ::comphelper::ComponentContext& _rContext, ::cppu::OBroadcastHelper& _rBHelper, ::osl::Mutex* _pMutex )
+ORowSetBase::ORowSetBase( const Reference<XComponentContext>& _rContext, ::cppu::OBroadcastHelper& _rBHelper, ::osl::Mutex* _pMutex )
:OPropertyStateContainer(_rBHelper)
,m_pMutex(_pMutex)
,m_pCache(NULL)
@@ -91,7 +91,7 @@ ORowSetBase::ORowSetBase( const ::comphelper::ComponentContext& _rContext, ::cpp
,m_rBHelper(_rBHelper)
,m_pEmptyCollection( NULL )
,m_aContext( _rContext )
- ,m_aErrors( _rContext.getUNOContext() )
+ ,m_aErrors( _rContext )
,m_nLastColumnIndex(-1)
,m_nDeletedPosition(-1)
,m_nResultSetType( ResultSetType::FORWARD_ONLY )
diff --git a/dbaccess/source/core/api/RowSetBase.hxx b/dbaccess/source/core/api/RowSetBase.hxx
index 898ffd1..31660e9 100644
--- a/dbaccess/source/core/api/RowSetBase.hxx
+++ b/dbaccess/source/core/api/RowSetBase.hxx
@@ -41,7 +41,6 @@
#include <comphelper/broadcasthelper.hxx>
#include "RowSetCacheIterator.hxx"
#include "core_resource.hxx"
-#include <comphelper/componentcontext.hxx>
#include <functional>
@@ -97,7 +96,7 @@ namespace dbaccess
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatTypes> m_xNumberFormatTypes;
OEmptyCollection* m_pEmptyCollection;
- ::comphelper::ComponentContext m_aContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_aContext;
::connectivity::SQLError m_aErrors;
sal_Int32 m_nLastColumnIndex; // the last column ask for, used for wasNull()
@@ -112,7 +111,7 @@ namespace dbaccess
protected:
ORowSetBase(
- const ::comphelper::ComponentContext& _rContext,
+ const css::uno::Reference<css::uno::XComponentContext>& _rContext,
::cppu::OBroadcastHelper& _rBHelper,
::osl::Mutex* _pMutex
);
diff --git a/dbaccess/source/core/api/RowSetCache.cxx b/dbaccess/source/core/api/RowSetCache.cxx
index 3489688..f6506fa 100644
--- a/dbaccess/source/core/api/RowSetCache.cxx
+++ b/dbaccess/source/core/api/RowSetCache.cxx
@@ -82,7 +82,7 @@ DBG_NAME(ORowSetCache)
ORowSetCache::ORowSetCache(const Reference< XResultSet >& _xRs,
const Reference< XSingleSelectQueryAnalyzer >& _xAnalyzer,
- const ::comphelper::ComponentContext& _rContext,
+ const Reference<XComponentContext>& _rContext,
const ::rtl::OUString& _rUpdateTableName,
sal_Bool& _bModified,
sal_Bool& _bNew,
@@ -1580,7 +1580,7 @@ sal_Bool ORowSetCache::checkJoin(const Reference< XConnection>& _xConnection,
sal_Bool bOk = sal_False;
::rtl::OUString sSql = _xAnalyzer->getQuery();
::rtl::OUString sErrorMsg;
- ::connectivity::OSQLParser aSqlParser( m_aContext.getUNOContext() );
+ ::connectivity::OSQLParser aSqlParser( m_aContext );
SAL_WNODEPRECATED_DECLARATIONS_PUSH
::std::auto_ptr< ::connectivity::OSQLParseNode> pSqlParseNode( aSqlParser.parseTree(sErrorMsg,sSql));
SAL_WNODEPRECATED_DECLARATIONS_POP
diff --git a/dbaccess/source/core/api/RowSetCache.hxx b/dbaccess/source/core/api/RowSetCache.hxx
index 2a315d9..6eabf0d 100644
--- a/dbaccess/source/core/api/RowSetCache.hxx
+++ b/dbaccess/source/core/api/RowSetCache.hxx
@@ -37,7 +37,6 @@
#include <com/sun/star/sdbcx/XDeleteRows.hpp>
#include <cppuhelper/compbase11.hxx>
#include <comphelper/propertycontainer.hxx>
-#include <comphelper/componentcontext.hxx>
#include <cppuhelper/implbase5.hxx>
#include <comphelper/proparrhlp.hxx>
#include "RowSetRow.hxx"
@@ -64,7 +63,7 @@ namespace dbaccess
//the set can be static, bookmarkable or keyset
::com::sun::star::uno::WeakReference< ::com::sun::star::sdbc::XResultSet> m_xSet;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSetMetaData > m_xMetaData; // must be before m_aInsertRow
- ::comphelper::ComponentContext m_aContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow> m_xCacheSet;
@@ -137,7 +136,7 @@ namespace dbaccess
public:
ORowSetCache(const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XResultSet >& _xRs,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdb::XSingleSelectQueryAnalyzer >& _xAnalyzer,
- const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext,
const ::rtl::OUString& _rUpdateTableName,
sal_Bool& _bModified,
sal_Bool& _bNew,
diff --git a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
index f10af65..a6e6429 100644
--- a/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
+++ b/dbaccess/source/core/api/SingleSelectQueryComposer.cxx
@@ -223,10 +223,10 @@ DBG_NAME(OSingleSelectQueryComposer)
OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAccess>& _rxTables,
const Reference< XConnection>& _xConnection,
- const ::comphelper::ComponentContext& _rContext )
+ const Reference<XComponentContext>& _rContext )
:OSubComponent(m_aMutex,_xConnection)
,OPropertyContainer(m_aBHelper)
- ,m_aSqlParser( _rContext.getUNOContext() )
+ ,m_aSqlParser( _rContext )
,m_aSqlIterator( _xConnection, _rxTables, m_aSqlParser, NULL )
,m_aAdditiveIterator( _xConnection, _rxTables, m_aSqlParser, NULL )
,m_aElementaryParts( (size_t)SQLPartCount )
@@ -249,8 +249,8 @@ OSingleSelectQueryComposer::OSingleSelectQueryComposer(const Reference< XNameAcc
m_aCurrentColumns.resize(4);
m_aLocale = SvtSysLocale().GetLanguageTag().getLocale();
- m_xNumberFormatsSupplier = dbtools::getNumberFormats( m_xConnection, sal_True, m_aContext.getUNOContext() );
- Reference< XLocaleData4 > xLocaleData( LocaleData::create(m_aContext.getUNOContext()) );
+ m_xNumberFormatsSupplier = dbtools::getNumberFormats( m_xConnection, sal_True, m_aContext );
+ Reference< XLocaleData4 > xLocaleData( LocaleData::create(m_aContext) );
LocaleDataItem aData = xLocaleData->getLocaleItem(m_aLocale);
m_sDecimalSep = aData.decimalSeparator;
OSL_ENSURE(m_sDecimalSep.getLength() == 1,"OSingleSelectQueryComposer::OSingleSelectQueryComposer decimal separator is not 1 length");
@@ -1507,14 +1507,14 @@ namespace
void SAL_CALL OSingleSelectQueryComposer::setStructuredFilter( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, ::com::sun::star::lang::IllegalArgumentException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen at sun.com", "OSingleSelectQueryComposer::setStructuredFilter" );
- OPredicateInputController aPredicateInput(m_aContext.getUNOContext(),m_xConnection);
+ OPredicateInputController aPredicateInput(m_aContext, m_xConnection);
setFilter(lcl_getCondition(filter,aPredicateInput,getColumns()));
}
void SAL_CALL OSingleSelectQueryComposer::setStructuredHavingClause( const Sequence< Sequence< PropertyValue > >& filter ) throw (SQLException, RuntimeException)
{
RTL_LOGFILE_CONTEXT_AUTHOR( aLogger, "dbaccess", "Ocke.Janssen at sun.com", "OSingleSelectQueryComposer::setStructuredHavingClause" );
- OPredicateInputController aPredicateInput(m_aContext.getUNOContext(),m_xConnection);
+ OPredicateInputController aPredicateInput(m_aContext, m_xConnection);
setHavingClause(lcl_getCondition(filter,aPredicateInput,getColumns()));
}
@@ -1583,7 +1583,7 @@ void OSingleSelectQueryComposer::setConditionByColumn( const Reference< XPropert
if ( aValue.hasValue() )
{
if( !m_xTypeConverter.is() )
- m_xTypeConverter.set( Converter::create(m_aContext.getUNOContext()) );
+ m_xTypeConverter.set( Converter::create(m_aContext) );
OSL_ENSURE(m_xTypeConverter.is(),"NO typeconverter!");
if ( nType != DataType::BOOLEAN && DataType::BIT != nType )
@@ -1736,7 +1736,7 @@ Sequence< Sequence< PropertyValue > > OSingleSelectQueryComposer::getStructuredC
if ( pCondition )
{
::std::vector< ::std::vector < PropertyValue > > aFilters;
- Reference< XNumberFormatter > xFormatter( NumberFormatter::create(m_aContext.getUNOContext()), UNO_QUERY_THROW );
+ Reference< XNumberFormatter > xFormatter( NumberFormatter::create(m_aContext), UNO_QUERY_THROW );
xFormatter->attachNumberFormatsSupplier( m_xNumberFormatsSupplier );
if (setORCriteria(pCondition, m_aAdditiveIterator, aFilters, xFormatter))
diff --git a/dbaccess/source/core/api/query.cxx b/dbaccess/source/core/api/query.cxx
index 5d78f7f..ed1f073 100644
--- a/dbaccess/source/core/api/query.cxx
+++ b/dbaccess/source/core/api/query.cxx
@@ -73,7 +73,7 @@ DBG_NAME(OQuery)
OQuery::OQuery( const Reference< XPropertySet >& _rxCommandDefinition
,const Reference< XConnection >& _rxConn
- ,const Reference< XMultiServiceFactory >& _xORB)
+ ,const Reference< XComponentContext >& _xORB)
:OContentHelper(_xORB,NULL,TContentPtr(new OContentHelper_Impl))
,OQueryDescriptor_Base(m_aMutex,*this)
,ODataSettings(OContentHelper::rBHelper,sal_True)
diff --git a/dbaccess/source/core/api/query.hxx b/dbaccess/source/core/api/query.hxx
index 456454b..7a95a37 100644
--- a/dbaccess/source/core/api/query.hxx
+++ b/dbaccess/source/core/api/query.hxx
@@ -100,7 +100,7 @@ public:
OQuery(
const ::com::sun::star::uno::Reference< ::com::sun::star::beans::XPropertySet >& _rxCommandDefinition,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxConn,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
);
// com::sun::star::lang::XTypeProvider
diff --git a/dbaccess/source/core/api/querycontainer.cxx b/dbaccess/source/core/api/querycontainer.cxx
index 90961e5..6ffb474 100644
--- a/dbaccess/source/core/api/querycontainer.cxx
+++ b/dbaccess/source/core/api/querycontainer.cxx
@@ -66,7 +66,7 @@ DBG_NAME(OQueryContainer)
OQueryContainer::OQueryContainer(
const Reference< XNameContainer >& _rxCommandDefinitions
, const Reference< XConnection >& _rxConn
- , const Reference< XMultiServiceFactory >& _rxORB,
+ , const Reference< XComponentContext >& _rxORB,
::dbtools::IWarningsContainer* _pWarnings)
:ODefinitionContainer(_rxORB,NULL,TContentPtr(new ODefinitionContainer_Impl))
,m_pWarnings( _pWarnings )
@@ -154,7 +154,9 @@ void SAL_CALL OQueryContainer::appendByDescriptor( const Reference< XPropertySet
throw DisposedException( ::rtl::OUString(), *this );
// first clone this object's CommandDefinition part
- Reference< XPropertySet > xCommandDefinitionPart( m_aContext.createComponent( (::rtl::OUString)SERVICE_SDB_QUERYDEFINITION ), UNO_QUERY_THROW );
+ Reference< XPropertySet > xCommandDefinitionPart(
+ m_aContext->getServiceManager()->createInstanceWithContext( SERVICE_SDB_QUERYDEFINITION, m_aContext),
+ UNO_QUERY_THROW );
::comphelper::copyProperties( _rxDesc, xCommandDefinitionPart );
// TODO : the columns part of the descriptor has to be copied
@@ -343,11 +345,11 @@ Reference< XContent > OQueryContainer::implCreateWrapper(const Reference< XConte
Reference< XContent > xReturn;
if ( xContainer .is() )
{
- xReturn = new OQueryContainer( xContainer, m_xConnection, m_aContext.getLegacyServiceFactory(), m_pWarnings );
+ xReturn = new OQueryContainer( xContainer, m_xConnection, m_aContext, m_pWarnings );
}
else
{
- OQuery* pNewObject = new OQuery( Reference< XPropertySet >( _rxCommandDesc, UNO_QUERY ), m_xConnection, m_aContext.getLegacyServiceFactory() );
+ OQuery* pNewObject = new OQuery( Reference< XPropertySet >( _rxCommandDesc, UNO_QUERY ), m_xConnection, m_aContext );
xReturn = pNewObject;
pNewObject->setWarningsContainer( m_pWarnings );
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
index 384d98d..8266b65 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.cxx
@@ -31,7 +31,6 @@
#include <comphelper/property.hxx>
#include "definitioncolumn.hxx"
#include <cppuhelper/implbase1.hxx>
-#include <comphelper/componentcontext.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
@@ -126,7 +125,7 @@ void OComponentDefinition::registerProperties()
}
}
-OComponentDefinition::OComponentDefinition(const Reference< XMultiServiceFactory >& _xORB
+OComponentDefinition::OComponentDefinition(const Reference< XComponentContext >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTable)
@@ -146,7 +145,7 @@ OComponentDefinition::~OComponentDefinition()
OComponentDefinition::OComponentDefinition( const Reference< XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
- ,const Reference< XMultiServiceFactory >& _xORB
+ ,const Reference< XComponentContext >& _xORB
,const TContentPtr& _pImpl
,sal_Bool _bTable)
:OContentHelper(_xORB,_rxContainer,_pImpl)
@@ -190,8 +189,7 @@ Sequence< ::rtl::OUString > SAL_CALL OComponentDefinition::getSupportedServiceNa
Reference< XInterface > OComponentDefinition::Create( const Reference< XComponentContext >& _rxContext )
{
- ::comphelper::ComponentContext aContext( _rxContext );
- return *(new OComponentDefinition( aContext.getLegacyServiceFactory(), NULL, TContentPtr( new OComponentDefinition_Impl ) ) );
+ return *(new OComponentDefinition( _rxContext, NULL, TContentPtr( new OComponentDefinition_Impl ) ) );
}
void SAL_CALL OComponentDefinition::disposing()
diff --git a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
index fa0901d..0f9ff09 100644
--- a/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
+++ b/dbaccess/source/core/dataaccess/ComponentDefinition.hxx
@@ -103,7 +103,7 @@ protected:
protected:
- OComponentDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
+ OComponentDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTable = sal_True);
@@ -115,7 +115,7 @@ public:
OComponentDefinition(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
,const TContentPtr& _pImpl
,sal_Bool _bTable = sal_True
);
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 87b6480..2fbb2fa 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -61,15 +61,15 @@ OContentHelper_Impl::~OContentHelper_Impl()
DBG_DTOR(OContentHelper_Impl,NULL);
}
-OContentHelper::OContentHelper(const Reference< XMultiServiceFactory >& _xORB
+OContentHelper::OContentHelper(const Reference< XComponentContext >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl)
: OContentHelper_COMPBASE(m_aMutex)
,m_aContentListeners(m_aMutex)
,m_aPropertyChangeListeners(m_aMutex)
- ,m_xParentContainer(_xParentContainer)
+ ,m_xParentContainer( _xParentContainer )
,m_aContext( _xORB )
- ,m_aErrorHelper( m_aContext.getUNOContext() )
+ ,m_aErrorHelper( m_aContext )
,m_pImpl(_pImpl)
,m_nCommandId(0)
{
@@ -423,7 +423,7 @@ Reference< XRow > OContentHelper::getPropertyValues( const Sequence< Property >&
{
// Note: Empty sequence means "get values of all supported properties".
- rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_aContext.getUNOContext() );
+ rtl::Reference< ::ucbhelper::PropertyValueSet > xRow = new ::ucbhelper::PropertyValueSet( m_aContext );
sal_Int32 nCount = rProperties.getLength();
if ( nCount )
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.cxx b/dbaccess/source/core/dataaccess/ModelImpl.cxx
index 2d77fc1..6121644 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.cxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.cxx
@@ -403,7 +403,7 @@ void SAL_CALL DocumentStorageAccess::disposing( const css::lang::EventObject& So
//============================================================
DBG_NAME(ODatabaseModelImpl)
-ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >& _rxFactory, ODatabaseContext& _rDBContext )
+ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XComponentContext >& _rxContext, ODatabaseContext& _rDBContext )
:m_xModel()
,m_xDataSource()
,m_pStorageAccess( NULL )
@@ -417,7 +417,7 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >&
,m_aEmbeddedMacros()
,m_bModificationLock( false )
,m_bDocumentInitialized( false )
- ,m_aContext( _rxFactory )
+ ,m_aContext( _rxContext )
,m_nLoginTimeout(0)
,m_bReadOnly(sal_False)
,m_bPasswordRequired(sal_False)
@@ -437,7 +437,7 @@ ODatabaseModelImpl::ODatabaseModelImpl( const Reference< XMultiServiceFactory >&
ODatabaseModelImpl::ODatabaseModelImpl(
const ::rtl::OUString& _rRegistrationName,
- const Reference< XMultiServiceFactory >& _rxFactory,
+ const Reference< XComponentContext >& _rxContext,
ODatabaseContext& _rDBContext
)
:m_xModel()
@@ -453,7 +453,7 @@ ODatabaseModelImpl::ODatabaseModelImpl(
,m_aEmbeddedMacros()
,m_bModificationLock( false )
,m_bDocumentInitialized( false )
- ,m_aContext( _rxFactory )
+ ,m_aContext( _rxContext )
,m_sName(_rRegistrationName)
,m_nLoginTimeout(0)
,m_bReadOnly(sal_False)
@@ -492,7 +492,7 @@ void ODatabaseModelImpl::impl_construct_nothrow()
aInitArgs[0] <<= NamedValue("AutomaticAddition", makeAny( (sal_Bool)sal_True ));
aInitArgs[1] <<= NamedValue("AllowedTypes", makeAny( aAllowedTypes ));
- m_xSettings.set( m_aContext.createComponentWithArguments( "com.sun.star.beans.PropertyBag", aInitArgs ), UNO_QUERY_THROW );
+ m_xSettings.set( m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.beans.PropertyBag", aInitArgs, m_aContext), UNO_QUERY_THROW );
// insert the default settings
Reference< XPropertyContainer > xContainer( m_xSettings, UNO_QUERY_THROW );
@@ -757,7 +757,7 @@ const Reference< XNumberFormatsSupplier > & ODatabaseModelImpl::getNumberFormats
UserInformation aUserInfo;
Locale aLocale = aUserInfo.getUserLanguage();
- m_xNumberFormatsSupplier.set( NumberFormatsSupplier::createWithLocale( m_aContext.getUNOContext(), aLocale ) );
+ m_xNumberFormatsSupplier.set( NumberFormatsSupplier::createWithLocale( m_aContext, aLocale ) );
}
return m_xNumberFormatsSupplier;
}
@@ -810,7 +810,7 @@ void ODatabaseModelImpl::disposeStorages() SAL_THROW(())
Reference< XSingleServiceFactory > ODatabaseModelImpl::createStorageFactory() const
{
- return StorageFactory::create( m_aContext.getUNOContext() );
+ return StorageFactory::create( m_aContext );
}
void ODatabaseModelImpl::commitRootStorage()
@@ -828,7 +828,7 @@ Reference< XStorage > ODatabaseModelImpl::getOrCreateRootStorage()
{
if ( !m_xDocumentStorage.is() )
{
- Reference< XSingleServiceFactory> xStorageFactory = StorageFactory::create( m_aContext.getUNOContext() );
+ Reference< XSingleServiceFactory> xStorageFactory = StorageFactory::create( m_aContext );
Any aSource;
aSource = m_aMediaDescriptor.get( "Stream" );
if ( !aSource.hasValue() )
@@ -965,7 +965,7 @@ Reference< XModel > ODatabaseModelImpl::createNewModel_deliverOwnership( bool _b
try
{
- Reference< XGlobalEventBroadcaster > xModelCollection = GlobalEventBroadcaster::create( m_aContext.getUNOContext() );
+ Reference< XGlobalEventBroadcaster > xModelCollection = GlobalEventBroadcaster::create( m_aContext );
xModelCollection->insert( makeAny( xModel ) );
}
catch( const Exception& )
@@ -1157,7 +1157,7 @@ Reference< XStorageBasedLibraryContainer > ODatabaseModelImpl::getLibraryContain
= _bScript ? &DocumentScriptLibraryContainer::create : &DocumentDialogLibraryContainer::create;
rxContainer.set(
- (*Factory)( m_aContext.getUNOContext(), xDocument ),
+ (*Factory)( m_aContext, xDocument ),
UNO_QUERY_THROW
);
}
diff --git a/dbaccess/source/core/dataaccess/ModelImpl.hxx b/dbaccess/source/core/dataaccess/ModelImpl.hxx
index ab56f74..194b6a2 100644
--- a/dbaccess/source/core/dataaccess/ModelImpl.hxx
+++ b/dbaccess/source/core/dataaccess/ModelImpl.hxx
@@ -39,7 +39,6 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XStorable.hpp>
#include <com/sun/star/lang/NotInitializedException.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XSingleServiceFactory.hpp>
#include <com/sun/star/sdb/XBookmarksSupplier.hpp>
@@ -225,7 +224,7 @@ private:
public:
OWeakConnectionArray m_aConnections;
- const ::comphelper::ComponentContext m_aContext;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_aContext;
public:
::com::sun::star::uno::WeakReference< ::com::sun::star::container::XNameAccess > m_xCommandDefinitions;
@@ -277,14 +276,14 @@ public:
SAL_THROW(( ::com::sun::star::io::IOException, ::com::sun::star::uno::RuntimeException ));
ODatabaseModelImpl(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
ODatabaseContext& _pDBContext
);
virtual ~ODatabaseModelImpl();
ODatabaseModelImpl(
const ::rtl::OUString& _rRegistrationName,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxFactory,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext,
ODatabaseContext& _rDBContext
);
diff --git a/dbaccess/source/core/dataaccess/commandcontainer.cxx b/dbaccess/source/core/dataaccess/commandcontainer.cxx
index 245f98b..f665df2 100644
--- a/dbaccess/source/core/dataaccess/commandcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/commandcontainer.cxx
@@ -42,7 +42,7 @@ namespace dbaccess
//==========================================================================
DBG_NAME(OCommandContainer)
-OCommandContainer::OCommandContainer( const Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
+OCommandContainer::OCommandContainer( const Reference< ::com::sun::star::uno::XComponentContext >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTables
@@ -68,8 +68,8 @@ Reference< XContent > OCommandContainer::createObject( const ::rtl::OUString& _r
const TContentPtr& pElementContent( rDefinitions.find( _rName )->second );
if ( m_bTables )
- return new OComponentDefinition( *this, _rName, m_aContext.getLegacyServiceFactory(), pElementContent, m_bTables );
- return new OCommandDefinition( *this, _rName, m_aContext.getLegacyServiceFactory(), pElementContent );
+ return new OComponentDefinition( *this, _rName, m_aContext, pElementContent, m_bTables );
+ return new OCommandDefinition( *this, _rName, m_aContext, pElementContent );
}
Reference< XInterface > SAL_CALL OCommandContainer::createInstanceWithArguments(const Sequence< Any >& /*aArguments*/ ) throw (Exception, RuntimeException)
@@ -80,9 +80,9 @@ Reference< XInterface > SAL_CALL OCommandContainer::createInstanceWithArguments(
Reference< XInterface > SAL_CALL OCommandContainer::createInstance( ) throw (Exception, RuntimeException)
{
if(m_bTables)
- return com::sun::star::sdb::TableDefinition::createDefault( m_aContext.getUNOContext() );
+ return com::sun::star::sdb::TableDefinition::createDefault( m_aContext );
else
- return m_aContext.createComponent( (::rtl::OUString)( SERVICE_SDB_COMMAND_DEFINITION ) );
+ return m_aContext->getServiceManager()->createInstanceWithContext(SERVICE_SDB_COMMAND_DEFINITION, m_aContext);
}
OUString OCommandContainer::determineContentType() const
diff --git a/dbaccess/source/core/dataaccess/commandcontainer.hxx b/dbaccess/source/core/dataaccess/commandcontainer.hxx
index b270cb1..39ddb15 100644
--- a/dbaccess/source/core/dataaccess/commandcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/commandcontainer.hxx
@@ -44,7 +44,7 @@ public:
/** constructs the container.<BR>
*/
OCommandContainer(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
,sal_Bool _bTables
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.cxx b/dbaccess/source/core/dataaccess/commanddefinition.cxx
index a6998f4..560b977 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.cxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.cxx
@@ -28,7 +28,6 @@
#include <tools/debug.hxx>
#include <comphelper/sequence.hxx>
-#include <comphelper/componentcontext.hxx>
using namespace ::com::sun::star::uno;
using namespace ::com::sun::star::sdbc;
@@ -73,7 +72,7 @@ void OCommandDefinition::registerProperties()
&rCommandDefinition.m_aLayoutInformation, ::getCppuType(&rCommandDefinition.m_aLayoutInformation));
}
-OCommandDefinition::OCommandDefinition(const Reference< XMultiServiceFactory >& _xORB
+OCommandDefinition::OCommandDefinition(const Reference< XComponentContext >& _xORB
,const Reference< XInterface >& _rxContainer
,const TContentPtr& _pImpl)
:OComponentDefinition(_xORB,_rxContainer,_pImpl,sal_False)
@@ -89,7 +88,7 @@ OCommandDefinition::~OCommandDefinition()
OCommandDefinition::OCommandDefinition( const Reference< XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
- ,const Reference< XMultiServiceFactory >& _xORB
+ ,const Reference< XComponentContext >& _xORB
,const TContentPtr& _pImpl)
:OComponentDefinition(_rxContainer,_rElementName,_xORB,_pImpl,sal_False)
{
@@ -128,8 +127,7 @@ Sequence< ::rtl::OUString > SAL_CALL OCommandDefinition::getSupportedServiceName
Reference< XInterface > OCommandDefinition::Create(const Reference< XComponentContext >& _rxContext)
{
- ::comphelper::ComponentContext aContext( _rxContext );
- return *(new OCommandDefinition( aContext.getLegacyServiceFactory(), NULL, TContentPtr( new OCommandDefinition_Impl ) ) );
+ return *(new OCommandDefinition( _rxContext, NULL, TContentPtr( new OCommandDefinition_Impl ) ) );
}
void SAL_CALL OCommandDefinition::rename( const ::rtl::OUString& newName ) throw (SQLException, ElementExistException, RuntimeException)
diff --git a/dbaccess/source/core/dataaccess/commanddefinition.hxx b/dbaccess/source/core/dataaccess/commanddefinition.hxx
index 448e119..f2a469b 100644
--- a/dbaccess/source/core/dataaccess/commanddefinition.hxx
+++ b/dbaccess/source/core/dataaccess/commanddefinition.hxx
@@ -60,7 +60,7 @@ class OCommandDefinition :public OComponentDefinition
protected:
virtual ~OCommandDefinition();
- OCommandDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
+ OCommandDefinition(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
);
@@ -73,7 +73,7 @@ public:
OCommandDefinition(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContainer
,const ::rtl::OUString& _rElementName
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&
,const TContentPtr& _pImpl
);
diff --git a/dbaccess/source/core/dataaccess/connection.cxx b/dbaccess/source/core/dataaccess/connection.cxx
index 12dafb6..5fa53ae 100644
--- a/dbaccess/source/core/dataaccess/connection.cxx
+++ b/dbaccess/source/core/dataaccess/connection.cxx
@@ -282,7 +282,7 @@ DBG_NAME(OConnection)
OConnection::OConnection(ODatabaseSource& _rDB
, Reference< XConnection >& _rxMaster
- , const Reference< XMultiServiceFactory >& _rxORB)
+ , const Reference< XComponentContext >& _rxORB)
:OSubComponent(m_aMutex, static_cast< OWeakObject* >(&_rDB))
// as the queries reroute their refcounting to us, this m_aMutex is okey. If the queries
// container would do it's own refcounting, it would have to aquire m_pMutex
@@ -305,8 +305,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
try
{
- Reference< XProxyFactory > xProxyFactory =
- ProxyFactory::create( m_aContext.getUNOContext() );
+ Reference< XProxyFactory > xProxyFactory = ProxyFactory::create( m_aContext );
Reference<XAggregation> xAgg = xProxyFactory->createProxy(_rxMaster.get());
setDelegation(xAgg,m_refCount);
OSL_ENSURE(m_xConnection.is(), "OConnection::OConnection : invalid master connection !");
@@ -320,7 +319,7 @@ OConnection::OConnection(ODatabaseSource& _rDB
try
{
- m_xQueries = new OQueryContainer(Reference< XNameContainer >(_rDB.getQueryDefinitions( ),UNO_QUERY), this,_rxORB, &m_aWarnings);
+ m_xQueries = new OQueryContainer(Reference< XNameContainer >(_rDB.getQueryDefinitions(), UNO_QUERY), this, _rxORB, &m_aWarnings);
sal_Bool bCase = sal_True;
Reference<XDatabaseMetaData> xMeta;
@@ -685,7 +684,11 @@ Reference< XInterface > SAL_CALL OConnection::createInstance( const OUString& _s
Sequence<Any> aArgs(1);
Reference<XConnection> xMy(this);
aArgs[0] <<= NamedValue("ActiveConnection",makeAny(xMy));
- aFind = m_aSupportServices.insert(TSupportServices::value_type(_sServiceSpecifier,m_aContext.createComponentWithArguments(_sServiceSpecifier,aArgs))).first;
+ aFind = m_aSupportServices.insert(
+ TSupportServices::value_type(
+ _sServiceSpecifier,
+ m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(_sServiceSpecifier, aArgs, m_aContext)
+ )).first;
}
return aFind->second;
}
@@ -717,7 +720,7 @@ Reference< XTablesSupplier > OConnection::getMasterTables()
{
Reference<XDatabaseMetaData> xMeta = getMetaData();
if ( xMeta.is() )
- m_xMasterTables = ::dbtools::getDataDefinitionByURLAndConnection( xMeta->getURL(), m_xMasterConnection, m_aContext.getUNOContext() );
+ m_xMasterTables = ::dbtools::getDataDefinitionByURLAndConnection( xMeta->getURL(), m_xMasterConnection, m_aContext );
}
catch(const SQLException&)
{
@@ -753,8 +756,9 @@ void OConnection::impl_loadConnectionTools_throw()
Sequence< Any > aArguments( 1 );
aArguments[0] <<= NamedValue( "Connection" , makeAny( Reference< XConnection >( this ) ) );
- if ( !m_aContext.createComponentWithArguments( "com.sun.star.sdb.tools.ConnectionTools", aArguments, m_xConnectionTools ) )
- throw RuntimeException( "service not registered: com.sun.star.sdb.tools.ConnectionTools" , *this );
+ m_xConnectionTools.set(
+ m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.sdb.tools.ConnectionTools", aArguments, m_aContext),
+ UNO_QUERY_THROW );
}
Reference< XTableName > SAL_CALL OConnection::createTableName( ) throw (RuntimeException)
diff --git a/dbaccess/source/core/dataaccess/connection.hxx b/dbaccess/source/core/dataaccess/connection.hxx
index 8a2efc5..1453424 100644
--- a/dbaccess/source/core/dataaccess/connection.hxx
+++ b/dbaccess/source/core/dataaccess/connection.hxx
@@ -43,7 +43,6 @@
#define COMPHELPER_IMPLBASE_INTERFACE_NUMBER 14
#include <comphelper/implbase_var.hxx>
#endif
-#include <comphelper/componentcontext.hxx>
#include <comphelper/stl_types.hxx>
#include <connectivity/ConnectionWrapper.hxx>
#include <connectivity/warningscontainer.hxx>
@@ -92,7 +91,7 @@ protected:
// the filter as set on the parent data link at construction of the connection
::com::sun::star::uno::Sequence< ::rtl::OUString > m_aTableFilter;
::com::sun::star::uno::Sequence< ::rtl::OUString > m_aTableTypeFilter;
- ::comphelper::ComponentContext m_aContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xMasterConnection;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::tools::XConnectionTools > m_xConnectionTools;
::com::sun::star::uno::Reference< ::com::sun::star::sdb::application::XTableUIProvider > m_xTableUIProvider;
@@ -116,7 +115,7 @@ protected:
public:
OConnection(ODatabaseSource& _rDB
,::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxMaster
- ,const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ ,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
// com::sun::star::lang::XTypeProvider
virtual ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Type > SAL_CALL getTypes() throw (::com::sun::star::uno::RuntimeException);
diff --git a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
index 197742c..be895d7 100644
--- a/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
+++ b/dbaccess/source/core/dataaccess/dataaccessdescriptor.cxx
@@ -29,7 +29,6 @@
#include <com/sun/star/sdb/XDataAccessDescriptorFactory.hpp>
#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/propertycontainer.hxx>
#include <comphelper/uno3.hxx>
@@ -83,7 +82,7 @@ namespace dbaccess
,public ::comphelper::OPropertyArrayUsageHelper< DataAccessDescriptor >
{
public:
- DataAccessDescriptor( const ::comphelper::ComponentContext& _rContext );
+ DataAccessDescriptor( const Reference<XComponentContext> & _rContext );
// UNO
DECLARE_XINTERFACE()
@@ -106,7 +105,7 @@ namespace dbaccess
virtual ::cppu::IPropertyArrayHelper* createArrayHelper( ) const;
private:
- ::comphelper::ComponentContext m_aContext;
+ Reference<XComponentContext> m_xContext;
// </properties>
::rtl::OUString m_sDataSourceName;
@@ -132,11 +131,11 @@ namespace dbaccess
#define REGISTER_PROPERTY( propname, member ) \
registerProperty( PROPERTY_##propname, PROPERTY_ID_##propname, PropertyAttribute::BOUND, &member, ::getCppuType( &member ) )
- DataAccessDescriptor::DataAccessDescriptor( const ::comphelper::ComponentContext& _rContext )
+ DataAccessDescriptor::DataAccessDescriptor( const Reference<XComponentContext> & _rContext )
:DataAccessDescriptor_MutexBase()
,DataAccessDescriptor_TypeBase()
,DataAccessDescriptor_PropertyBase( m_aBHelper )
- ,m_aContext( _rContext )
+ ,m_xContext( _rContext )
,m_sDataSourceName()
,m_sDatabaseLocation()
,m_sConnectionResource()
@@ -248,11 +247,11 @@ namespace dbaccess
~DataAccessDescriptorFactory();
private:
- ::comphelper::ComponentContext m_aContext;
+ Reference<XComponentContext> m_xContext;
};
DataAccessDescriptorFactory::DataAccessDescriptorFactory( const Reference< XComponentContext >& _rxContext )
- :m_aContext( _rxContext )
+ :m_xContext( _rxContext )
{
}
@@ -302,7 +301,7 @@ namespace dbaccess
Reference< XPropertySet > SAL_CALL DataAccessDescriptorFactory::createDataAccessDescriptor( ) throw (RuntimeException)
{
- return new DataAccessDescriptor( m_aContext );
+ return new DataAccessDescriptor( m_xContext );
}
} // namespace dbaccess
diff --git a/dbaccess/source/core/dataaccess/databasecontext.cxx b/dbaccess/source/core/dataaccess/databasecontext.cxx
index e01d432..5211222 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.cxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.cxx
@@ -238,7 +238,7 @@ Sequence< OUString > ODatabaseContext::getSupportedServiceNames( ) throw (Runti
Reference< XInterface > ODatabaseContext::impl_createNewDataSource()
{
- ::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( m_aContext.getLegacyServiceFactory(), *this ) );
+ ::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( m_aContext, *this ) );
Reference< XDataSource > xDataSource( pImpl->getOrCreateDataSource() );
return xDataSource.get();
@@ -352,7 +352,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
::rtl::Reference< ODatabaseModelImpl > pModelImpl;
{
- pModelImpl.set( new ODatabaseModelImpl( _rName, m_aContext.getLegacyServiceFactory(), *this ) );
+ pModelImpl.set( new ODatabaseModelImpl( _rName, m_aContext, *this ) );
Reference< XModel > xModel( pModelImpl->createNewModel_deliverOwnership( false ), UNO_SET_THROW );
Reference< XLoadable > xLoad( xModel, UNO_QUERY_THROW );
@@ -360,7 +360,7 @@ Reference< XInterface > ODatabaseContext::loadObjectFromURL(const OUString& _rNa
::comphelper::NamedValueCollection aArgs;
aArgs.put( "URL", _sURL );
aArgs.put( "MacroExecutionMode", MacroExecMode::USE_CONFIG );
- aArgs.put( "InteractionHandler", task::InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
+ aArgs.put( "InteractionHandler", task::InteractionHandler::createWithParent(m_aContext, 0) );
Sequence< PropertyValue > aResource( aArgs.getPropertyValues() );
xLoad->load( aResource );
diff --git a/dbaccess/source/core/dataaccess/databasecontext.hxx b/dbaccess/source/core/dataaccess/databasecontext.hxx
index 7f99ea7..03fa975 100644
--- a/dbaccess/source/core/dataaccess/databasecontext.hxx
+++ b/dbaccess/source/core/dataaccess/databasecontext.hxx
@@ -38,7 +38,6 @@
#include <com/sun/star/uno/XAggregation.hpp>
#include <basic/basicmanagerrepository.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/stl_types.hxx>
#include <cppuhelper/compbase3.hxx>
#include <cppuhelper/interfacecontainer.hxx>
@@ -94,7 +93,8 @@ private:
protected:
::osl::Mutex m_aMutex;
- ::comphelper::ComponentContext m_aContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
m_xDBRegistrationAggregate;
diff --git a/dbaccess/source/core/dataaccess/databasedocument.cxx b/dbaccess/source/core/dataaccess/databasedocument.cxx
index b1f5308..41ba7dd 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.cxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.cxx
@@ -487,7 +487,7 @@ void ODatabaseDocument::impl_reset_nothrow()
m_pImpl->m_bDocumentReadOnly = sal_False;
}
-void ODatabaseDocument::impl_import_nolck_throw( const ::comphelper::ComponentContext _rContext, const Reference< XInterface >& _rxTargetComponent,
+void ODatabaseDocument::impl_import_nolck_throw( const Reference< XComponentContext >& _rContext, const Reference< XInterface >& _rxTargetComponent,
const ::comphelper::NamedValueCollection& _rResource )
{
Sequence< Any > aFilterCreationArgs;
@@ -510,7 +510,7 @@ void ODatabaseDocument::impl_import_nolck_throw( const ::comphelper::ComponentCo
aFilterCreationArgs[nCount] <<= xInfoSet;
Reference< XImporter > xImporter(
- _rContext.createComponentWithArguments( "com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs ),
+ _rContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.comp.sdb.DBFilter", aFilterCreationArgs, _rContext),
UNO_QUERY_THROW );
Reference< XComponent > xComponent( _rxTargetComponent, UNO_QUERY_THROW );
@@ -534,8 +534,7 @@ void SAL_CALL ODatabaseDocument::initNew( ) throw (DoubleInitializationExceptio
impl_setInitializing();
// create a temporary storage
- Reference< XStorage > xTempStor( ::comphelper::OStorageHelper::GetTemporaryStorage(
- m_pImpl->m_aContext.getUNOContext() ) );
+ Reference< XStorage > xTempStor( ::comphelper::OStorageHelper::GetTemporaryStorage( m_pImpl->m_aContext ) );
// store therein
impl_storeToStorage_throw( xTempStor, Sequence< PropertyValue >(), aGuard );
@@ -1125,7 +1124,7 @@ void ODatabaseDocument::impl_storeAs_throw( const OUString& _rURL, const ::comph
Reference< XStorage > ODatabaseDocument::impl_createStorageFor_throw( const OUString& _rURL ) const
{
- Reference< ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(m_pImpl->m_aContext.getUNOContext()));
+ Reference< ucb::XSimpleFileAccess3 > xTempAccess(ucb::SimpleFileAccess::create(m_pImpl->m_aContext));
Reference< io::XStream > xStream = xTempAccess->openFileReadWrite( _rURL );
Reference< io::XTruncate > xTruncate(xStream,UNO_QUERY);
if ( xTruncate.is() )
@@ -1415,14 +1414,16 @@ Reference< XNameAccess > ODatabaseDocument::impl_getDocumentContainer_throw( ODa
{
Sequence<Any> aArgs(1);
aArgs[0] <<= NamedValue("DatabaseDocument",makeAny(xMy));
- xContainer.set(m_pImpl->m_aContext.createComponentWithArguments(sSupportService,aArgs),UNO_QUERY);
+ xContainer.set(
+ m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs, m_pImpl->m_aContext),
+ UNO_QUERY);
rContainerRef = xContainer;
}
}
if ( !xContainer.is() )
{
TContentPtr& rContainerData( m_pImpl->getObjectContainer( _eType ) );
- rContainerRef = xContainer = new ODocumentContainer( m_pImpl->m_aContext.getLegacyServiceFactory(), *this, rContainerData, bFormsContainer );
+ rContainerRef = xContainer = new ODocumentContainer( m_pImpl->m_aContext, *this, rContainerData, bFormsContainer );
}
impl_reparent_nothrow( xContainer );
}
@@ -1582,7 +1583,7 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >&
OSL_ENSURE( NULL != pServiceName, "Need component name!" );
// get component
- Reference< XWriter > xSaxWriter = xml::sax::Writer::create( m_pImpl->m_aContext.getUNOContext() );
+ Reference< XWriter > xSaxWriter = xml::sax::Writer::create( m_pImpl->m_aContext );
// connect XML writer to output stream
xSaxWriter->setOutputStream( xOutputStream );
@@ -1595,10 +1596,7 @@ void ODatabaseDocument::WriteThroughComponent( const Reference< XOutputStream >&
aArgs[ i+1 ] = _rArguments[i];
// get filter component
- Reference< XExporter > xExporter;
- OSL_VERIFY( m_pImpl->m_aContext.createComponentWithArguments( pServiceName, aArgs, xExporter ) );
- if ( !xExporter.is() )
- return;
+ Reference< XExporter > xExporter( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(OUString::createFromAscii(pServiceName), aArgs, m_pImpl->m_aContext), UNO_QUERY_THROW );
// connect model and filter
xExporter->setSourceDocument( xComponent );
@@ -1677,7 +1675,7 @@ void ODatabaseDocument::impl_writeStorage_throw( const Reference< XStorage >& _r
if ( xDlgs.is() )
{
Reference< XModel > xModel(const_cast< ODatabaseDocument*>(this));
- lcl_uglyHackToStoreDialogeEmbedImages( m_pImpl->getLibraryContainer(false), _rxTargetStorage, xModel, m_pImpl->m_aContext.getUNOContext() );
+ lcl_uglyHackToStoreDialogeEmbedImages( m_pImpl->getLibraryContainer(false), _rxTargetStorage, xModel, m_pImpl->m_aContext );
}
}
catch ( const Exception& )
@@ -1699,7 +1697,7 @@ Reference< XUIConfigurationManager2 > ODatabaseDocument::getUIConfigurationManag
if ( !m_xUIConfigurationManager.is() )
{
- m_xUIConfigurationManager = UIConfigurationManager::create( m_pImpl->m_aContext.getUNOContext() );
+ m_xUIConfigurationManager = UIConfigurationManager::create( m_pImpl->m_aContext );
OUString aUIConfigFolderName( "Configurations2" );
Reference< XStorage > xConfigStorage;
@@ -1865,11 +1863,10 @@ Sequence< OUString > ODatabaseDocument::getSupportedServiceNames( ) throw (Runt
Reference< XInterface > ODatabaseDocument::Create( const Reference< XComponentContext >& _rxContext )
{
- ::comphelper::ComponentContext aContext( _rxContext );
Reference< XUnoTunnel > xDBContextTunnel( DatabaseContext::create(_rxContext), UNO_QUERY_THROW );
ODatabaseContext* pContext = reinterpret_cast< ODatabaseContext* >( xDBContextTunnel->getSomething( ODatabaseContext::getUnoTunnelImplementationId() ) );
- ::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( aContext.getLegacyServiceFactory(), *pContext ) );
+ ::rtl::Reference<ODatabaseModelImpl> pImpl( new ODatabaseModelImpl( _rxContext, *pContext ) );
Reference< XModel > xModel( pImpl->createNewModel_deliverOwnership( false ) );
return xModel.get();
}
@@ -1969,7 +1966,7 @@ Reference< provider::XScriptProvider > SAL_CALL ODatabaseDocument::getScriptProv
if ( !xScriptProvider.is() )
{
Reference < XScriptProviderFactory > xFactory =
- theMasterScriptProviderFactory::get( m_pImpl->m_aContext.getUNOContext() );
+ theMasterScriptProviderFactory::get( m_pImpl->m_aContext );
Any aScriptProviderContext;
if ( m_bAllowDocumentScripting )
@@ -2036,11 +2033,11 @@ Reference< XController2 > SAL_CALL ODatabaseDocument::createViewController( cons
throw IllegalArgumentException( OUString(), *this, 3 );
DocumentGuard aGuard( *this );
- ::comphelper::ComponentContext aContext( m_pImpl->m_aContext );
aGuard.clear();
- Reference< XController2 > xController;
- aContext.createComponent( "org.openoffice.comp.dbu.OApplicationController", xController );
+ Reference< XController2 > xController(
+ m_pImpl->m_aContext->getServiceManager()->createInstanceWithContext("org.openoffice.comp.dbu.OApplicationController", m_pImpl->m_aContext),
+ UNO_QUERY_THROW );
::comphelper::NamedValueCollection aInitArgs( _Arguments );
aInitArgs.put( "Frame", _Frame );
@@ -2056,10 +2053,10 @@ Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
{
if ( ! m_xTitleHelper.is ())
{
- Reference< XUntitledNumbers > xDesktop(Desktop::create(m_pImpl->m_aContext.getUNOContext()), uno::UNO_QUERY_THROW);
+ Reference< XUntitledNumbers > xDesktop(Desktop::create(m_pImpl->m_aContext), uno::UNO_QUERY_THROW);
Reference< frame::XModel > xThis (getThis(), uno::UNO_QUERY_THROW);
- ::framework::TitleHelper* pHelper = new ::framework::TitleHelper(m_pImpl->m_aContext.getUNOContext());
+ ::framework::TitleHelper* pHelper = new ::framework::TitleHelper(m_pImpl->m_aContext);
m_xTitleHelper.set(static_cast< ::cppu::OWeakObject* >(pHelper), uno::UNO_QUERY_THROW);
pHelper->setOwner (xThis );
pHelper->connectWithUntitledNumbers (xDesktop);
@@ -2071,7 +2068,7 @@ Reference< XTitle > ODatabaseDocument::impl_getTitleHelper_throw()
uno::Reference< frame::XUntitledNumbers > ODatabaseDocument::impl_getUntitledHelper_throw(const uno::Reference< uno::XInterface >& _xComponent)
{
if ( !m_xModuleManager.is() )
- m_xModuleManager.set( ModuleManager::create(m_pImpl->m_aContext.getUNOContext()) );
+ m_xModuleManager.set( ModuleManager::create(m_pImpl->m_aContext) );
OUString sModuleId;
try
diff --git a/dbaccess/source/core/dataaccess/databasedocument.hxx b/dbaccess/source/core/dataaccess/databasedocument.hxx
index 56d1111..a01a901 100644
--- a/dbaccess/source/core/dataaccess/databasedocument.hxx
+++ b/dbaccess/source/core/dataaccess/databasedocument.hxx
@@ -541,7 +541,7 @@ private:
*/
static void
impl_import_nolck_throw(
- const ::comphelper::ComponentContext _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxTargetComponent,
const ::comphelper::NamedValueCollection& _rResource
);
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.cxx b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
index 5886fbd..6eb4656 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.cxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.cxx
@@ -20,7 +20,6 @@
#include <com/sun/star/sdb/XDatabaseRegistrations.hpp>
-#include <comphelper/componentcontext.hxx>
#include <cppuhelper/basemutex.hxx>
#include <cppuhelper/interfacecontainer.hxx>
#include <cppuhelper/implbase1.hxx>
@@ -43,6 +42,7 @@ namespace dbaccess
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
+ using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::container::NoSuchElementException;
using ::com::sun::star::lang::IllegalArgumentException;
using ::com::sun::star::lang::IllegalAccessException;
@@ -80,7 +80,7 @@ namespace dbaccess
,public DatabaseRegistrations_Base
{
public:
- DatabaseRegistrations( const ::comphelper::ComponentContext& _rxContext );
+ DatabaseRegistrations( const Reference<XComponentContext>& _rxContext );
protected:
~DatabaseRegistrations();
@@ -125,7 +125,7 @@ namespace dbaccess
impl_getNodeForName_nothrow( const ::rtl::OUString& _rName );
private:
- ::comphelper::ComponentContext m_aContext;
+ Reference<XComponentContext> m_aContext;
::utl::OConfigurationTreeRoot m_aConfigurationRoot;
::cppu::OInterfaceContainerHelper m_aRegistrationListeners;
};
@@ -133,13 +133,13 @@ namespace dbaccess
//====================================================================
//= DatabaseRegistrations - implementation
//====================================================================
- DatabaseRegistrations::DatabaseRegistrations( const ::comphelper::ComponentContext& _rxContext )
+ DatabaseRegistrations::DatabaseRegistrations( const Reference<XComponentContext> & _rxContext )
:m_aContext( _rxContext )
,m_aConfigurationRoot()
,m_aRegistrationListeners( m_aMutex )
{
m_aConfigurationRoot = ::utl::OConfigurationTreeRoot::createWithComponentContext(
- m_aContext.getUNOContext(), getConfigurationRootPath(), -1, ::utl::OConfigurationTreeRoot::CM_UPDATABLE );
+ m_aContext, getConfigurationRootPath(), -1, ::utl::OConfigurationTreeRoot::CM_UPDATABLE );
}
DatabaseRegistrations::~DatabaseRegistrations()
@@ -356,7 +356,7 @@ namespace dbaccess
//====================================================================
//= DatabaseRegistrations - factory
//====================================================================
- Reference< XAggregation > createDataSourceRegistrations( const ::comphelper::ComponentContext& _rxContext )
+ Reference< XAggregation > createDataSourceRegistrations( const Reference<XComponentContext> & _rxContext )
{
return new DatabaseRegistrations( _rxContext );
}
diff --git a/dbaccess/source/core/dataaccess/databaseregistrations.hxx b/dbaccess/source/core/dataaccess/databaseregistrations.hxx
index 064af38..48677cf 100644
--- a/dbaccess/source/core/dataaccess/databaseregistrations.hxx
+++ b/dbaccess/source/core/dataaccess/databaseregistrations.hxx
@@ -22,16 +22,11 @@
#include <com/sun/star/uno/XAggregation.hpp>
-namespace comphelper
-{
- class ComponentContext;
-}
-
namespace dbaccess
{
::com::sun::star::uno::Reference< ::com::sun::star::uno::XAggregation >
- createDataSourceRegistrations( const ::comphelper::ComponentContext& _rxContext );
+ createDataSourceRegistrations( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxContext );
} // namespace dbaccess
diff --git a/dbaccess/source/core/dataaccess/datasource.cxx b/dbaccess/source/core/dataaccess/datasource.cxx
index 866e907..9e9d4fe 100644
--- a/dbaccess/source/core/dataaccess/datasource.cxx
+++ b/dbaccess/source/core/dataaccess/datasource.cxx
@@ -644,11 +644,11 @@ Reference< XConnection > ODatabaseSource::buildLowLevelConnection(const OUString
Reference< XDriverManager > xManager;
try {
- xManager.set( ConnectionPool::create( m_pImpl->m_aContext.getUNOContext() ), UNO_QUERY_THROW );
+ xManager.set( ConnectionPool::create( m_pImpl->m_aContext ), UNO_QUERY_THROW );
} catch( const Exception& ) { }
if ( !xManager.is() )
// no connection pool installed, fall back to driver manager
- xManager.set( DriverManager::create(m_pImpl->m_aContext.getUNOContext() ), UNO_QUERY_THROW );
+ xManager.set( DriverManager::create(m_pImpl->m_aContext ), UNO_QUERY_THROW );
OUString sUser(_rUid);
OUString sPwd(_rPwd);
@@ -1197,7 +1197,7 @@ Reference< XConnection > ODatabaseSource::buildIsolatedConnection(const OUString
if ( xSdbcConn.is() )
{
// build a connection server and return it (no stubs)
- xConn = new OConnection(*this, xSdbcConn, m_pImpl->m_aContext.getLegacyServiceFactory());
+ xConn = new OConnection(*this, xSdbcConn, m_pImpl->m_aContext);
}
return xConn;
}
@@ -1216,7 +1216,7 @@ Reference< XConnection > ODatabaseSource::getConnection(const OUString& user, co
{ // create a new proxy for the connection
if ( !m_pImpl->m_xSharedConnectionManager.is() )
{
- m_pImpl->m_pSharedConnectionManager = new OSharedConnectionManager( m_pImpl->m_aContext.getUNOContext() );
+ m_pImpl->m_pSharedConnectionManager = new OSharedConnectionManager( m_pImpl->m_aContext );
m_pImpl->m_xSharedConnectionManager = m_pImpl->m_pSharedConnectionManager;
}
xConn = m_pImpl->m_pSharedConnectionManager->getConnection(
@@ -1259,13 +1259,13 @@ Reference< XNameAccess > SAL_CALL ODatabaseSource::getQueryDefinitions( ) throw(
{
Sequence<Any> aArgs(1);
aArgs[0] <<= NamedValue("DataSource",makeAny(xMy));
- xContainer.set(m_pImpl->m_aContext.createComponentWithArguments(sSupportService,aArgs),UNO_QUERY);
+ xContainer.set( m_pImpl->m_aContext->getServiceManager()->createInstanceWithArgumentsAndContext(sSupportService, aArgs, m_pImpl->m_aContext), UNO_QUERY);
}
}
if ( !xContainer.is() )
{
TContentPtr& rContainerData( m_pImpl->getObjectContainer( ODatabaseModelImpl::E_QUERY ) );
- xContainer = new OCommandContainer( m_pImpl->m_aContext.getLegacyServiceFactory(), *this, rContainerData, sal_False );
+ xContainer = new OCommandContainer( m_pImpl->m_aContext, *this, rContainerData, sal_False );
}
m_pImpl->m_xCommandDefinitions = xContainer;
}
@@ -1282,7 +1282,7 @@ Reference< XNameAccess > ODatabaseSource::getTables() throw( RuntimeException )
if ( !xContainer.is() )
{
TContentPtr& rContainerData( m_pImpl->getObjectContainer( ODatabaseModelImpl::E_TABLE ) );
- xContainer = new OCommandContainer( m_pImpl->m_aContext.getLegacyServiceFactory(), *this, rContainerData, sal_True );
+ xContainer = new OCommandContainer( m_pImpl->m_aContext, *this, rContainerData, sal_True );
m_pImpl->m_xTableDefinitions = xContainer;
}
return xContainer;
diff --git a/dbaccess/source/core/dataaccess/definitioncontainer.cxx b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
index 8c8cd98..181ac55 100644
--- a/dbaccess/source/core/dataaccess/definitioncontainer.cxx
+++ b/dbaccess/source/core/dataaccess/definitioncontainer.cxx
@@ -93,7 +93,7 @@ ODefinitionContainer_Impl::iterator ODefinitionContainer_Impl::find( TContentPtr
//==========================================================================
DBG_NAME(ODefinitionContainer)
-ODefinitionContainer::ODefinitionContainer( const Reference< XMultiServiceFactory >& _xORB
+ODefinitionContainer::ODefinitionContainer( const Reference< XComponentContext >& _xORB
, const Reference< XInterface >& _xParentContainer
, const TContentPtr& _pImpl
, bool _bCheckSlash
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.cxx b/dbaccess/source/core/dataaccess/documentcontainer.cxx
index a902640..92b2ab7 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.cxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.cxx
@@ -94,7 +94,7 @@ void SAL_CALL LocalNameApproval::approveElement( const OUString& _rName, const R
//==========================================================================
DBG_NAME(ODocumentContainer)
-ODocumentContainer::ODocumentContainer(const Reference< XMultiServiceFactory >& _xORB
+ODocumentContainer::ODocumentContainer(const Reference< XComponentContext >& _xORB
,const Reference< XInterface >& _xParentContainer
,const TContentPtr& _pImpl
, sal_Bool _bFormsContainer
@@ -107,7 +107,7 @@ ODocumentContainer::ODocumentContainer(const Reference< XMultiServiceFactory >&
registerProperty(PROPERTY_NAME, PROPERTY_ID_NAME, PropertyAttribute::BOUND | PropertyAttribute::READONLY | PropertyAttribute::CONSTRAINED,
&m_pImpl->m_aProps.aTitle, ::getCppuType(&m_pImpl->m_aProps.aTitle));
- setElementApproval( PContainerApprove( new LocalNameApproval ( comphelper::getComponentContext(_xORB) ) ) );
+ setElementApproval( PContainerApprove( new LocalNameApproval ( _xORB ) ) );
}
ODocumentContainer::~ODocumentContainer()
@@ -145,8 +145,8 @@ Reference< XContent > ODocumentContainer::createObject( const OUString& _rName)
ODefinitionContainer_Impl::const_iterator aFind = rDefinitions.find( _rName );
OSL_ENSURE( aFind != rDefinitions.end(), "ODocumentContainer::createObject:Invalid entry in map!" );
if ( aFind->second->m_aProps.bIsFolder )
- return new ODocumentContainer( m_aContext.getLegacyServiceFactory(), *this, aFind->second, m_bFormsContainer );
- return new ODocumentDefinition( *this, m_aContext.getLegacyServiceFactory(), aFind->second, m_bFormsContainer );
+ return new ODocumentContainer( m_aContext, *this, aFind->second, m_bFormsContainer );
+ return new ODocumentDefinition( *this, m_aContext, aFind->second, m_bFormsContainer );
}
Reference< XInterface > SAL_CALL ODocumentContainer::createInstance( const OUString& aServiceSpecifier ) throw (Exception, RuntimeException)
@@ -254,7 +254,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
ODocumentDefinition::GetDocumentServiceFromMediaType( sMediaType, m_aContext, aClassID );
else if ( !sDocServiceName.isEmpty() )
{
- ::comphelper::MimeConfigurationHelper aConfigHelper( m_aContext.getUNOContext() );
+ ::comphelper::MimeConfigurationHelper aConfigHelper( m_aContext );
const Sequence< NamedValue > aProps( aConfigHelper.GetObjectPropsByDocumentName( sDocServiceName ) );
const ::comphelper::NamedValueCollection aMediaTypeProps( aProps );
aClassID = aMediaTypeProps.getOrDefault( "ClassID", Sequence< sal_Int8 >() );
@@ -278,7 +278,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
else
pElementImpl = aFind->second;
- ::rtl::Reference< ODocumentDefinition > pDocDef = new ODocumentDefinition( *this, m_aContext.getLegacyServiceFactory(), pElementImpl, m_bFormsContainer );
+ ::rtl::Reference< ODocumentDefinition > pDocDef = new ODocumentDefinition( *this, m_aContext, pElementImpl, m_bFormsContainer );
if ( aClassID.getLength() )
{
pDocDef->initialLoad( aClassID, aCreationArgs, xConnection );
@@ -335,7 +335,7 @@ Reference< XInterface > SAL_CALL ODocumentContainer::createInstanceWithArguments
else
pElementImpl = aFind->second;
OSL_ENSURE( pElementImpl ," Invalid entry in map!");
- xContent = new ODocumentContainer( m_aContext.getLegacyServiceFactory(), *this, pElementImpl, ServiceSpecifier == SERVICE_NAME_FORM_COLLECTION );
+ xContent = new ODocumentContainer( m_aContext, *this, pElementImpl, ServiceSpecifier == SERVICE_NAME_FORM_COLLECTION );
// copy children
if ( xCopyFrom.is() )
@@ -429,7 +429,7 @@ Any SAL_CALL ODocumentContainer::execute( const Command& aCommand, sal_Int32 Com
// open as folder - return result set
Reference< XDynamicResultSet > xSet
- = new DynamicResultSet( m_aContext.getUNOContext(),
+ = new DynamicResultSet( m_aContext,
this,
aOpenCommand,
Environment );
diff --git a/dbaccess/source/core/dataaccess/documentcontainer.hxx b/dbaccess/source/core/dataaccess/documentcontainer.hxx
index e3af99a..16dcd22 100644
--- a/dbaccess/source/core/dataaccess/documentcontainer.hxx
+++ b/dbaccess/source/core/dataaccess/documentcontainer.hxx
@@ -53,7 +53,7 @@ public:
/** constructs the container.<BR>
*/
ODocumentContainer(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
, const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
, sal_Bool _bFormsContainer
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.cxx b/dbaccess/source/core/dataaccess/documentdefinition.cxx
index ae46767..e64ac43 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.cxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.cxx
@@ -372,7 +372,7 @@ namespace dbaccess
}
::rtl::OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const Reference< XStorage >& _rxContainerStorage,
- const ::rtl::OUString& _rEntityName, const ::comphelper::ComponentContext& _rContext,
+ const ::rtl::OUString& _rEntityName, const Reference< XComponentContext >& _rContext,
Sequence< sal_Int8 >& _rClassId )
{
return GetDocumentServiceFromMediaType(
@@ -381,12 +381,12 @@ namespace dbaccess
}
::rtl::OUString ODocumentDefinition::GetDocumentServiceFromMediaType( const ::rtl::OUString& _rMediaType,
- const ::comphelper::ComponentContext& _rContext, Sequence< sal_Int8 >& _rClassId )
+ const Reference< XComponentContext >& _rContext, Sequence< sal_Int8 >& _rClassId )
{
::rtl::OUString sResult;
try
{
- ::comphelper::MimeConfigurationHelper aConfigHelper( _rContext.getUNOContext() );
+ ::comphelper::MimeConfigurationHelper aConfigHelper( _rContext );
sResult = aConfigHelper.GetDocServiceNameFromMediaType( _rMediaType );
_rClassId = aConfigHelper.GetSequenceClassIDRepresentation(aConfigHelper.GetExplicitlyRegisteredObjClassID( _rMediaType ));
if ( !_rClassId.getLength() && !sResult.isEmpty() )
@@ -432,7 +432,7 @@ namespace dbaccess
//==========================================================================
DBG_NAME(ODocumentDefinition)
-ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxContainer, const Reference< XMultiServiceFactory >& _xORB,
+ODocumentDefinition::ODocumentDefinition( const Reference< XInterface >& _rxContainer, const Reference< XComponentContext >& _xORB,
const TContentPtr& _pImpl, sal_Bool _bForm )
:OContentHelper(_xORB,_rxContainer,_pImpl)
,OPropertyStateContainer(OContentHelper::rBHelper)
@@ -631,7 +631,7 @@ void ODocumentDefinition::impl_onActivateEmbeddedObject_nothrow( const bool i_bR
xTopWindow->toFront();
// remove the frame from the desktop's frame collection because we need full control of it.
- impl_removeFrameFromDesktop_throw( m_aContext.getUNOContext(), xFrame );
+ impl_removeFrameFromDesktop_throw( m_aContext, xFrame );
// ensure that we ourself are kept alive as long as the embedded object's frame is
// opened
@@ -961,7 +961,7 @@ Any ODocumentDefinition::onCommandOpenSomething( const Any& _rOpenArgument, cons
{
// we are in ReadOnly mode
// we would like to open the Writer or Calc with the report direct, without design it.
- Reference< report::XReportEngine > xReportEngine( m_aContext.createComponent( "com.sun.star.comp.report.OReportEngineJFree" ), UNO_QUERY_THROW );
+ Reference< report::XReportEngine > xReportEngine( m_aContext->getServiceManager()->createInstanceWithContext("com.sun.star.comp.report.OReportEngineJFree", m_aContext), UNO_QUERY_THROW );
xReportEngine->setReportDefinition(xReportDefinition);
xReportEngine->setActiveConnection(m_xLastKnownConnection);
@@ -1214,7 +1214,7 @@ void ODocumentDefinition::onCommandInsert( const ::rtl::OUString& _sURL, const R
Reference< XStorage> xStorage = getContainerStorage();
if ( xStorage.is() )
{
- Reference< XEmbeddedObjectCreator> xEmbedFactory = EmbeddedObjectCreator::create(m_aContext.getUNOContext());
+ Reference< XEmbeddedObjectCreator> xEmbedFactory = EmbeddedObjectCreator::create(m_aContext);
Sequence<PropertyValue> aEmpty,aMediaDesc(1);
aMediaDesc[0].Name = PROPERTY_URL;
aMediaDesc[0].Value <<= _sURL;
@@ -1296,7 +1296,7 @@ sal_Bool ODocumentDefinition::save(sal_Bool _bApprove)
pRequest->addContinuation(pAbort);
// create the handler, let it handle the request
- Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
+ Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext, 0) );
xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
@@ -1370,7 +1370,7 @@ sal_Bool ODocumentDefinition::saveAs()
pRequest->addContinuation(pAbort);
// create the handler, let it handle the request
- Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0) );
+ Reference< XInteractionHandler2 > xHandler( InteractionHandler::createWithParent(m_aContext, 0) );
xHandler->handle(xRequest);
if ( pAbort->wasSelected() )
@@ -1557,7 +1557,7 @@ Sequence< PropertyValue > ODocumentDefinition::fillLoadArgs( const Reference< XC
xParentFrame = lcl_getDatabaseDocumentFrame( *m_pImpl->m_pDataSource );
if ( !xParentFrame.is() )
{ // i87957 we need a parent frame
- Reference< XDesktop2 > xDesktop = Desktop::create( m_aContext.getUNOContext() );
+ Reference< XDesktop2 > xDesktop = Desktop::create( m_aContext );
xParentFrame.set( xDesktop, UNO_QUERY_THROW );
Reference<util::XCloseable> xCloseable(m_pImpl->m_pDataSource->getModel_noCreate(),UNO_QUERY);
if ( xCloseable.is() )
@@ -1613,7 +1613,7 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
Reference< XStorage> xStorage = getContainerStorage();
if ( xStorage.is() )
{
- Reference< XEmbeddedObjectCreator> xEmbedFactory = OOoEmbeddedObjectFactory::create(m_aContext.getUNOContext());
+ Reference< XEmbeddedObjectCreator> xEmbedFactory = OOoEmbeddedObjectFactory::create(m_aContext);
::rtl::OUString sDocumentService;
sal_Bool bSetSize = sal_False;
sal_Int32 nEntryConnectionMode = EntryInitModes::DEFAULT_INIT;
@@ -1631,8 +1631,8 @@ void ODocumentDefinition::loadEmbeddedObject( const Reference< XConnection >& i_
if ( !m_bForm && !(sDocumentService == "com.sun.star.text.TextDocument"))
{
// we seem to be a "new style" report, check if report extension is present.
- Reference< XContentEnumerationAccess > xEnumAccess( m_aContext.getLegacyServiceFactory(), UNO_QUERY );
- const ::rtl::OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(m_aContext.getUNOContext());
+ Reference< XContentEnumerationAccess > xEnumAccess( m_aContext->getServiceManager(), UNO_QUERY );
+ const ::rtl::OUString sReportEngineServiceName = ::dbtools::getDefaultReportEngineServiceName(m_aContext);
Reference< XEnumeration > xEnumDrivers = xEnumAccess->createContentEnumeration(sReportEngineServiceName);
if ( !xEnumDrivers.is() || !xEnumDrivers->hasMoreElements() )
{
@@ -2077,7 +2077,7 @@ bool ODocumentDefinition::prepareClose()
return true;
}
-void ODocumentDefinition::fillReportData( const ::comphelper::ComponentContext& _rContext,
+void ODocumentDefinition::fillReportData( const Reference< XComponentContext >& _rContext,
const Reference< util::XCloseable >& _rxComponent,
const Reference< XConnection >& _rxActiveConnection )
{
@@ -2086,14 +2086,14 @@ void ODocumentDefinition::fillReportData( const ::comphelper::ComponentContext&
aValue.Name = "TextDocument";
aValue.Value <<= _rxComponent;
aArgs[0] <<= aValue;
- aValue.Name = "ActiveConnection";
- aValue.Value <<= _rxActiveConnection;
- aArgs[1] <<= aValue;
+ aValue.Name = "ActiveConnection";
+ aValue.Value <<= _rxActiveConnection;
+ aArgs[1] <<= aValue;
try
{
Reference< XJobExecutor > xExecuteable(
- _rContext.createComponentWithArguments( "com.sun.star.wizards.report.CallReportWizard", aArgs ), UNO_QUERY_THROW );
+ _rContext->getServiceManager()->createInstanceWithArgumentsAndContext("com.sun.star.wizards.report.CallReportWizard", aArgs, _rContext), UNO_QUERY_THROW );
xExecuteable->trigger( "fill" );
}
catch( const Exception& )
diff --git a/dbaccess/source/core/dataaccess/documentdefinition.hxx b/dbaccess/source/core/dataaccess/documentdefinition.hxx
index 553a61f..f9e6f71 100644
--- a/dbaccess/source/core/dataaccess/documentdefinition.hxx
+++ b/dbaccess/source/core/dataaccess/documentdefinition.hxx
@@ -82,7 +82,7 @@ public:
ODocumentDefinition(
const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _rxContainer,
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >&,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >&,
const TContentPtr& _pImpl,
sal_Bool _bForm
);
@@ -153,7 +153,7 @@ public:
inline sal_Bool isNewReport() const { return !m_bForm && !m_pImpl->m_aProps.bAsTemplate; }
static void fillReportData(
- const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _rxContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::util::XCloseable >& _rxComponent,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection >& _rxActiveConnection
);
@@ -175,13 +175,13 @@ public:
static ::rtl::OUString GetDocumentServiceFromMediaType(
const ::rtl::OUString& _rMediaType,
- const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _rxContext,
::com::sun::star::uno::Sequence< sal_Int8 >& _rClassId
);
static ::rtl::OUString GetDocumentServiceFromMediaType(
const ::com::sun::star::uno::Reference< ::com::sun::star::embed::XStorage >& _rxContainerStorage,
const ::rtl::OUString& _rEntityName,
- const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext > & _rxContext,
::com::sun::star::uno::Sequence< sal_Int8 >& _rClassId
);
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
index 0d835a0..094006b 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.cxx
@@ -26,7 +26,6 @@
#include <com/sun/star/frame/XModel.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <cppuhelper/weakref.hxx>
#include <tools/diagnose_ex.h>
@@ -49,6 +48,7 @@ namespace dbaccess
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::uno::Type;
using ::com::sun::star::uno::WeakReference;
+ using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::document::XDocumentEventBroadcaster;
using ::com::sun::star::document::XEventsSupplier;
using ::com::sun::star::container::XNameAccess;
@@ -122,7 +122,7 @@ namespace dbaccess
//====================================================================
//= DocumentEventExecutor
//====================================================================
- DocumentEventExecutor::DocumentEventExecutor( const ::comphelper::ComponentContext& _rContext,
+ DocumentEventExecutor::DocumentEventExecutor( const Reference<XComponentContext> & _rContext,
const Reference< XEventsSupplier >& _rxDocument )
:m_pData( new DocumentEventExecutor_Data( _rxDocument ) )
{
@@ -136,7 +136,7 @@ namespace dbaccess
try
{
- m_pData->xURLTransformer = URLTransformer::create(_rContext.getUNOContext());
+ m_pData->xURLTransformer = URLTransformer::create(_rContext);
}
catch( const Exception& )
{
diff --git a/dbaccess/source/core/dataaccess/documenteventexecutor.hxx b/dbaccess/source/core/dataaccess/documenteventexecutor.hxx
index 3cc3b93..48fbd3b 100644
--- a/dbaccess/source/core/dataaccess/documenteventexecutor.hxx
+++ b/dbaccess/source/core/dataaccess/documenteventexecutor.hxx
@@ -27,11 +27,6 @@
#include <memory>
-namespace comphelper
-{
- class ComponentContext;
-}
-
namespace dbaccess
{
@@ -45,7 +40,7 @@ namespace dbaccess
{
public:
DocumentEventExecutor(
- const ::comphelper::ComponentContext& _rContext,
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rContext,
const ::com::sun::star::uno::Reference< ::com::sun::star::document::XEventsSupplier >& _rxDocument );
protected:
diff --git a/dbaccess/source/core/inc/ContentHelper.hxx b/dbaccess/source/core/inc/ContentHelper.hxx
index f35dc14..0c352f2 100644
--- a/dbaccess/source/core/inc/ContentHelper.hxx
+++ b/dbaccess/source/core/inc/ContentHelper.hxx
@@ -33,7 +33,6 @@
#include <com/sun/star/lang/XUnoTunnel.hpp>
#include <cppuhelper/compbase9.hxx>
#include <comphelper/broadcasthelper.hxx>
-#include <comphelper/componentcontext.hxx>
#include <comphelper/uno3.hxx>
#include <comphelper/stl_types.hxx>
#include <com/sun/star/beans/Property.hpp>
@@ -111,7 +110,8 @@ namespace dbaccess
PropertyChangeListenerContainer m_aPropertyChangeListeners;
::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
m_xParentContainer;
- const ::comphelper::ComponentContext m_aContext;
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >
+ m_aContext;
const ::connectivity::SQLError m_aErrorHelper;
TContentPtr m_pImpl;
sal_uInt32 m_nCommandId;
@@ -132,7 +132,7 @@ namespace dbaccess
public:
- OContentHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _xORB
+ OContentHelper( const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _xORB
,const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >& _xParentContainer
,const TContentPtr& _pImpl
);
@@ -183,7 +183,7 @@ namespace dbaccess
getPropertyValues( const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::Property >& rProperties );
- const ::comphelper::ComponentContext& getContext() const { return m_aContext; }
+ const css::uno::Reference< css::uno::XComponentContext >& getContext() const { return m_aContext; }
inline TContentPtr getImpl() const { return m_pImpl; }
diff --git a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
index 34166c2..b68cbc8 100644
--- a/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
+++ b/dbaccess/source/core/inc/SingleSelectQueryComposer.hxx
@@ -33,7 +33,6 @@
#include <comphelper/uno3.hxx>
#include <comphelper/proparrhlp.hxx>
#include <comphelper/propertycontainer.hxx>
-#include <comphelper/componentcontext.hxx>
#include <memory>
@@ -92,7 +91,7 @@ namespace dbaccess
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xConnectionQueries;
::com::sun::star::uno::Reference< ::com::sun::star::util::XNumberFormatsSupplier > m_xNumberFormatsSupplier;
::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess> m_xColumns;
- ::comphelper::ComponentContext m_aContext;
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext> m_aContext;
::com::sun::star::uno::Reference< ::com::sun::star::script::XTypeConverter > m_xTypeConverter;
::std::vector<OPrivateColumns*> m_aCurrentColumns;
@@ -189,7 +188,7 @@ namespace dbaccess
OSingleSelectQueryComposer( const ::com::sun::star::uno::Reference< ::com::sun::star::container::XNameAccess>& _xTableSupplier,
const ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection>& _xConnection,
... etc. - the rest is truncated
More information about the Libreoffice-commits
mailing list