summaryrefslogtreecommitdiff
path: root/svx/source
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 /svx/source
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 'svx/source')
-rw-r--r--svx/source/fmcomp/fmgridcl.cxx3
-rw-r--r--svx/source/form/dbtoolsclient.cxx4
-rw-r--r--svx/source/form/fmvwimp.cxx2
-rw-r--r--svx/source/form/formcontroller.cxx4
4 files changed, 8 insertions, 5 deletions
diff --git a/svx/source/fmcomp/fmgridcl.cxx b/svx/source/fmcomp/fmgridcl.cxx
index f301612431bb..acbf420435a4 100644
--- a/svx/source/fmcomp/fmgridcl.cxx
+++ b/svx/source/fmcomp/fmgridcl.cxx
@@ -295,7 +295,8 @@ sal_Int8 FmGridHeader::ExecuteDrop( const ExecuteDropEvent& _rEvt )
try
{
::rtl::OUString sSignificantSource( sDatasouce.isEmpty() ? sDatabaseLocation : sDatasouce );
- xConnection = OStaticDataAccessTools().getConnection_withFeedback(sSignificantSource, ::rtl::OUString(),::rtl::OUString(),static_cast<FmGridControl*>(GetParent())->getServiceManager());
+ xConnection = OStaticDataAccessTools().getConnection_withFeedback(sSignificantSource, ::rtl::OUString(),::rtl::OUString(),
+ comphelper::getComponentContext( static_cast<FmGridControl*>(GetParent())->getServiceManager() ));
}
catch(NoSuchElementException&)
{ // allowed, means sDatasouce isn't a valid data source name ....
diff --git a/svx/source/form/dbtoolsclient.cxx b/svx/source/form/dbtoolsclient.cxx
index c07be75cc19e..a7a2b03f5d8f 100644
--- a/svx/source/form/dbtoolsclient.cxx
+++ b/svx/source/form/dbtoolsclient.cxx
@@ -193,12 +193,12 @@ namespace svxform
//--------------------------------------------------------------------
Reference< XConnection> OStaticDataAccessTools::getConnection_withFeedback(const ::rtl::OUString& _rDataSourceName,
- const ::rtl::OUString& _rUser, const ::rtl::OUString& _rPwd, const Reference< XMultiServiceFactory>& _rxFactory) const
+ const ::rtl::OUString& _rUser, const ::rtl::OUString& _rPwd, const Reference<XComponentContext>& _rxContext) const
SAL_THROW ( (SQLException) )
{
Reference< XConnection > xReturn;
if ( ensureLoaded() )
- xReturn = m_xDataAccessTools->getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxFactory);
+ xReturn = m_xDataAccessTools->getConnection_withFeedback(_rDataSourceName, _rUser, _rPwd, _rxContext);
return xReturn;
}
diff --git a/svx/source/form/fmvwimp.cxx b/svx/source/form/fmvwimp.cxx
index d55071e7aff6..0814b5f92e2f 100644
--- a/svx/source/form/fmvwimp.cxx
+++ b/svx/source/form/fmvwimp.cxx
@@ -1185,7 +1185,7 @@ SdrObject* FmXFormView::implCreateFieldControl( const ::svx::ODataAccessDescript
sDataSource,
::rtl::OUString(),
::rtl::OUString(),
- m_aContext.getLegacyServiceFactory()
+ m_aContext.getUNOContext()
) );
}
catch (const SQLException&)
diff --git a/svx/source/form/formcontroller.cxx b/svx/source/form/formcontroller.cxx
index d18e6bb1cc0d..5dbb628d6b2f 100644
--- a/svx/source/form/formcontroller.cxx
+++ b/svx/source/form/formcontroller.cxx
@@ -61,6 +61,7 @@
#include <com/sun/star/sdb/XInteractionSupplyParameters.hpp>
#include <com/sun/star/sdbc/ColumnValue.hpp>
#include <com/sun/star/sdbc/DataType.hpp>
+#include <com/sun/star/task/InteractionHandler.hpp>
#include <com/sun/star/util/XURLTransformer.hpp>
#include <com/sun/star/form/runtime/FormOperations.hpp>
#include <com/sun/star/form/runtime/FormFeature.hpp>
@@ -199,6 +200,7 @@ namespace svxform
using ::com::sun::star::util::URL;
using ::com::sun::star::frame::FeatureStateEvent;
using ::com::sun::star::form::runtime::XFormControllerContext;
+ using ::com::sun::star::task::InteractionHandler;
using ::com::sun::star::task::XInteractionHandler;
using ::com::sun::star::form::runtime::FormOperations;
using ::com::sun::star::container::XContainer;
@@ -4272,7 +4274,7 @@ bool FormController::ensureInteractionHandler()
return false;
m_bAttemptedHandlerCreation = true;
- m_xInteractionHandler.set( m_aContext.createComponent( ::rtl::OUString( "com.sun.star.task.InteractionHandler" ) ), UNO_QUERY );
+ m_xInteractionHandler.set( InteractionHandler::createDefault(m_aContext.getUNOContext()), UNO_QUERY );
OSL_ENSURE( m_xInteractionHandler.is(), "FormController::ensureInteractionHandler: could not create an interaction handler!" );
return m_xInteractionHandler.is();
}