summaryrefslogtreecommitdiff
path: root/dbaccess/source/ui/uno/unoDirectSql.cxx
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/unoDirectSql.cxx
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/unoDirectSql.cxx')
-rw-r--r--dbaccess/source/ui/uno/unoDirectSql.cxx15
1 files changed, 12 insertions, 3 deletions
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& )