summaryrefslogtreecommitdiff
path: root/ucb/source/sorter
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 /ucb/source/sorter
parent48f2b7a7af3d4e9bf1b3c27e9aa5e12e60878051 (diff)
fdo#46808, use service constructor for ucb::CachedDynamicResultSetStubFactory
Change-Id: Iea7b21621c5d341468976507684a9c01f0822034
Diffstat (limited to 'ucb/source/sorter')
-rw-r--r--ucb/source/sorter/sortdynres.cxx21
-rw-r--r--ucb/source/sorter/sortdynres.hxx12
2 files changed, 15 insertions, 18 deletions
diff --git a/ucb/source/sorter/sortdynres.cxx b/ucb/source/sorter/sortdynres.cxx
index e66e323b3d40..4f98f045728e 100644
--- a/ucb/source/sorter/sortdynres.cxx
+++ b/ucb/source/sorter/sortdynres.cxx
@@ -24,7 +24,7 @@
#include <com/sun/star/ucb/ContentResultSetCapability.hpp>
#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>
//-----------------------------------------------------------------------------
@@ -66,7 +66,7 @@ SortedDynamicResultSet::SortedDynamicResultSet(
const Reference < XDynamicResultSet > &xOriginal,
const Sequence < NumberedSortingInfo > &aOptions,
const Reference < XAnyCompareFactory > &xCompFac,
- const Reference < XMultiServiceFactory > &xSMgr )
+ const Reference < XComponentContext > &rxContext )
{
mpDisposeEventListeners = NULL;
mpOwnListener = new SortedDynamicResultSetListener( this );
@@ -76,7 +76,7 @@ SortedDynamicResultSet::SortedDynamicResultSet(
mxOriginal = xOriginal;
maOptions = aOptions;
mxCompFac = xCompFac;
- mxSMgr = xSMgr;
+ m_xContext = rxContext;
mpOne = NULL;
mpTwo = NULL;
@@ -236,15 +236,12 @@ SortedDynamicResultSet::connectToCache(
throw ListenerAlreadySetException();
Reference< XSourceInitialization > xTarget( xCache, UNO_QUERY );
- if( xTarget.is() && mxSMgr.is() )
+ if( xTarget.is() && m_xContext.is() )
{
Reference< XCachedDynamicResultSetStubFactory > xStubFactory;
try
{
- xStubFactory = Reference< XCachedDynamicResultSetStubFactory >(
- mxSMgr->createInstance(
- OUString( "com.sun.star.ucb.CachedDynamicResultSetStubFactory" ) ),
- UNO_QUERY );
+ xStubFactory = CachedDynamicResultSetStubFactory::create( m_xContext );
}
catch ( Exception const & )
{
@@ -466,9 +463,9 @@ void SortedDynamicResultSet::SendNotify()
//
//=========================================================================
SortedDynamicResultSetFactory::SortedDynamicResultSetFactory(
- const Reference< XMultiServiceFactory > & rSMgr )
+ const Reference< XComponentContext > & rxContext )
{
- mxSMgr = rSMgr;
+ m_xContext = rxContext;
}
//--------------------------------------------------------------------------
@@ -498,7 +495,7 @@ XTYPEPROVIDER_IMPL_3( SortedDynamicResultSetFactory,
// XServiceInfo methods.
//--------------------------------------------------------------------------
-XSERVICEINFO_IMPL_1( SortedDynamicResultSetFactory,
+XSERVICEINFO_IMPL_1_CTX( SortedDynamicResultSetFactory,
OUString( "com.sun.star.comp.ucb.SortedDynamicResultSetFactory" ),
OUString( DYNAMIC_RESULTSET_FACTORY_NAME ) );
@@ -519,7 +516,7 @@ SortedDynamicResultSetFactory::createSortedDynamicResultSet(
throw( RuntimeException )
{
Reference< XDynamicResultSet > xRet;
- xRet = new SortedDynamicResultSet( Source, Info, CompareFactory, mxSMgr );
+ xRet = new SortedDynamicResultSet( Source, Info, CompareFactory, m_xContext );
return xRet;
}
diff --git a/ucb/source/sorter/sortdynres.hxx b/ucb/source/sorter/sortdynres.hxx
index 75d9ae976cc3..6ba2a77c14a7 100644
--- a/ucb/source/sorter/sortdynres.hxx
+++ b/ucb/source/sorter/sortdynres.hxx
@@ -20,7 +20,7 @@
#ifndef _SORTDYNRES_HXX
#define _SORTDYNRES_HXX
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/lang/XTypeProvider.hpp>
#include <com/sun/star/lang/XServiceInfo.hpp>
#include <com/sun/star/lang/XComponent.hpp>
@@ -47,7 +47,7 @@ namespace cppu {
#define SEQUENCE com::sun::star::uno::Sequence
#define EVENTOBJECT com::sun::star::lang::EventObject
#define XEVENTLISTENER com::sun::star::lang::XEventListener
-#define XMULTISERVICEFACTORY com::sun::star::lang::XMultiServiceFactory
+#define XCOMPONENTCONTEXT com::sun::star::uno::XComponentContext
#define XRESULTSET com::sun::star::sdbc::XResultSet
#define SQLEXCEPTION com::sun::star::sdbc::SQLException
#define XANYCOMPAREFACTORY com::sun::star::ucb::XAnyCompareFactory
@@ -77,7 +77,7 @@ class SortedDynamicResultSet:
REFERENCE < XDYNAMICRESULTSET > mxOriginal;
SEQUENCE < NUMBERED_SORTINGINFO > maOptions;
REFERENCE < XANYCOMPAREFACTORY > mxCompFac;
- REFERENCE < XMULTISERVICEFACTORY > mxSMgr;
+ REFERENCE < XCOMPONENTCONTEXT > m_xContext;
SortedResultSet* mpOne;
SortedResultSet* mpTwo;
@@ -97,7 +97,7 @@ public:
SortedDynamicResultSet( const REFERENCE < XDYNAMICRESULTSET > &xOriginal,
const SEQUENCE < NUMBERED_SORTINGINFO > &aOptions,
const REFERENCE < XANYCOMPAREFACTORY > &xCompFac,
- const REFERENCE < XMULTISERVICEFACTORY > &xSMgr );
+ const REFERENCE < XCOMPONENTCONTEXT > &rxContext );
~SortedDynamicResultSet();
@@ -211,12 +211,12 @@ class SortedDynamicResultSetFactory:
public com::sun::star::ucb::XSortedDynamicResultSetFactory
{
- REFERENCE< XMULTISERVICEFACTORY > mxSMgr;
+ REFERENCE< XCOMPONENTCONTEXT > m_xContext;
public:
SortedDynamicResultSetFactory(
- const REFERENCE< XMULTISERVICEFACTORY > & rSMgr);
+ const REFERENCE< XCOMPONENTCONTEXT > & rxContext);
~SortedDynamicResultSetFactory();