Kaydet (Commit) 48f2b7a7 authored tarafından Noel Grandin's avatar Noel Grandin Kaydeden (comit) Stephan Bergmann

fdo#46808, convert ucbhelper::ResultSet to XComponentContext

Along the way, remove the XMultiServiceFactory member from
a few classes that were not using it.

Change-Id: I9ee2c2ebc01144301ed8e489bd92b4695ff263d0
üst f96db7d0
...@@ -78,15 +78,12 @@ struct DataSupplier_Impl ...@@ -78,15 +78,12 @@ struct DataSupplier_Impl
osl::Mutex m_aMutex; osl::Mutex m_aMutex;
ResultList m_aResults; ResultList m_aResults;
rtl::Reference< ODocumentContainer > m_xContent; rtl::Reference< ODocumentContainer > m_xContent;
Reference< XMultiServiceFactory > m_xSMgr;
sal_Int32 m_nOpenMode; sal_Int32 m_nOpenMode;
sal_Bool m_bCountFinal; sal_Bool m_bCountFinal;
DataSupplier_Impl( const Reference< XMultiServiceFactory >& rxSMgr, DataSupplier_Impl( const rtl::Reference< ODocumentContainer >& rContent,
const rtl::Reference< ODocumentContainer >& rContent,
sal_Int32 nOpenMode ) sal_Int32 nOpenMode )
: m_xContent(rContent) : m_xContent(rContent)
, m_xSMgr( rxSMgr )
, m_nOpenMode( nOpenMode ) , m_nOpenMode( nOpenMode )
, m_bCountFinal( sal_False ) {} , m_bCountFinal( sal_False ) {}
~DataSupplier_Impl(); ~DataSupplier_Impl();
...@@ -114,10 +111,9 @@ DataSupplier_Impl::~DataSupplier_Impl() ...@@ -114,10 +111,9 @@ DataSupplier_Impl::~DataSupplier_Impl()
//========================================================================= //=========================================================================
DBG_NAME(DataSupplier) DBG_NAME(DataSupplier)
DataSupplier::DataSupplier( const Reference< XMultiServiceFactory >& rxSMgr, DataSupplier::DataSupplier( const rtl::Reference< ODocumentContainer >& rContent,
const rtl::Reference< ODocumentContainer >& rContent,
sal_Int32 nOpenMode ) sal_Int32 nOpenMode )
: m_pImpl( new DataSupplier_Impl( rxSMgr, rContent,nOpenMode ) ) : m_pImpl( new DataSupplier_Impl( rContent,nOpenMode ) )
{ {
DBG_CTOR(DataSupplier,NULL); DBG_CTOR(DataSupplier,NULL);
......
...@@ -34,9 +34,7 @@ class DataSupplier : public ucbhelper::ResultSetDataSupplier ...@@ -34,9 +34,7 @@ class DataSupplier : public ucbhelper::ResultSetDataSupplier
::std::auto_ptr<DataSupplier_Impl> m_pImpl; ::std::auto_ptr<DataSupplier_Impl> m_pImpl;
public: public:
DataSupplier( const com::sun::star::uno::Reference< DataSupplier( const rtl::Reference< ODocumentContainer >& rxContent,
com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
const rtl::Reference< ODocumentContainer >& rxContent,
sal_Int32 nOpenMode ); sal_Int32 nOpenMode );
virtual ~DataSupplier(); virtual ~DataSupplier();
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include "myucp_datasupplier.hxx" #include "myucp_datasupplier.hxx"
#include "myucp_resultset.hxx" #include "myucp_resultset.hxx"
#include <comphelper/processfactory.hxx>
using namespace ::com::sun::star::uno; using namespace ::com::sun::star::uno;
...@@ -66,10 +67,9 @@ DynamicResultSet::DynamicResultSet( ...@@ -66,10 +67,9 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic() void DynamicResultSet::initStatic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xContent,
m_xContent,
m_aCommand.Mode ), m_aCommand.Mode ),
m_xEnv ); m_xEnv );
} }
...@@ -77,10 +77,9 @@ void DynamicResultSet::initStatic() ...@@ -77,10 +77,9 @@ void DynamicResultSet::initStatic()
void DynamicResultSet::initDynamic() void DynamicResultSet::initDynamic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xContent,
m_xContent,
m_aCommand.Mode ), m_aCommand.Mode ),
m_xEnv ); m_xEnv );
m_xResultSet2 = m_xResultSet1; m_xResultSet2 = m_xResultSet1;
......
...@@ -32,6 +32,7 @@ $(eval $(call gb_Library_set_componentfile,ucpgio1,ucb/source/ucp/gio/ucpgio)) ...@@ -32,6 +32,7 @@ $(eval $(call gb_Library_set_componentfile,ucpgio1,ucb/source/ucp/gio/ucpgio))
$(eval $(call gb_Library_use_sdk_api,ucpgio1)) $(eval $(call gb_Library_use_sdk_api,ucpgio1))
$(eval $(call gb_Library_use_libraries,ucpgio1,\ $(eval $(call gb_Library_use_libraries,ucpgio1,\
comphelper \
cppu \ cppu \
cppuhelper \ cppuhelper \
sal \ sal \
......
...@@ -28,9 +28,8 @@ namespace cmis ...@@ -28,9 +28,8 @@ namespace cmis
typedef std::vector< ResultListEntry* > ResultList; typedef std::vector< ResultListEntry* > ResultList;
DataSupplier::DataSupplier( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, DataSupplier::DataSupplier( ChildrenProvider* pChildrenProvider, sal_Int32 nOpenMode )
ChildrenProvider* pChildrenProvider, sal_Int32 nOpenMode ) : m_pChildrenProvider( pChildrenProvider ), mnOpenMode(nOpenMode), mbCountFinal(false)
: m_pChildrenProvider( pChildrenProvider ), m_xSMgr(rxSMgr), mnOpenMode(nOpenMode), mbCountFinal(false)
{ {
} }
......
...@@ -41,15 +41,13 @@ namespace cmis ...@@ -41,15 +41,13 @@ namespace cmis
{ {
private: private:
ChildrenProvider* m_pChildrenProvider; ChildrenProvider* m_pChildrenProvider;
com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xSMgr;
sal_Int32 mnOpenMode; sal_Int32 mnOpenMode;
bool mbCountFinal; bool mbCountFinal;
bool getData(); bool getData();
ResultList maResults; ResultList maResults;
public: public:
DataSupplier( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& rxSMgr, DataSupplier( ChildrenProvider* pChildrenProvider, sal_Int32 nOpenMode );
ChildrenProvider* pChildrenProvider, sal_Int32 nOpenMode );
virtual ~DataSupplier(); virtual ~DataSupplier();
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
#include "cmis_datasupplier.hxx" #include "cmis_datasupplier.hxx"
#include "cmis_resultset.hxx" #include "cmis_resultset.hxx"
#include <comphelper/processfactory.hxx>
using namespace com::sun::star::lang; using namespace com::sun::star::lang;
using namespace com::sun::star::ucb; using namespace com::sun::star::ucb;
...@@ -30,8 +31,8 @@ namespace cmis ...@@ -30,8 +31,8 @@ namespace cmis
void DynamicResultSet::initStatic() void DynamicResultSet::initStatic()
{ {
m_xResultSet1 = new ::ucbhelper::ResultSet( m_xResultSet1 = new ::ucbhelper::ResultSet(
m_xSMgr, m_aCommand.Properties, comphelper::getComponentContext(m_xSMgr), m_aCommand.Properties,
new DataSupplier( m_xSMgr, m_pChildrenProvider, m_aCommand.Mode ), m_xEnv ); new DataSupplier( m_pChildrenProvider, m_aCommand.Mode ), m_xEnv );
} }
void DynamicResultSet::initDynamic() void DynamicResultSet::initDynamic()
......
...@@ -22,6 +22,7 @@ ...@@ -22,6 +22,7 @@
#include "ucpext_datasupplier.hxx" #include "ucpext_datasupplier.hxx"
#include <ucbhelper/resultset.hxx> #include <ucbhelper/resultset.hxx>
#include <comphelper/processfactory.hxx>
//...................................................................................................................... //......................................................................................................................
namespace ucb { namespace ucp { namespace ext namespace ucb { namespace ucp { namespace ext
...@@ -67,7 +68,7 @@ namespace ucb { namespace ucp { namespace ext ...@@ -67,7 +68,7 @@ namespace ucb { namespace ucp { namespace ext
m_aCommand.Mode m_aCommand.Mode
) ); ) );
m_xResultSet1 = new ::ucbhelper::ResultSet( m_xResultSet1 = new ::ucbhelper::ResultSet(
m_xSMgr, comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
pDataSupplier.get(), pDataSupplier.get(),
m_xEnvironment m_xEnvironment
......
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
#include "gio_datasupplier.hxx" #include "gio_datasupplier.hxx"
#include "gio_resultset.hxx" #include "gio_resultset.hxx"
#include "comphelper/processfactory.hxx"
using namespace com::sun::star::lang; using namespace com::sun::star::lang;
using namespace com::sun::star::ucb; using namespace com::sun::star::ucb;
...@@ -40,7 +41,7 @@ DynamicResultSet::DynamicResultSet( ...@@ -40,7 +41,7 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic() void DynamicResultSet::initStatic()
{ {
m_xResultSet1 = new ::ucbhelper::ResultSet( m_xResultSet1 = new ::ucbhelper::ResultSet(
m_xSMgr, m_aCommand.Properties, comphelper::getComponentContext(m_xSMgr), m_aCommand.Properties,
new DataSupplier( m_xSMgr, m_xContent, m_aCommand.Mode ), m_xEnv ); new DataSupplier( m_xSMgr, m_xContent, m_aCommand.Mode ), m_xEnv );
} }
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include <libgnomevfs/gnome-vfs-utils.h> #include <libgnomevfs/gnome-vfs-utils.h>
#include <libgnomevfs/gnome-vfs-directory.h> #include <libgnomevfs/gnome-vfs-directory.h>
#include <comphelper/processfactory.hxx>
using namespace com::sun::star; using namespace com::sun::star;
using namespace gvfs; using namespace gvfs;
...@@ -50,10 +51,9 @@ DynamicResultSet::DynamicResultSet( ...@@ -50,10 +51,9 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic() void DynamicResultSet::initStatic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xContent,
m_xContent,
m_aCommand.Mode ), m_aCommand.Mode ),
m_xEnv ); m_xEnv );
} }
...@@ -108,15 +108,13 @@ struct gvfs::DataSupplier_Impl ...@@ -108,15 +108,13 @@ struct gvfs::DataSupplier_Impl
osl::Mutex m_aMutex; osl::Mutex m_aMutex;
ResultList m_aResults; ResultList m_aResults;
rtl::Reference< Content > m_xContent; rtl::Reference< Content > m_xContent;
uno::Reference< lang::XMultiServiceFactory > m_xSMgr;
sal_Int32 m_nOpenMode; sal_Int32 m_nOpenMode;
sal_Bool m_bCountFinal; sal_Bool m_bCountFinal;
DataSupplier_Impl( DataSupplier_Impl(
const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
const rtl::Reference< Content >& rContent, const rtl::Reference< Content >& rContent,
sal_Int32 nOpenMode ) sal_Int32 nOpenMode )
: m_xContent( rContent ), m_xSMgr( rxSMgr ), : m_xContent( rContent ),
m_nOpenMode( nOpenMode ), m_bCountFinal( sal_False ) {} m_nOpenMode( nOpenMode ), m_bCountFinal( sal_False ) {}
~DataSupplier_Impl() ~DataSupplier_Impl()
{ {
...@@ -132,10 +130,9 @@ struct gvfs::DataSupplier_Impl ...@@ -132,10 +130,9 @@ struct gvfs::DataSupplier_Impl
}; };
DataSupplier::DataSupplier( DataSupplier::DataSupplier(
const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
const rtl::Reference< Content >& rContent, const rtl::Reference< Content >& rContent,
sal_Int32 nOpenMode ) sal_Int32 nOpenMode )
: m_pImpl( new DataSupplier_Impl( rxSMgr, rContent, nOpenMode ) ) : m_pImpl( new DataSupplier_Impl( rContent, nOpenMode ) )
{ {
} }
......
...@@ -54,9 +54,7 @@ private: ...@@ -54,9 +54,7 @@ private:
sal_Bool getData(); sal_Bool getData();
public: public:
DataSupplier( const com::sun::star::uno::Reference< DataSupplier(const rtl::Reference< Content >& rContent,
com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
const rtl::Reference< Content >& rContent,
sal_Int32 nOpenMode); sal_Int32 nOpenMode);
virtual ~DataSupplier(); virtual ~DataSupplier();
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
*************************************************************************/ *************************************************************************/
#include "hierarchydatasupplier.hxx" #include "hierarchydatasupplier.hxx"
#include "dynamicresultset.hxx" #include "dynamicresultset.hxx"
#include <comphelper/processfactory.hxx>
using namespace com::sun::star; using namespace com::sun::star;
using namespace hierarchy_ucp; using namespace hierarchy_ucp;
...@@ -59,7 +60,7 @@ void DynamicResultSet::initStatic() ...@@ -59,7 +60,7 @@ void DynamicResultSet::initStatic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( = new ::ucbhelper::ResultSet(
m_xSMgr, comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new HierarchyResultSetDataSupplier( m_xSMgr, new HierarchyResultSetDataSupplier( m_xSMgr,
m_xContent, m_xContent,
...@@ -71,7 +72,7 @@ void DynamicResultSet::initDynamic() ...@@ -71,7 +72,7 @@ void DynamicResultSet::initDynamic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( = new ::ucbhelper::ResultSet(
m_xSMgr, comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new HierarchyResultSetDataSupplier( m_xSMgr, new HierarchyResultSetDataSupplier( m_xSMgr,
m_xContent, m_xContent,
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
*************************************************************************/ *************************************************************************/
#include "odma_datasupplier.hxx" #include "odma_datasupplier.hxx"
#include "odma_resultset.hxx" #include "odma_resultset.hxx"
#include "comphelper/processfactory.hxx"
using namespace com::sun::star::lang; using namespace com::sun::star::lang;
using namespace com::sun::star::ucb; using namespace com::sun::star::ucb;
...@@ -67,7 +68,7 @@ DynamicResultSet::DynamicResultSet( ...@@ -67,7 +68,7 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic() void DynamicResultSet::initStatic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xSMgr,
m_xContent, m_xContent,
...@@ -79,7 +80,7 @@ void DynamicResultSet::initStatic() ...@@ -79,7 +80,7 @@ void DynamicResultSet::initStatic()
void DynamicResultSet::initDynamic() void DynamicResultSet::initDynamic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xSMgr,
m_xContent, m_xContent,
......
...@@ -28,6 +28,7 @@ ...@@ -28,6 +28,7 @@
*************************************************************************/ *************************************************************************/
#include "pkgdatasupplier.hxx" #include "pkgdatasupplier.hxx"
#include "pkgresultset.hxx" #include "pkgresultset.hxx"
#include <comphelper/processfactory.hxx>
using namespace com::sun::star; using namespace com::sun::star;
...@@ -61,7 +62,7 @@ DynamicResultSet::DynamicResultSet( ...@@ -61,7 +62,7 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic() void DynamicResultSet::initStatic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xSMgr,
m_xContent, m_xContent,
...@@ -73,7 +74,7 @@ void DynamicResultSet::initStatic() ...@@ -73,7 +74,7 @@ void DynamicResultSet::initStatic()
void DynamicResultSet::initDynamic() void DynamicResultSet::initDynamic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xSMgr,
m_xContent, m_xContent,
......
...@@ -32,6 +32,7 @@ ...@@ -32,6 +32,7 @@
#include "tdoc_datasupplier.hxx" #include "tdoc_datasupplier.hxx"
#include "tdoc_resultset.hxx" #include "tdoc_resultset.hxx"
#include "tdoc_content.hxx" #include "tdoc_content.hxx"
#include <comphelper/processfactory.hxx>
using namespace com::sun::star; using namespace com::sun::star;
using namespace tdoc_ucp; using namespace tdoc_ucp;
...@@ -63,7 +64,7 @@ void DynamicResultSet::initStatic() ...@@ -63,7 +64,7 @@ void DynamicResultSet::initStatic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( = new ::ucbhelper::ResultSet(
m_xSMgr, comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new ResultSetDataSupplier( m_xSMgr, new ResultSetDataSupplier( m_xSMgr,
m_xContent, m_xContent,
...@@ -75,7 +76,7 @@ void DynamicResultSet::initDynamic() ...@@ -75,7 +76,7 @@ void DynamicResultSet::initDynamic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( = new ::ucbhelper::ResultSet(
m_xSMgr, comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new ResultSetDataSupplier( m_xSMgr, new ResultSetDataSupplier( m_xSMgr,
m_xContent, m_xContent,
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
*************************************************************************/ *************************************************************************/
#include "webdavresultset.hxx" #include "webdavresultset.hxx"
#include "DAVSession.hxx" #include "DAVSession.hxx"
#include <comphelper/processfactory.hxx>
using namespace com::sun::star; using namespace com::sun::star;
using namespace webdav_ucp; using namespace webdav_ucp;
...@@ -69,7 +70,7 @@ DynamicResultSet::DynamicResultSet( ...@@ -69,7 +70,7 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic() void DynamicResultSet::initStatic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xSMgr,
m_xContent, m_xContent,
...@@ -81,7 +82,7 @@ void DynamicResultSet::initStatic() ...@@ -81,7 +82,7 @@ void DynamicResultSet::initStatic()
void DynamicResultSet::initDynamic() void DynamicResultSet::initDynamic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xSMgr,
m_xContent, m_xContent,
......
...@@ -30,6 +30,8 @@ ...@@ -30,6 +30,8 @@
#include "DAVSession.hxx" #include "DAVSession.hxx"
#endif #endif
#include "comphelper/processfactory.hxx"
using namespace com::sun::star; using namespace com::sun::star;
using namespace http_dav_ucp; using namespace http_dav_ucp;
...@@ -61,7 +63,7 @@ DynamicResultSet::DynamicResultSet( ...@@ -61,7 +63,7 @@ DynamicResultSet::DynamicResultSet(
void DynamicResultSet::initStatic() void DynamicResultSet::initStatic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xSMgr,
m_xContent, m_xContent,
...@@ -73,7 +75,7 @@ void DynamicResultSet::initStatic() ...@@ -73,7 +75,7 @@ void DynamicResultSet::initStatic()
void DynamicResultSet::initDynamic() void DynamicResultSet::initDynamic()
{ {
m_xResultSet1 m_xResultSet1
= new ::ucbhelper::ResultSet( m_xSMgr, = new ::ucbhelper::ResultSet( comphelper::getComponentContext(m_xSMgr),
m_aCommand.Properties, m_aCommand.Properties,
new DataSupplier( m_xSMgr, new DataSupplier( m_xSMgr,
m_xContent, m_xContent,
......
...@@ -83,7 +83,7 @@ public: ...@@ -83,7 +83,7 @@ public:
*/ */
ResultSet( ResultSet(
const com::sun::star::uno::Reference< const com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >& rxSMgr, com::sun::star::uno::XComponentContext >& rxContext,
const com::sun::star::uno::Sequence< const com::sun::star::uno::Sequence<
com::sun::star::beans::Property >& rProperties, com::sun::star::beans::Property >& rProperties,
const rtl::Reference< ResultSetDataSupplier >& rDataSupplier ); const rtl::Reference< ResultSetDataSupplier >& rDataSupplier );
...@@ -99,7 +99,7 @@ public: ...@@ -99,7 +99,7 @@ public:
*/ */
ResultSet( ResultSet(
const com::sun::star::uno::Reference< const com::sun::star::uno::Reference<
com::sun::star::lang::XMultiServiceFactory >& rxSMgr, com::sun::star::uno::XComponentContext >& rxContext,
const com::sun::star::uno::Sequence< const com::sun::star::uno::Sequence<
com::sun::star::beans::Property >& rProperties, com::sun::star::beans::Property >& rProperties,
const rtl::Reference< ResultSetDataSupplier >& rDataSupplier, const rtl::Reference< ResultSetDataSupplier >& rDataSupplier,
......
...@@ -86,7 +86,6 @@ class PropertySetInfo : ...@@ -86,7 +86,6 @@ class PropertySetInfo :
public lang::XTypeProvider, public lang::XTypeProvider,
public beans::XPropertySetInfo public beans::XPropertySetInfo
{ {
uno::Reference< lang::XMultiServiceFactory > m_xSMgr;
uno::Sequence< beans::Property >* m_pProps; uno::Sequence< beans::Property >* m_pProps;
private: private:
...@@ -95,7 +94,6 @@ private: ...@@ -95,7 +94,6 @@ private:
public: public:
PropertySetInfo( PropertySetInfo(
const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
const PropertyInfo* pProps, const PropertyInfo* pProps,
sal_Int32 nProps ); sal_Int32 nProps );
virtual ~PropertySetInfo(); virtual ~PropertySetInfo();
...@@ -173,7 +171,7 @@ namespace ucbhelper ...@@ -173,7 +171,7 @@ namespace ucbhelper
struct ResultSet_Impl struct ResultSet_Impl
{ {
uno::Reference< lang::XMultiServiceFactory > m_xSMgr; uno::Reference< uno::XComponentContext > m_xContext;
uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xEnv; uno::Reference< com::sun::star::ucb::XCommandEnvironment > m_xEnv;
uno::Reference< beans::XPropertySetInfo > m_xPropSetInfo; uno::Reference< beans::XPropertySetInfo > m_xPropSetInfo;
uno::Reference< sdbc::XResultSetMetaData > m_xMetaData; uno::Reference< sdbc::XResultSetMetaData > m_xMetaData;
...@@ -187,7 +185,7 @@ struct ResultSet_Impl ...@@ -187,7 +185,7 @@ struct ResultSet_Impl
sal_Bool m_bAfterLast; sal_Bool m_bAfterLast;
inline ResultSet_Impl( inline ResultSet_Impl(
const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Sequence< beans::Property >& rProperties, const uno::Sequence< beans::Property >& rProperties,
const rtl::Reference< ResultSetDataSupplier >& rDataSupplier, const rtl::Reference< ResultSetDataSupplier >& rDataSupplier,
const uno::Reference< com::sun::star::ucb::XCommandEnvironment >& const uno::Reference< com::sun::star::ucb::XCommandEnvironment >&
...@@ -196,11 +194,11 @@ struct ResultSet_Impl ...@@ -196,11 +194,11 @@ struct ResultSet_Impl
}; };
inline ResultSet_Impl::ResultSet_Impl( inline ResultSet_Impl::ResultSet_Impl(
const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Sequence< beans::Property >& rProperties, const uno::Sequence< beans::Property >& rProperties,
const rtl::Reference< ResultSetDataSupplier >& rDataSupplier, const rtl::Reference< ResultSetDataSupplier >& rDataSupplier,
const uno::Reference< com::sun::star::ucb::XCommandEnvironment >& rxEnv ) const uno::Reference< com::sun::star::ucb::XCommandEnvironment >& rxEnv )
: m_xSMgr( rxSMgr ), : m_xContext( rxContext ),
m_xEnv( rxEnv ), m_xEnv( rxEnv ),
m_aProperties( rProperties ), m_aProperties( rProperties ),
m_xDataSupplier( rDataSupplier ), m_xDataSupplier( rDataSupplier ),
...@@ -228,11 +226,11 @@ inline ResultSet_Impl::~ResultSet_Impl() ...@@ -228,11 +226,11 @@ inline ResultSet_Impl::~ResultSet_Impl()
//========================================================================= //=========================================================================
ResultSet::ResultSet( ResultSet::ResultSet(
const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Sequence< beans::Property >& rProperties, const uno::Sequence< beans::Property >& rProperties,
const rtl::Reference< ResultSetDataSupplier >& rDataSupplier ) const rtl::Reference< ResultSetDataSupplier >& rDataSupplier )
: m_pImpl( new ResultSet_Impl( : m_pImpl( new ResultSet_Impl(
rxSMgr, rxContext,
rProperties, rProperties,
rDataSupplier, rDataSupplier,
uno::Reference< com::sun::star::ucb::XCommandEnvironment >() ) ) uno::Reference< com::sun::star::ucb::XCommandEnvironment >() ) )
...@@ -242,11 +240,11 @@ ResultSet::ResultSet( ...@@ -242,11 +240,11 @@ ResultSet::ResultSet(
//========================================================================= //=========================================================================
ResultSet::ResultSet( ResultSet::ResultSet(
const uno::Reference< lang::XMultiServiceFactory >& rxSMgr, const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Sequence< beans::Property >& rProperties, const uno::Sequence< beans::Property >& rProperties,
const rtl::Reference< ResultSetDataSupplier >& rDataSupplier, const rtl::Reference< ResultSetDataSupplier >& rDataSupplier,
const uno::Reference< com::sun::star::ucb::XCommandEnvironment >& rxEnv ) const uno::Reference< com::sun::star::ucb::XCommandEnvironment >& rxEnv )
: m_pImpl( new ResultSet_Impl( rxSMgr, rProperties, rDataSupplier, rxEnv ) ) : m_pImpl( new ResultSet_Impl( rxContext, rProperties, rDataSupplier, rxEnv ) )
{ {
rDataSupplier->m_pResultSet = this; rDataSupplier->m_pResultSet = this;
} }
...@@ -372,7 +370,7 @@ uno::Reference< sdbc::XResultSetMetaData > SAL_CALL ResultSet::getMetaData() ...@@ -372,7 +370,7 @@ uno::Reference< sdbc::XResultSetMetaData > SAL_CALL ResultSet::getMetaData()
osl::MutexGuard aGuard( m_pImpl->m_aMutex ); osl::MutexGuard aGuard( m_pImpl->m_aMutex );
if ( !m_pImpl->m_xMetaData.is() ) if ( !m_pImpl->m_xMetaData.is() )
m_pImpl->m_xMetaData = new ResultSetMetaData( ucbhelper::getComponentContext(m_pImpl->m_xSMgr), m_pImpl->m_xMetaData = new ResultSetMetaData( m_pImpl->m_xContext,
m_pImpl->m_aProperties ); m_pImpl->m_aProperties );
return m_pImpl->m_xMetaData; return m_pImpl->m_xMetaData;
...@@ -1328,8 +1326,7 @@ ResultSet::getPropertySetInfo() ...@@ -1328,8 +1326,7 @@ ResultSet::getPropertySetInfo()
if ( !m_pImpl->m_xPropSetInfo.is() ) if ( !m_pImpl->m_xPropSetInfo.is() )
m_pImpl->m_xPropSetInfo m_pImpl->m_xPropSetInfo
= new PropertySetInfo( m_pImpl->m_xSMgr, = new PropertySetInfo( aPropertyTable,
aPropertyTable,
RESULTSET_PROPERTY_COUNT ); RESULTSET_PROPERTY_COUNT );
return m_pImpl->m_xPropSetInfo; return m_pImpl->m_xPropSetInfo;
} }
...@@ -1575,10 +1572,8 @@ namespace ucbhelper_impl { ...@@ -1575,10 +1572,8 @@ namespace ucbhelper_impl {
//========================================================================= //=========================================================================
PropertySetInfo::PropertySetInfo( PropertySetInfo::PropertySetInfo(
const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
const PropertyInfo* pProps, const PropertyInfo* pProps,
sal_Int32 nProps ) sal_Int32 nProps )
: m_xSMgr( rxSMgr )
{ {
m_pProps = new uno::Sequence< beans::Property >( nProps ); m_pProps = new uno::Sequence< beans::Property >( nProps );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment