summaryrefslogtreecommitdiff
path: root/ucbhelper
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-11-08 08:16:06 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-11-30 13:59:47 +0100
commit2cf0f6ea36e1525193544258eef2828a54345510 (patch)
treeb1033cc7f7ef1061bc16baa8a52480ced38e8b55 /ucbhelper
parent48f2b7a7af3d4e9bf1b3c27e9aa5e12e60878051 (diff)
fdo#46808, use service constructor for ucb::CachedDynamicResultSetStubFactory
Change-Id: Iea7b21621c5d341468976507684a9c01f0822034
Diffstat (limited to 'ucbhelper')
-rw-r--r--ucbhelper/inc/ucbhelper/resultsethelper.hxx7
-rw-r--r--ucbhelper/source/provider/resultsethelper.cxx15
2 files changed, 9 insertions, 13 deletions
diff --git a/ucbhelper/inc/ucbhelper/resultsethelper.hxx b/ucbhelper/inc/ucbhelper/resultsethelper.hxx
index 8ee7f243c2fa..e23cc508b108 100644
--- a/ucbhelper/inc/ucbhelper/resultsethelper.hxx
+++ b/ucbhelper/inc/ucbhelper/resultsethelper.hxx
@@ -21,7 +21,6 @@
#define _UCBHELPER_RESULTSETHELPER_HXX
#include <osl/mutex.hxx>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/ucb/XDynamicResultSet.hpp>
@@ -67,7 +66,7 @@ protected:
osl::Mutex m_aMutex;
com::sun::star::ucb::OpenCommandArgument2 m_aCommand;
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
+ com::sun::star::uno::XComponentContext > m_xContext;
// Resultset #1
com::sun::star::uno::Reference<
com::sun::star::sdbc::XResultSet > m_xResultSet1;
@@ -121,13 +120,13 @@ public:
/**
* Construtor.
*
- * @param rxSMgr is a Service Manager.
+ * @param rxContext is a Service Manager.
* @param rCommand is the paramter for the open command that produces
* this resultset.
*/
ResultSetImplHelper(
const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ com::sun::star::uno::XComponentContext >& rxContext,
const com::sun::star::ucb::OpenCommandArgument2& rCommand );
/**
diff --git a/ucbhelper/source/provider/resultsethelper.cxx b/ucbhelper/source/provider/resultsethelper.cxx
index e57bb5699c0e..7b3372111e8c 100644
--- a/ucbhelper/source/provider/resultsethelper.cxx
+++ b/ucbhelper/source/provider/resultsethelper.cxx
@@ -28,10 +28,11 @@
*************************************************************************/
#include <com/sun/star/ucb/ListActionType.hpp>
#include <com/sun/star/ucb/WelcomeDynamicResultSetStruct.hpp>
-#include <com/sun/star/ucb/XCachedDynamicResultSetStubFactory.hpp>
+#include <com/sun/star/ucb/CachedDynamicResultSetStubFactory.hpp>
#include <com/sun/star/ucb/XSourceInitialization.hpp>
#include <cppuhelper/interfacecontainer.hxx>
#include <ucbhelper/resultsethelper.hxx>
+#include <ucbhelper/getcomponentcontext.hxx>
#include "osl/diagnose.h"
@@ -49,13 +50,13 @@ namespace ucbhelper {
//=========================================================================
ResultSetImplHelper::ResultSetImplHelper(
- const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+ const uno::Reference< uno::XComponentContext >& rxContext,
const com::sun::star::ucb::OpenCommandArgument2& rCommand )
: m_pDisposeEventListeners( 0 ),
m_bStatic( sal_False ),
m_bInitDone( sal_False ),
m_aCommand( rCommand ),
- m_xSMgr( rxSMgr )
+ m_xContext( rxContext )
{
}
@@ -249,12 +250,8 @@ void SAL_CALL ResultSetImplHelper::connectToCache(
try
{
xStubFactory
- = uno::Reference<
- com::sun::star::ucb::XCachedDynamicResultSetStubFactory >(
- m_xSMgr->createInstance(
- rtl::OUString(
- "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ),
- uno::UNO_QUERY );
+ = com::sun::star::ucb::CachedDynamicResultSetStubFactory::create(
+ m_xContext );
}
catch ( uno::Exception const & )
{