summaryrefslogtreecommitdiff
path: root/sc/source/ui
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-02 15:03:12 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-04 14:42:52 +0200
commitc25cb8a641723ab098980bb842caf75c0dc9b059 (patch)
treee264e2727309789e06147a7275b91abd05f9fcff /sc/source/ui
parent0f3f9cb63056715845d9c3565bde69470c73efb2 (diff)
fdo#46808, Adapt task::InteractionHandler UNO service to new style
Since we don't need to expose XInitialisation, we can make the new-style service implement XInteractionHandler2. Change-Id: Ib27beed1c12df17592c6472d6f58c233d2c41558
Diffstat (limited to 'sc/source/ui')
-rw-r--r--sc/source/ui/dbgui/dapidata.cxx7
-rw-r--r--sc/source/ui/docshell/dbdocimp.cxx7
2 files changed, 6 insertions, 8 deletions
diff --git a/sc/source/ui/dbgui/dapidata.cxx b/sc/source/ui/dbgui/dapidata.cxx
index 862698318895..117a8e7ef668 100644
--- a/sc/source/ui/dbgui/dapidata.cxx
+++ b/sc/source/ui/dbgui/dapidata.cxx
@@ -42,6 +42,7 @@
#include <com/sun/star/sdb/DatabaseContext.hpp>
#include <com/sun/star/sdb/XQueriesSupplier.hpp>
#include <com/sun/star/sdb/XCompletedConnection.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
using namespace com::sun::star;
@@ -54,7 +55,6 @@ using namespace com::sun::star;
//-------------------------------------------------------------------------
-#define SC_SERVICE_INTHANDLER "com.sun.star.task.InteractionHandler"
// entries in the "type" ListBox
#define DP_TYPELIST_TABLE 0
@@ -165,9 +165,8 @@ void ScDataPilotDatabaseDlg::FillObjects()
if ( !xSource.is() ) return;
uno::Reference<task::XInteractionHandler> xHandler(
- comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_INTHANDLER )) ),
- uno::UNO_QUERY);
+ task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
+ uno::UNO_QUERY_THROW);
uno::Reference<sdbc::XConnection> xConnection = xSource->connectWithCompletion( xHandler );
diff --git a/sc/source/ui/docshell/dbdocimp.cxx b/sc/source/ui/docshell/dbdocimp.cxx
index 14da13deaeea..5b849909ef23 100644
--- a/sc/source/ui/docshell/dbdocimp.cxx
+++ b/sc/source/ui/docshell/dbdocimp.cxx
@@ -38,6 +38,7 @@
#include <com/sun/star/sdbc/XRowSet.hpp>
#include <com/sun/star/sdbc/XResultSetMetaDataSupplier.hpp>
#include <com/sun/star/sdbcx/XRowLocate.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -66,7 +67,6 @@
using namespace com::sun::star;
#define SC_SERVICE_ROWSET "com.sun.star.sdb.RowSet"
-#define SC_SERVICE_INTHANDLER "com.sun.star.task.InteractionHandler"
//! move to a header file?
#define SC_DBPROP_DATASOURCENAME "DataSourceName"
@@ -252,9 +252,8 @@ bool ScDBDocFunc::DoImport( SCTAB nTab, const ScImportParam& rParam,
if ( xExecute.is() )
{
uno::Reference<task::XInteractionHandler> xHandler(
- comphelper::getProcessServiceFactory()->createInstance(
- rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( SC_SERVICE_INTHANDLER )) ),
- uno::UNO_QUERY);
+ task::InteractionHandler::createDefault(comphelper::getProcessComponentContext()),
+ uno::UNO_QUERY_THROW);
xExecute->executeWithCompletion( xHandler );
}
else