summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/uno
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2013-03-19 13:08:47 +0200
committerNoel Grandin <noel@peralex.com>2013-03-20 07:32:53 +0200
commita066525b42a1ab8dc60e10a5d62819c259904f32 (patch)
tree0c21130ff82a482ab80de0fcc3c73be0125d06f5 /dbaccess/source/ui/uno
parent6999a50efaaf802ccd4c7eb7957af17cc32602be (diff)
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
Diffstat (limited to 'dbaccess/source/ui/uno')
-rw-r--r--dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx9
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlg.cxx7
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx7
-rw-r--r--dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx2
-rw-r--r--dbaccess/source/ui/uno/TableFilterDlg.cxx7
-rw-r--r--dbaccess/source/ui/uno/TableFilterDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/UserSettingsDlg.cxx7
-rw-r--r--dbaccess/source/ui/uno/UserSettingsDlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/admindlg.cxx7
-rw-r--r--dbaccess/source/ui/uno/admindlg.hxx2
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.cxx32
-rw-r--r--dbaccess/source/ui/uno/composerdialogs.hxx6
-rw-r--r--dbaccess/source/ui/uno/copytablewizard.cxx23
-rw-r--r--dbaccess/source/ui/uno/textconnectionsettings_uno.cxx19
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.cxx15
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.hxx2
-rw-r--r--dbaccess/source/ui/uno/unoadmin.cxx4
-rw-r--r--dbaccess/source/ui/uno/unosqlmessage.cxx5
19 files changed, 102 insertions, 58 deletions
diff --git a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
index 41c2e7ce9299..45e69977fe9e 100644
--- a/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/AdvancedSettingsDlg.cxx
@@ -21,6 +21,7 @@
#include "unoadmin.hxx"
#include "dbu_reghelper.hxx"
#include "advancedsettingsdlg.hxx"
+#include <comphelper/processfactory.hxx>
//.........................................................................
namespace dbaui
@@ -40,7 +41,7 @@ namespace dbaui
{
protected:
- OAdvancedSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ OAdvancedSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider
@@ -69,7 +70,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
- OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XMultiServiceFactory >& _rxORB)
+ OAdvancedSettingsDialog::OAdvancedSettingsDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@@ -83,7 +84,7 @@ namespace dbaui
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OAdvancedSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
- return *(new OAdvancedSettingsDialog(_rxFactory));
+ return *(new OAdvancedSettingsDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@@ -135,7 +136,7 @@ namespace dbaui
//------------------------------------------------------------------------------
Dialog* OAdvancedSettingsDialog::createDialog(Window* _pParent)
{
- AdvancedSettingsDialog* pDlg = new AdvancedSettingsDialog(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(),m_aInitialSelection);
+ AdvancedSettingsDialog* pDlg = new AdvancedSettingsDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
return pDlg;
}
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
index a18510f0ef5b..77fb2f87724b 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.cxx
@@ -21,6 +21,7 @@
#include "dbu_reghelper.hxx"
#include "DBTypeWizDlg.hxx"
#include "dbwiz.hxx"
+#include <comphelper/processfactory.hxx>
using namespace dbaui;
@@ -40,7 +41,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
-ODBTypeWizDialog::ODBTypeWizDialog(const Reference< XMultiServiceFactory >& _rxORB)
+ODBTypeWizDialog::ODBTypeWizDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@@ -54,7 +55,7 @@ Sequence<sal_Int8> SAL_CALL ODBTypeWizDialog::getImplementationId( ) throw(Runt
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODBTypeWizDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
- return *(new ODBTypeWizDialog(_rxFactory));
+ return *(new ODBTypeWizDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@@ -106,7 +107,7 @@ Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialog::getPropertySetInfo() thr
//------------------------------------------------------------------------------
Dialog* ODBTypeWizDialog::createDialog(Window* _pParent)
{
- ODbTypeWizDialog* pDlg = new ODbTypeWizDialog(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(),m_aInitialSelection);
+ ODbTypeWizDialog* pDlg = new ODbTypeWizDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
return pDlg;
}
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
index c70b5bc25846..77f93d7891dd 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlg.hxx
@@ -37,7 +37,7 @@ class ODBTypeWizDialog
{
protected:
- ODBTypeWizDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ ODBTypeWizDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
index 31d30112d6be..a6d83ea78a71 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.cxx
@@ -26,6 +26,7 @@
#include <com/sun/star/sdb/XOfficeDatabaseDocument.hpp>
#include <com/sun/star/sdbc/XDataSource.hpp>
#include <vcl/msgbox.hxx>
+#include <comphelper/processfactory.hxx>
using namespace dbaui;
@@ -47,7 +48,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
-ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XMultiServiceFactory >& _rxORB)
+ODBTypeWizDialogSetup::ODBTypeWizDialogSetup(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
,m_bOpenDatabase(sal_True)
,m_bStartTableWizard(sal_False)
@@ -68,7 +69,7 @@ Sequence<sal_Int8> SAL_CALL ODBTypeWizDialogSetup::getImplementationId( ) throw
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODBTypeWizDialogSetup::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
- Reference < XInterface > xDBWizard = *(new ODBTypeWizDialogSetup(_rxFactory));
+ Reference < XInterface > xDBWizard = *(new ODBTypeWizDialogSetup( comphelper::getComponentContext(_rxFactory) ));
return xDBWizard;
}
@@ -120,7 +121,7 @@ Reference<XPropertySetInfo> SAL_CALL ODBTypeWizDialogSetup::getPropertySetInfo(
//------------------------------------------------------------------------------
Dialog* ODBTypeWizDialogSetup::createDialog(Window* _pParent)
{
- return new ODbTypeWizDialogSetup(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(), m_aInitialSelection);
+ return new ODbTypeWizDialogSetup(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
}
// -----------------------------------------------------------------------------
void ODBTypeWizDialogSetup::executedDialog(sal_Int16 _nExecutionResult)
diff --git a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
index daec5c9c93ac..fc9eb22bdf3d 100644
--- a/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
+++ b/dbaccess/source/ui/uno/DBTypeWizDlgSetup.hxx
@@ -40,7 +40,7 @@ class ODBTypeWizDialogSetup
sal_Bool m_bStartTableWizard;
protected:
- ODBTypeWizDialogSetup(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ ODBTypeWizDialogSetup(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.cxx b/dbaccess/source/ui/uno/TableFilterDlg.cxx
index 7538e8e44448..a4411a77a4dc 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.cxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.cxx
@@ -21,6 +21,7 @@
#include "dbu_reghelper.hxx"
#include "TableFilterDlg.hxx"
#include "TablesSingleDlg.hxx"
+#include <comphelper/processfactory.hxx>
using namespace dbaui;
@@ -41,7 +42,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
-OTableFilterDialog::OTableFilterDialog(const Reference< XMultiServiceFactory >& _rxORB)
+OTableFilterDialog::OTableFilterDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@@ -55,7 +56,7 @@ Sequence<sal_Int8> SAL_CALL OTableFilterDialog::getImplementationId( ) throw(Ru
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OTableFilterDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
- return *(new OTableFilterDialog(_rxFactory));
+ return *(new OTableFilterDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@@ -107,7 +108,7 @@ Reference<XPropertySetInfo> SAL_CALL OTableFilterDialog::getPropertySetInfo() t
//------------------------------------------------------------------------------
Dialog* OTableFilterDialog::createDialog(Window* _pParent)
{
- OTableSubscriptionDialog* pDlg = new OTableSubscriptionDialog(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(), m_aInitialSelection);
+ OTableSubscriptionDialog* pDlg = new OTableSubscriptionDialog(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection);
return pDlg;
}
diff --git a/dbaccess/source/ui/uno/TableFilterDlg.hxx b/dbaccess/source/ui/uno/TableFilterDlg.hxx
index bc07c8d3c700..4982c5d1f229 100644
--- a/dbaccess/source/ui/uno/TableFilterDlg.hxx
+++ b/dbaccess/source/ui/uno/TableFilterDlg.hxx
@@ -37,7 +37,7 @@ class OTableFilterDialog
{
protected:
- OTableFilterDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ OTableFilterDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.cxx b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
index 0ccace7fd67f..7fa2a8ee8035 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.cxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.cxx
@@ -21,6 +21,7 @@
#include "dbu_reghelper.hxx"
#include "UserSettingsDlg.hxx"
#include "UserAdminDlg.hxx"
+#include <comphelper/processfactory.hxx>
using namespace dbaui;
@@ -41,7 +42,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
-OUserSettingsDialog::OUserSettingsDialog(const Reference< XMultiServiceFactory >& _rxORB)
+OUserSettingsDialog::OUserSettingsDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@@ -55,7 +56,7 @@ Sequence<sal_Int8> SAL_CALL OUserSettingsDialog::getImplementationId( ) throw(R
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OUserSettingsDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
- return *(new OUserSettingsDialog(_rxFactory));
+ return *(new OUserSettingsDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@@ -107,7 +108,7 @@ Reference<XPropertySetInfo> SAL_CALL OUserSettingsDialog::getPropertySetInfo()
//------------------------------------------------------------------------------
Dialog* OUserSettingsDialog::createDialog(Window* _pParent)
{
- OUserAdminDlg* pDlg = new OUserAdminDlg(_pParent, m_pDatasourceItems, m_aContext.getUNOContext(),m_aInitialSelection,m_xActiveConnection);
+ OUserAdminDlg* pDlg = new OUserAdminDlg(_pParent, m_pDatasourceItems, m_aContext, m_aInitialSelection, m_xActiveConnection);
return pDlg;
}
diff --git a/dbaccess/source/ui/uno/UserSettingsDlg.hxx b/dbaccess/source/ui/uno/UserSettingsDlg.hxx
index 0f5ab97a8492..7e3e05ed82f3 100644
--- a/dbaccess/source/ui/uno/UserSettingsDlg.hxx
+++ b/dbaccess/source/ui/uno/UserSettingsDlg.hxx
@@ -37,7 +37,7 @@ class OUserSettingsDialog
{
protected:
- OUserSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ OUserSettingsDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider
diff --git a/dbaccess/source/ui/uno/admindlg.cxx b/dbaccess/source/ui/uno/admindlg.cxx
index 613a2822d548..6d6acb79eccf 100644
--- a/dbaccess/source/ui/uno/admindlg.cxx
+++ b/dbaccess/source/ui/uno/admindlg.cxx
@@ -21,6 +21,7 @@
#include "dbu_reghelper.hxx"
#include "admindlg.hxx"
#include "dbadmin.hxx"
+#include <comphelper/processfactory.hxx>
using namespace dbaui;
@@ -41,7 +42,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
-ODataSourcePropertyDialog::ODataSourcePropertyDialog(const Reference< XMultiServiceFactory >& _rxORB)
+ODataSourcePropertyDialog::ODataSourcePropertyDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialog(_rxORB)
{
}
@@ -55,7 +56,7 @@ Sequence<sal_Int8> SAL_CALL ODataSourcePropertyDialog::getImplementationId( ) t
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL ODataSourcePropertyDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
- return *(new ODataSourcePropertyDialog(_rxFactory));
+ return *(new ODataSourcePropertyDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------
@@ -108,7 +109,7 @@ Reference<XPropertySetInfo> SAL_CALL ODataSourcePropertyDialog::getPropertySetI
Dialog* ODataSourcePropertyDialog::createDialog(Window* _pParent)
{
- ODbAdminDialog* pDialog = new ODbAdminDialog(_pParent, m_pDatasourceItems, m_aContext.getUNOContext());
+ ODbAdminDialog* pDialog = new ODbAdminDialog(_pParent, m_pDatasourceItems, m_aContext);
// the initial selection
if ( m_aInitialSelection.hasValue() )
diff --git a/dbaccess/source/ui/uno/admindlg.hxx b/dbaccess/source/ui/uno/admindlg.hxx
index 087a9a67afa5..0c63cf34efcc 100644
--- a/dbaccess/source/ui/uno/admindlg.hxx
+++ b/dbaccess/source/ui/uno/admindlg.hxx
@@ -37,7 +37,7 @@ class ODataSourcePropertyDialog
{
protected:
- ODataSourcePropertyDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ ODataSourcePropertyDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
public:
// XTypeProvider
diff --git a/dbaccess/source/ui/uno/composerdialogs.cxx b/dbaccess/source/ui/uno/composerdialogs.cxx
index 418e52e8388b..b6a3b0db03f7 100644
--- a/dbaccess/source/ui/uno/composerdialogs.cxx
+++ b/dbaccess/source/ui/uno/composerdialogs.cxx
@@ -25,6 +25,7 @@
#include "dbustrings.hrc"
#include "queryfilter.hxx"
#include "queryorder.hxx"
+#include <comphelper/processfactory.hxx>
#include <connectivity/dbtools.hxx>
#include <tools/diagnose_ex.h>
#include <osl/diagnose.h>
@@ -59,7 +60,7 @@ namespace dbaui
//=====================================================================
DBG_NAME(ComposerDialog)
//---------------------------------------------------------------------
- ComposerDialog::ComposerDialog(const Reference< XMultiServiceFactory >& _rxORB)
+ ComposerDialog::ComposerDialog(const Reference< XComponentContext >& _rxORB)
:OGenericUnoDialog( _rxORB )
{
DBG_CTOR(ComposerDialog,NULL);
@@ -101,7 +102,7 @@ namespace dbaui
// fallback: if there is a connection and thus a row set, but no composer, create one
if ( xConnection.is() && !m_xComposer.is() )
- m_xComposer = ::dbtools::getCurrentSettingsComposer( Reference< XPropertySet >( m_xRowSet, UNO_QUERY ), m_aContext.getUNOContext() );
+ m_xComposer = ::dbtools::getCurrentSettingsComposer( Reference< XPropertySet >( m_xRowSet, UNO_QUERY ), m_aContext );
// the columns of the row set
Reference< XColumnsSupplier > xSuppColumns( m_xRowSet, UNO_QUERY );
@@ -135,18 +136,27 @@ namespace dbaui
//= RowsetFilterDialog
//=====================================================================
//---------------------------------------------------------------------
- RowsetFilterDialog::RowsetFilterDialog( const Reference< XMultiServiceFactory >& _rxORB )
+ RowsetFilterDialog::RowsetFilterDialog( const Reference< XComponentContext >& _rxORB )
:ComposerDialog( _rxORB )
{
}
//---------------------------------------------------------------------
- IMPLEMENT_SERVICE_INFO1_STATIC( RowsetFilterDialog, "com.sun.star.uno.comp.sdb.RowsetFilterDialog", "com.sun.star.sdb.FilterDialog" )
+ IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(RowsetFilterDialog, "com.sun.star.uno.comp.sdb.RowsetFilterDialog")
+ IMPLEMENT_SERVICE_INFO_SUPPORTS(RowsetFilterDialog)
+ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(RowsetFilterDialog, "com.sun.star.sdb.FilterDialog")
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL RowsetFilterDialog::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
+ {
+ return static_cast< XServiceInfo* >(new RowsetFilterDialog( comphelper::getComponentContext(_rxORB)));
+ }
+
//---------------------------------------------------------------------
Dialog* RowsetFilterDialog::createComposerDialog( Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns )
{
- return new DlgFilterCrit( _pParent, m_aContext.getUNOContext(), _rxConnection, m_xComposer, _rxColumns );
+ return new DlgFilterCrit( _pParent, m_aContext, _rxConnection, m_xComposer, _rxColumns );
}
void SAL_CALL RowsetFilterDialog::initialize( const Sequence< Any >& aArguments ) throw (Exception, RuntimeException)
@@ -181,13 +191,21 @@ namespace dbaui
//= RowsetOrderDialog
//=====================================================================
//---------------------------------------------------------------------
- RowsetOrderDialog::RowsetOrderDialog( const Reference< XMultiServiceFactory >& _rxORB )
+ RowsetOrderDialog::RowsetOrderDialog( const Reference< XComponentContext >& _rxORB )
:ComposerDialog( _rxORB )
{
}
//---------------------------------------------------------------------
- IMPLEMENT_SERVICE_INFO1_STATIC( RowsetOrderDialog, "com.sun.star.uno.comp.sdb.RowsetOrderDialog", "com.sun.star.sdb.OrderDialog" )
+ IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(RowsetOrderDialog, "com.sun.star.uno.comp.sdb.RowsetOrderDialog")
+ IMPLEMENT_SERVICE_INFO_SUPPORTS(RowsetOrderDialog)
+ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(RowsetOrderDialog, "com.sun.star.sdb.OrderDialog")
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL RowsetOrderDialog::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
+ {
+ return static_cast< XServiceInfo* >(new RowsetOrderDialog( comphelper::getComponentContext(_rxORB)));
+ }
//---------------------------------------------------------------------
Dialog* RowsetOrderDialog::createComposerDialog( Window* _pParent, const Reference< XConnection >& _rxConnection, const Reference< XNameAccess >& _rxColumns )
diff --git a/dbaccess/source/ui/uno/composerdialogs.hxx b/dbaccess/source/ui/uno/composerdialogs.hxx
index 618eacfd902f..846ec80275cb 100644
--- a/dbaccess/source/ui/uno/composerdialogs.hxx
+++ b/dbaccess/source/ui/uno/composerdialogs.hxx
@@ -55,7 +55,7 @@ namespace dbaui
// </properties>
protected:
- ComposerDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ ComposerDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
~ComposerDialog();
public:
@@ -83,7 +83,7 @@ namespace dbaui
{
public:
RowsetFilterDialog(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
);
DECLARE_SERVICE_INFO_STATIC( );
@@ -110,7 +110,7 @@ namespace dbaui
{
public:
RowsetOrderDialog(
- const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB
+ const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB
);
DECLARE_SERVICE_INFO_STATIC( );
diff --git a/dbaccess/source/ui/uno/copytablewizard.cxx b/dbaccess/source/ui/uno/copytablewizard.cxx
index f10d5b2ee8dd..758b4e5c525d 100644
--- a/dbaccess/source/ui/uno/copytablewizard.cxx
+++ b/dbaccess/source/ui/uno/copytablewizard.cxx
@@ -55,7 +55,7 @@
#include <com/sun/star/sdbc/DriverManager.hpp>
#include <com/sun/star/sdbc/ConnectionPool.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <comphelper/interaction.hxx>
#include <comphelper/namedvaluecollection.hxx>
#include <comphelper/proparrhlp.hxx>
@@ -87,6 +87,7 @@ namespace dbaui
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
using ::com::sun::star::uno::Sequence;
+ using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::beans::XPropertySetInfo;
using ::com::sun::star::lang::XMultiServiceFactory;
using ::com::sun::star::beans::Property;
@@ -193,7 +194,7 @@ namespace dbaui
bool isInitialized() const { return m_xSourceConnection.is() && m_pSourceObject.get() && m_xDestConnection.is(); }
protected:
- CopyTableWizard( const Reference< XMultiServiceFactory >& _rxORB );
+ CopyTableWizard( const Reference< XComponentContext >& _rxORB );
~CopyTableWizard();
// OGenericUnoDialog overridables
@@ -338,7 +339,7 @@ namespace dbaui
const CopyTableRowEvent& _rEvent );
private:
- ::comphelper::ComponentContext m_aContext;
+ Reference<XComponentContext> m_xContext;
// attributes
sal_Int16 m_nOperation;
@@ -392,9 +393,9 @@ private:
//=========================================================================
//-------------------------------------------------------------------------
-CopyTableWizard::CopyTableWizard( const Reference< XMultiServiceFactory >& _rxORB )
+CopyTableWizard::CopyTableWizard( const Reference< XComponentContext >& _rxORB )
:CopyTableWizard_Base( _rxORB )
- ,m_aContext( _rxORB )
+ ,m_xContext( _rxORB )
,m_nOperation( CopyTableOperation::CopyDefinitionAndData )
,m_sDestinationTable()
,m_aPrimaryKeyName( sal_False, "ID" )
@@ -432,7 +433,7 @@ CopyTableWizard::~CopyTableWizard()
//-------------------------------------------------------------------------
Reference< XInterface > CopyTableWizard::Create( const Reference< XMultiServiceFactory >& _rxFactory )
{
- return *( new CopyTableWizard( _rxFactory ) );
+ return *( new CopyTableWizard( comphelper::getComponentContext(_rxFactory) ) );
}
//-------------------------------------------------------------------------
@@ -911,7 +912,7 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
OSL_VERIFY( _rxDataSourceDescriptor->getPropertyValue( PROPERTY_DATABASE_LOCATION ) >>= sDatabaseLocation );
// need a DatabaseContext for loading the data source
- Reference< XDatabaseContext > xDatabaseContext = DatabaseContext::create( m_aContext.getUNOContext() );
+ Reference< XDatabaseContext > xDatabaseContext = DatabaseContext::create( m_xContext );
Reference< XDataSource > xDataSource;
if ( !sDataSource.isEmpty() )
xDataSource.set( xDatabaseContext->getByName( sDataSource ), UNO_QUERY_THROW );
@@ -950,11 +951,11 @@ SharedConnection CopyTableWizard::impl_extractConnection_throw( const Reference<
Reference< XDriverManager > xDriverManager;
try {
- xDriverManager.set( ConnectionPool::create( m_aContext.getUNOContext() ), UNO_QUERY_THROW );
+ xDriverManager.set( ConnectionPool::create( m_xContext ), UNO_QUERY_THROW );
} catch( const Exception& ) { }
if ( !xDriverManager.is() )
// no connection pool installed
- xDriverManager.set( DriverManager::create(m_aContext.getUNOContext() ), UNO_QUERY_THROW );
+ xDriverManager.set( DriverManager::create( m_xContext ), UNO_QUERY_THROW );
if ( aConnectionInfo.getLength() )
xConnection.set( xDriverManager->getConnectionWithInfo( sConnectionResource, aConnectionInfo ), UNO_SET_THROW );
@@ -1540,7 +1541,7 @@ void SAL_CALL CopyTableWizard::initialize( const Sequence< Any >& _rArguments )
);
}
if ( !m_xInteractionHandler.is() )
- m_xInteractionHandler.set( InteractionHandler::createWithParent(m_aContext.getUNOContext(), 0), UNO_QUERY );
+ m_xInteractionHandler.set( InteractionHandler::createWithParent(m_xContext, 0), UNO_QUERY );
Reference< XInteractionHandler > xSourceDocHandler;
Reference< XPropertySet > xSourceDescriptor( impl_ensureDataAccessDescriptor_throw( _rArguments, 0, m_xSourceConnection, xSourceDocHandler ) );
@@ -1593,7 +1594,7 @@ Dialog* CopyTableWizard::createDialog( Window* _pParent )
*m_pSourceObject,
m_xSourceConnection.getTyped(),
m_xDestConnection.getTyped(),
- m_aContext.getUNOContext(),
+ m_xContext,
m_xInteractionHandler
);
diff --git a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
index 1db5b7a12460..572126dcc215 100644
--- a/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
+++ b/dbaccess/source/ui/uno/textconnectionsettings_uno.cxx
@@ -30,7 +30,7 @@
#include <com/sun/star/beans/PropertyAttribute.hpp>
#include <com/sun/star/sdb/XTextConnectionSettings.hpp>
-#include <comphelper/componentcontext.hxx>
+#include <comphelper/processfactory.hxx>
#include <svtools/genericunodialog.hxx>
#include <cppuhelper/implbase1.hxx>
@@ -48,6 +48,7 @@ namespace dbaui
using ::com::sun::star::uno::RuntimeException;
using ::com::sun::star::uno::Any;
using ::com::sun::star::uno::makeAny;
+ using ::com::sun::star::uno::XComponentContext;
using ::com::sun::star::beans::XPropertySetInfo;
using ::com::sun::star::uno::Sequence;
using ::com::sun::star::beans::Property;
@@ -74,7 +75,7 @@ namespace dbaui
PropertyValues m_aPropertyValues;
protected:
- OTextConnectionSettingsDialog( const ::comphelper::ComponentContext& _rContext );
+ OTextConnectionSettingsDialog( const Reference<XComponentContext>& _rContext );
virtual ~OTextConnectionSettingsDialog();
public:
@@ -116,8 +117,8 @@ namespace dbaui
//= OTextConnectionSettingsDialog
//====================================================================
//--------------------------------------------------------------------
- OTextConnectionSettingsDialog::OTextConnectionSettingsDialog( const ::comphelper::ComponentContext& _rContext )
- :OTextConnectionSettingsDialog_BASE( _rContext.getLegacyServiceFactory() )
+ OTextConnectionSettingsDialog::OTextConnectionSettingsDialog( const Reference<XComponentContext>& _rContext )
+ :OTextConnectionSettingsDialog_BASE( _rContext )
{
TextConnectionSettingsDialog::bindItemStorages( *m_pDatasourceItems, m_aPropertyValues );
}
@@ -131,7 +132,15 @@ namespace dbaui
IMPLEMENT_IMPLEMENTATION_ID( OTextConnectionSettingsDialog )
//---------------------------------------------------------------------
- IMPLEMENT_SERVICE_INFO1_STATIC( OTextConnectionSettingsDialog, "com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog", "com.sun.star.sdb.TextConnectionSettings" )
+ IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(OTextConnectionSettingsDialog, "com.sun.star.comp.dbaccess.OTextConnectionSettingsDialog")
+ IMPLEMENT_SERVICE_INFO_SUPPORTS(OTextConnectionSettingsDialog)
+ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(OTextConnectionSettingsDialog, "com.sun.star.sdb.TextConnectionSettings")
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL OTextConnectionSettingsDialog::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
+ {
+ return static_cast< XServiceInfo* >(new OTextConnectionSettingsDialog( comphelper::getComponentContext(_rxORB)));
+ }
//---------------------------------------------------------------------
Reference< XPropertySetInfo > SAL_CALL OTextConnectionSettingsDialog::getPropertySetInfo() throw(RuntimeException)
diff --git a/dbaccess/source/ui/uno/unoDirectSql.cxx b/dbaccess/source/ui/uno/unoDirectSql.cxx
index 3bebc92be2d7..b32a2d3efc5b 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.cxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.cxx
@@ -28,6 +28,7 @@
#include "dbustrings.hrc"
#include "datasourceconnector.hxx"
#include <tools/diagnose_ex.h>
+#include <comphelper/processfactory.hxx>
extern "C" void SAL_CALL createRegistryInfo_ODirectSQLDialog()
@@ -53,7 +54,7 @@ namespace dbaui
//=====================================================================
DBG_NAME(ODirectSQLDialog)
//---------------------------------------------------------------------
- ODirectSQLDialog::ODirectSQLDialog(const Reference< XMultiServiceFactory >& _rxORB)
+ ODirectSQLDialog::ODirectSQLDialog(const Reference< XComponentContext >& _rxORB)
:ODirectSQLDialog_BASE( _rxORB )
{
DBG_CTOR(ODirectSQLDialog,NULL);
@@ -71,7 +72,15 @@ DBG_NAME(ODirectSQLDialog)
IMPLEMENT_IMPLEMENTATION_ID( ODirectSQLDialog )
//---------------------------------------------------------------------
- IMPLEMENT_SERVICE_INFO1_STATIC( ODirectSQLDialog, "com.sun.star.comp.sdb.DirectSQLDialog", SERVICE_SDB_DIRECTSQLDIALOG.ascii )
+ IMPLEMENT_SERVICE_INFO_IMPLNAME_STATIC(ODirectSQLDialog, "com.sun.star.comp.sdb.DirectSQLDialog")
+ IMPLEMENT_SERVICE_INFO_SUPPORTS(ODirectSQLDialog)
+ IMPLEMENT_SERVICE_INFO_GETSUPPORTED1_STATIC(ODirectSQLDialog, SERVICE_SDB_DIRECTSQLDIALOG.ascii)
+
+ ::com::sun::star::uno::Reference< ::com::sun::star::uno::XInterface >
+ SAL_CALL ODirectSQLDialog::Create(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB)
+ {
+ return static_cast< XServiceInfo* >(new ODirectSQLDialog( comphelper::getComponentContext(_rxORB)));
+ }
//---------------------------------------------------------------------
IMPLEMENT_PROPERTYCONTAINER_DEFAULTS( ODirectSQLDialog )
@@ -86,7 +95,7 @@ DBG_NAME(ODirectSQLDialog)
try
{
// the connection the row set is working with
- ODatasourceConnector aDSConnector(m_aContext.getUNOContext(), _pParent);
+ ODatasourceConnector aDSConnector(m_aContext, _pParent);
xConnection = aDSConnector.connect( m_sInitialSelection, NULL );
}
catch( const Exception& )
diff --git a/dbaccess/source/ui/uno/unoDirectSql.hxx b/dbaccess/source/ui/uno/unoDirectSql.hxx
index a32c1f48cbd9..54c614489293 100644
--- a/dbaccess/source/ui/uno/unoDirectSql.hxx
+++ b/dbaccess/source/ui/uno/unoDirectSql.hxx
@@ -48,7 +48,7 @@ namespace dbaui
::rtl::OUString m_sInitialSelection;
::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XConnection > m_xActiveConnection;
protected:
- ODirectSQLDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory >& _rxORB);
+ ODirectSQLDialog(const ::com::sun::star::uno::Reference< ::com::sun::star::uno::XComponentContext >& _rxORB);
virtual ~ODirectSQLDialog();
public:
diff --git a/dbaccess/source/ui/uno/unoadmin.cxx b/dbaccess/source/ui/uno/unoadmin.cxx
index 1d9a918db48e..4fb61913e609 100644
--- a/dbaccess/source/ui/uno/unoadmin.cxx
+++ b/dbaccess/source/ui/uno/unoadmin.cxx
@@ -51,7 +51,7 @@ namespace dbaui
//=========================================================================
DBG_NAME(ODatabaseAdministrationDialog)
//-------------------------------------------------------------------------
-ODatabaseAdministrationDialog::ODatabaseAdministrationDialog(const Reference< XMultiServiceFactory >& _rxORB)
+ODatabaseAdministrationDialog::ODatabaseAdministrationDialog(const Reference< XComponentContext >& _rxORB)
:ODatabaseAdministrationDialogBase(_rxORB)
,m_pDatasourceItems(NULL)
,m_pItemPool(NULL)
@@ -60,7 +60,7 @@ ODatabaseAdministrationDialog::ODatabaseAdministrationDialog(const Reference< XM
{
DBG_CTOR(ODatabaseAdministrationDialog,NULL);
- m_pCollection = new ::dbaccess::ODsnTypeCollection(comphelper::getComponentContext(_rxORB));
+ m_pCollection = new ::dbaccess::ODsnTypeCollection(_rxORB);
ODbAdminDialog::createItemSet(m_pDatasourceItems, m_pItemPool, m_pItemPoolDefaults, m_pCollection);
}
diff --git a/dbaccess/source/ui/uno/unosqlmessage.cxx b/dbaccess/source/ui/uno/unosqlmessage.cxx
index d40473076f44..94ceda731275 100644
--- a/dbaccess/source/ui/uno/unosqlmessage.cxx
+++ b/dbaccess/source/ui/uno/unosqlmessage.cxx
@@ -22,6 +22,7 @@
#include "unosqlmessage.hxx"
#include "dbu_reghelper.hxx"
#include "dbustrings.hrc"
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <connectivity/dbexception.hxx>
@@ -47,7 +48,7 @@ namespace dbaui
//=========================================================================
//-------------------------------------------------------------------------
-OSQLMessageDialog::OSQLMessageDialog(const Reference< XMultiServiceFactory >& _rxORB)
+OSQLMessageDialog::OSQLMessageDialog(const Reference< XComponentContext >& _rxORB)
:OSQLMessageDialogBase(_rxORB)
{
registerMayBeVoidProperty(PROPERTY_SQLEXCEPTION, PROPERTY_ID_SQLEXCEPTION, PropertyAttribute::TRANSIENT | PropertyAttribute::MAYBEVOID,
@@ -66,7 +67,7 @@ Sequence<sal_Int8> SAL_CALL OSQLMessageDialog::getImplementationId( ) throw(Run
//-------------------------------------------------------------------------
Reference< XInterface > SAL_CALL OSQLMessageDialog::Create(const Reference< XMultiServiceFactory >& _rxFactory)
{
- return *(new OSQLMessageDialog(_rxFactory));
+ return *(new OSQLMessageDialog( comphelper::getComponentContext(_rxFactory) ));
}
//-------------------------------------------------------------------------