summaryrefslogtreecommitdiff
path: root/extensions/source/dbpilots
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 /extensions/source/dbpilots
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 'extensions/source/dbpilots')
-rw-r--r--extensions/source/dbpilots/controlwizard.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/extensions/source/dbpilots/controlwizard.cxx b/extensions/source/dbpilots/controlwizard.cxx
index 47c6bb55ed48..cb5a0d4721f1 100644
--- a/extensions/source/dbpilots/controlwizard.cxx
+++ b/extensions/source/dbpilots/controlwizard.cxx
@@ -42,6 +42,7 @@
#include <com/sun/star/sdb/CommandType.hpp>
#include <com/sun/star/sdbc/SQLWarning.hpp>
#include <com/sun/star/sdb/SQLContext.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <comphelper/processfactory.hxx>
#include <comphelper/types.hxx>
#include <connectivity/dbtools.hxx>
@@ -514,16 +515,17 @@ namespace dbp
//---------------------------------------------------------------------
Reference< XInteractionHandler > OControlWizard::getInteractionHandler(Window* _pWindow) const
{
- const ::rtl::OUString sInteractionHandlerServiceName("com.sun.star.task.InteractionHandler");
Reference< XInteractionHandler > xHandler;
try
{
- if (getServiceFactory().is())
- xHandler = Reference< XInteractionHandler >(getServiceFactory()->createInstance(sInteractionHandlerServiceName), UNO_QUERY);
+ xHandler = Reference< XInteractionHandler >( InteractionHandler::createDefault(comphelper::getComponentContext(getServiceFactory())), UNO_QUERY_THROW );
}
catch(const Exception&) { }
if (!xHandler.is())
+ {
+ const ::rtl::OUString sInteractionHandlerServiceName("com.sun.star.task.InteractionHandler");
ShowServiceNotAvailableError(_pWindow, sInteractionHandlerServiceName, sal_True);
+ }
return xHandler;
}
//---------------------------------------------------------------------