summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-11-01 15:01:34 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-11-05 16:43:15 +0100
commitec1c96a9b69a5a2546fe2564cd92fe9e33471fbc (patch)
treedd7fcf0feadfbf456b351f752dc8d28dd1deffbf
parent41a71413f4ebe69a48ee068fd5c785d6015c0cca (diff)
fdo#46808,remove unnecessary MSF field from ucbhelper::ContentIdentifier
...which has lots of nice knock-on effects. Change-Id: Icc93fdb70f24903b08702654db4e1105eb1d438e
-rw-r--r--dbaccess/source/core/dataaccess/ContentHelper.cxx2
-rw-r--r--sw/source/core/unocore/swunohelper.cxx9
-rw-r--r--ucb/source/ucp/cmis/cmis_content.cxx2
-rw-r--r--ucb/source/ucp/ext/ucpext_provider.cxx2
-rw-r--r--ucb/source/ucp/ftp/ftpresultsetI.cxx3
-rw-r--r--ucb/source/ucp/ftp/ftpresultsetbase.cxx9
-rw-r--r--ucb/source/ucp/ftp/ftpresultsetbase.hxx4
-rw-r--r--ucb/source/ucp/gvfs/gvfs_content.cxx7
-rw-r--r--ucb/source/ucp/hierarchy/hierarchycontent.cxx11
-rw-r--r--ucb/source/ucp/hierarchy/hierarchyprovider.cxx4
-rw-r--r--ucb/source/ucp/package/pkgcontent.cxx17
-rw-r--r--ucb/source/ucp/package/pkgprovider.cxx3
-rw-r--r--ucb/source/ucp/tdoc/tdoc_content.cxx18
-rw-r--r--ucb/source/ucp/tdoc/tdoc_provider.cxx5
-rw-r--r--ucb/source/ucp/webdav-neon/webdavcontent.cxx14
-rw-r--r--ucb/source/ucp/webdav-neon/webdavprovider.cxx2
-rw-r--r--ucbhelper/inc/ucbhelper/contentidentifier.hxx7
-rw-r--r--ucbhelper/source/provider/contenthelper.cxx2
-rw-r--r--ucbhelper/source/provider/contentidentifier.cxx20
-rw-r--r--xmlhelp/source/cxxhelp/provider/content.cxx11
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetbase.cxx9
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetbase.hxx6
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx3
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx4
-rw-r--r--xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx4
25 files changed, 70 insertions, 108 deletions
diff --git a/dbaccess/source/core/dataaccess/ContentHelper.cxx b/dbaccess/source/core/dataaccess/ContentHelper.cxx
index 08cdd7e9c7ec..9ef5a1dc3a66 100644
--- a/dbaccess/source/core/dataaccess/ContentHelper.cxx
+++ b/dbaccess/source/core/dataaccess/ContentHelper.cxx
@@ -96,7 +96,7 @@ Reference< XContentIdentifier > SAL_CALL OContentHelper::getIdentifier( ) throw
::rtl::OUStringBuffer aIdentifier;
aIdentifier.appendAscii( "private:" );
aIdentifier.append( impl_getHierarchicalName( true ) );
- return new ::ucbhelper::ContentIdentifier( m_aContext.getLegacyServiceFactory(), aIdentifier.makeStringAndClear() );
+ return new ::ucbhelper::ContentIdentifier( aIdentifier.makeStringAndClear() );
}
::rtl::OUString OContentHelper::impl_getHierarchicalName( bool _includingRootContainer ) const
diff --git a/sw/source/core/unocore/swunohelper.cxx b/sw/source/core/unocore/swunohelper.cxx
index 6397eebc2830..080d278dd7cb 100644
--- a/sw/source/core/unocore/swunohelper.cxx
+++ b/sw/source/core/unocore/swunohelper.cxx
@@ -123,19 +123,14 @@ sal_Bool UCB_IsCaseSensitiveFileName( const String& rURL )
sal_Bool bCaseSensitive;
try
{
- ::com::sun::star::uno::Reference< ::com::sun::star::lang::XMultiServiceFactory > xMSF =
- comphelper::getProcessServiceFactory();
-
INetURLObject aTempObj( rURL );
aTempObj.SetBase( aTempObj.GetBase().toAsciiLowerCase() );
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier > xRef1 = new
- ucbhelper::ContentIdentifier( xMSF,
- aTempObj.GetMainURL( INetURLObject::NO_DECODE ));
+ ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::NO_DECODE ));
aTempObj.SetBase(aTempObj.GetBase().toAsciiUpperCase());
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XContentIdentifier > xRef2 = new
- ucbhelper::ContentIdentifier( xMSF,
- aTempObj.GetMainURL( INetURLObject::NO_DECODE ));
+ ucbhelper::ContentIdentifier( aTempObj.GetMainURL( INetURLObject::NO_DECODE ));
::com::sun::star::uno::Reference< ::com::sun::star::ucb::XUniversalContentBroker > xUcb =
com::sun::star::ucb::UniversalContentBroker::create(comphelper::getProcessComponentContext());
diff --git a/ucb/source/ucp/cmis/cmis_content.cxx b/ucb/source/ucp/cmis/cmis_content.cxx
index 83551b21d799..376466ba73b5 100644
--- a/ucb/source/ucp/cmis/cmis_content.cxx
+++ b/ucb/source/ucp/cmis/cmis_content.cxx
@@ -1520,7 +1520,7 @@ namespace cmis
URL aParentURL( sParentURL );
// Set the parent URL for the transient objects
- uno::Reference< ucb::XContentIdentifier > xId(new ::ucbhelper::ContentIdentifier(m_xSMgr, sParentURL));
+ uno::Reference< ucb::XContentIdentifier > xId(new ::ucbhelper::ContentIdentifier(sParentURL));
try
{
diff --git a/ucb/source/ucp/ext/ucpext_provider.cxx b/ucb/source/ucp/ext/ucpext_provider.cxx
index 18e0e3230022..0e9de11fc478 100644
--- a/ucb/source/ucp/ext/ucpext_provider.cxx
+++ b/ucb/source/ucp/ext/ucpext_provider.cxx
@@ -172,7 +172,7 @@ namespace ucb { namespace ucp { namespace ext
}
}
}
- const Reference< XContentIdentifier > xNormalizedIdentifier( new ::ucbhelper::ContentIdentifier( Reference<XMultiServiceFactory>(m_xContext->getServiceManager(), UNO_QUERY_THROW), aComposer.makeStringAndClear() ) );
+ const Reference< XContentIdentifier > xNormalizedIdentifier( new ::ucbhelper::ContentIdentifier( aComposer.makeStringAndClear() ) );
::osl::MutexGuard aGuard( m_aMutex );
diff --git a/ucb/source/ucp/ftp/ftpresultsetI.cxx b/ucb/source/ucp/ftp/ftpresultsetI.cxx
index f723d40dea8b..524a6148292b 100644
--- a/ucb/source/ucp/ftp/ftpresultsetI.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetI.cxx
@@ -18,6 +18,7 @@
*/
+#include "comphelper/processfactory.hxx"
#include "ucbhelper/propertyvalueset.hxx"
#include "rtl/ref.hxx"
#include "com/sun/star/ucb/Command.hpp"
@@ -43,7 +44,7 @@ ResultSetI::ResultSetI(const Reference<XMultiServiceFactory>& xMSF,
const Sequence<Property>& seqProp,
const Sequence< NumberedSortingInfo >& seqSort,
const std::vector<FTPDirentry>& dirvec)
- : ResultSetBase(xMSF,xProvider,nOpenMode,seqProp,seqSort)
+ : ResultSetBase(comphelper::getComponentContext(xMSF),xProvider,nOpenMode,seqProp,seqSort)
{
for( unsigned int i = 0; i < dirvec.size(); ++i)
m_aPath.push_back(dirvec[i].m_aURL);
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.cxx b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
index b6e68d7d5e71..3323f30f71b2 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.cxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.cxx
@@ -31,12 +31,12 @@ using namespace ftp;
using namespace com::sun::star;
ResultSetBase::ResultSetBase(
- const uno::Reference< lang::XMultiServiceFactory >& xMSF,
+ const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Reference< ucb::XContentProvider >& xProvider,
sal_Int32 nOpenMode,
const uno::Sequence< beans::Property >& seq,
const uno::Sequence< ucb::NumberedSortingInfo >& seqSort )
- : m_xMSF( xMSF ),
+ : m_xContext( rxContext ),
m_xProvider( xProvider ),
m_nRow( -1 ),
m_nWasNull( true ),
@@ -409,7 +409,7 @@ ResultSetBase::queryContentIdentifier(
if(!url.isEmpty() )
m_aIdents[m_nRow] =
uno::Reference< ucb::XContentIdentifier >(
- new ::ucbhelper::ContentIdentifier(m_xMSF,url) );
+ new ::ucbhelper::ContentIdentifier(url) );
}
return m_aIdents[m_nRow];
}
@@ -641,8 +641,7 @@ ResultSetBase::getMetaData(
uno::RuntimeException )
{
::ucbhelper::ResultSetMetaData* p =
- new ::ucbhelper::ResultSetMetaData(
- comphelper::getComponentContext(m_xMSF), m_sProperty );
+ new ::ucbhelper::ResultSetMetaData( m_xContext, m_sProperty );
return uno::Reference< sdbc::XResultSetMetaData >( p );
}
diff --git a/ucb/source/ucp/ftp/ftpresultsetbase.hxx b/ucb/source/ucp/ftp/ftpresultsetbase.hxx
index 99c7ae2e11c4..805cbf474b53 100644
--- a/ucb/source/ucp/ftp/ftpresultsetbase.hxx
+++ b/ucb/source/ucp/ftp/ftpresultsetbase.hxx
@@ -51,7 +51,7 @@ namespace ftp {
public:
ResultSetBase(const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& xMSF,
+ com::sun::star::uno::XComponentContext >& rxContext,
const com::sun::star::uno::Reference<
com::sun::star::ucb::XContentProvider >& xProvider,
sal_Int32 nOpenMode,
@@ -562,7 +562,7 @@ namespace ftp {
protected:
com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ com::sun::star::uno::XComponentContext > m_xContext;
com::sun::star::uno::Reference<
com::sun::star::ucb::XContentProvider > m_xProvider;
sal_Int32 m_nRow;
diff --git a/ucb/source/ucp/gvfs/gvfs_content.cxx b/ucb/source/ucp/gvfs/gvfs_content.cxx
index d3b308362d46..d53b752f1792 100644
--- a/ucb/source/ucp/gvfs/gvfs_content.cxx
+++ b/ucb/source/ucp/gvfs/gvfs_content.cxx
@@ -514,7 +514,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
aURL += rtl::OUString::createFromAscii( name );
uno::Reference< ucb::XContentIdentifier > xId
- ( new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ) );
+ ( new ::ucbhelper::ContentIdentifier( aURL ) );
try {
return new ::gvfs::Content( m_xSMgr, m_pProvider, xId, !create_document );
@@ -853,8 +853,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
if ( setMask & GNOME_VFS_SET_FILE_INFO_NAME ) {
uno::Reference< ucb::XContentIdentifier > xNewId
- = new ::ucbhelper::ContentIdentifier(
- m_xSMgr, makeNewURL( newInfo.name ) );
+ = new ::ucbhelper::ContentIdentifier( makeNewURL( newInfo.name ) );
aGuard.clear();
if (!exchangeIdentity( xNewId ) )
@@ -1100,7 +1099,7 @@ sal_Bool Content::exchangeIdentity(
xNewId->getContentIdentifier() );
uno::Reference< ucb::XContentIdentifier >
xNewChildId
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewChildURL );
+ = new ::ucbhelper::ContentIdentifier( aNewChildURL );
if ( !xChild->exchangeIdentity( xNewChildId ) )
return sal_False;
diff --git a/ucb/source/ucp/hierarchy/hierarchycontent.cxx b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
index af0ff20b0c50..efa433c2be35 100644
--- a/ucb/source/ucp/hierarchy/hierarchycontent.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchycontent.cxx
@@ -616,7 +616,7 @@ HierarchyContent::createNewContent( const ucb::ContentInfo& Info )
aURL += rtl::OUString("New_Link");
uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL );
+ = new ::ucbhelper::ContentIdentifier( aURL );
return create( m_xSMgr, m_pProvider, xId, Info );
}
@@ -775,7 +775,7 @@ HierarchyContent::makeNewIdentifier( const rtl::OUString& rTitle )
aNewURL += ::ucb_impl::urihelper::encodeSegment( rTitle );
return uno::Reference< ucb::XContentIdentifier >(
- new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewURL ) );
+ new ::ucbhelper::ContentIdentifier( aNewURL ) );
}
//=========================================================================
@@ -892,8 +892,7 @@ sal_Bool HierarchyContent::exchangeIdentity(
aOldURL.getLength(),
xNewId->getContentIdentifier() );
uno::Reference< ucb::XContentIdentifier > xNewChildId
- = new ::ucbhelper::ContentIdentifier(
- m_xSMgr, aNewChildURL );
+ = new ::ucbhelper::ContentIdentifier( aNewChildURL );
if ( !xChild->exchangeIdentity( xNewChildId ) )
return sal_False;
@@ -1451,7 +1450,7 @@ void HierarchyContent::insert( sal_Int32 nNameClashResolve,
rtl::OUString aNewId = xId->getContentIdentifier();
aNewId += rtl::OUString("_");
aNewId += rtl::OUString::valueOf( ++nTry );
- xId = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewId );
+ xId = new ::ucbhelper::ContentIdentifier( aNewId );
}
while ( hasData( xId ) && ( nTry < 1000 ) );
@@ -1650,7 +1649,7 @@ void HierarchyContent::transfer(
//////////////////////////////////////////////////////////////////////
uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, rInfo.SourceURL );
+ = new ::ucbhelper::ContentIdentifier( rInfo.SourceURL );
// Note: The static cast is okay here, because its sure that
// m_xProvider is always the HierarchyContentProvider.
diff --git a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
index 73c1be518cc5..e528dad6f336 100644
--- a/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
+++ b/ucb/source/ucp/hierarchy/hierarchyprovider.cxx
@@ -120,9 +120,7 @@ HierarchyContentProvider::queryContent(
// Encode URL and create new Id. This may "correct" user-typed-in URL's.
uno::Reference< ucb::XContentIdentifier > xCanonicId
- = new ::ucbhelper::ContentIdentifier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW),
- ::ucb_impl::urihelper::encodeURI(
- aUri.getUri() ) );
+ = new ::ucbhelper::ContentIdentifier( ::ucb_impl::urihelper::encodeURI( aUri.getUri() ) );
osl::MutexGuard aGuard( m_aMutex );
// Check, if a content with given id already exists...
diff --git a/ucb/source/ucp/package/pkgcontent.cxx b/ucb/source/ucp/package/pkgcontent.cxx
index 0affd591f396..7bef455c2a17 100644
--- a/ucb/source/ucp/package/pkgcontent.cxx
+++ b/ucb/source/ucp/package/pkgcontent.cxx
@@ -168,7 +168,7 @@ Content* Content::create(
}
uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier( rxSMgr, aURI.getUri() );
+ = new ::ucbhelper::ContentIdentifier( aURI.getUri() );
return new Content( rxSMgr, pProvider, xId, xPackage, aURI, aProps );
}
else
@@ -183,7 +183,7 @@ Content* Content::create(
bFolder = sal_True;
uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier( rxSMgr, aURI.getUri() );
+ = new ::ucbhelper::ContentIdentifier( aURI.getUri() );
ucb::ContentInfo aInfo;
if ( bFolder || aURI.isRootFolder() )
@@ -219,7 +219,7 @@ Content* Content::create(
xPackage = pProvider->createPackage( aURI.getPackage(), aURI.getParam() );
uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier( rxSMgr, aURI.getUri() );
+ = new ::ucbhelper::ContentIdentifier( aURI.getUri() );
return new Content( rxSMgr, pProvider, xId, xPackage, aURI, Info );
}
@@ -736,7 +736,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
aURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("New_Stream"));
uno::Reference< ucb::XContentIdentifier > xId(
- new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ) );
+ new ::ucbhelper::ContentIdentifier( aURL ) );
return create( m_xSMgr, m_pProvider, xId, Info );
}
@@ -1373,7 +1373,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
aNewURL += rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("/"));
aNewURL += ::ucb_impl::urihelper::encodeSegment( aNewTitle );
uno::Reference< ucb::XContentIdentifier > xNewId
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewURL );
+ = new ::ucbhelper::ContentIdentifier( aNewURL );
aGuard.clear();
if ( exchangeIdentity( xNewId ) )
@@ -1717,7 +1717,7 @@ void Content::insert(
if ( bNewId )
{
- m_xIdentifier = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewURL );
+ m_xIdentifier = new ::ucbhelper::ContentIdentifier( aNewURL );
m_aUri = aNewUri;
}
@@ -1863,7 +1863,7 @@ void Content::transfer(
//////////////////////////////////////////////////////////////////////
uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, rInfo.SourceURL );
+ = new ::ucbhelper::ContentIdentifier( rInfo.SourceURL );
// Note: The static cast is okay here, because its sure that
// m_xProvider is always the PackageContentProvider.
@@ -2147,8 +2147,7 @@ sal_Bool Content::exchangeIdentity(
aOldURL.getLength(),
xNewId->getContentIdentifier() );
uno::Reference< ucb::XContentIdentifier > xNewChildId
- = new ::ucbhelper::ContentIdentifier(
- m_xSMgr, aNewChildURL );
+ = new ::ucbhelper::ContentIdentifier( aNewChildURL );
if ( !xChild->exchangeIdentity( xNewChildId ) )
return sal_False;
diff --git a/ucb/source/ucp/package/pkgprovider.cxx b/ucb/source/ucp/package/pkgprovider.cxx
index 15bd2912d058..c373d5408b98 100644
--- a/ucb/source/ucp/package/pkgprovider.cxx
+++ b/ucb/source/ucp/package/pkgprovider.cxx
@@ -204,8 +204,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent(
// Create a new identifier for the mormalized URL returned by
// PackageUri::getUri().
- uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), aUri.getUri() );
+ uno::Reference< ucb::XContentIdentifier > xId = new ::ucbhelper::ContentIdentifier( aUri.getUri() );
osl::MutexGuard aGuard( m_aMutex );
diff --git a/ucb/source/ucp/tdoc/tdoc_content.cxx b/ucb/source/ucp/tdoc/tdoc_content.cxx
index 7c0d9ac8421f..6b8e17b15fc5 100644
--- a/ucb/source/ucp/tdoc/tdoc_content.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_content.cxx
@@ -724,7 +724,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
aURL += rtl::OUString("New_Stream");
uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL );
+ = new ::ucbhelper::ContentIdentifier( aURL );
return create( m_xSMgr, m_pProvider, xId, Info );
}
@@ -757,8 +757,7 @@ Content::makeNewIdentifier( const rtl::OUString& rTitle )
return
uno::Reference< ucb::XContentIdentifier >(
- new ::ucbhelper::ContentIdentifier(
- m_xSMgr, aNewURL.makeStringAndClear() ) );
+ new ::ucbhelper::ContentIdentifier( aNewURL.makeStringAndClear() ) );
}
//=========================================================================
@@ -879,8 +878,7 @@ sal_Bool Content::exchangeIdentity(
aOldURL.getLength(),
xNewId->getContentIdentifier() );
uno::Reference< ucb::XContentIdentifier > xNewChildId
- = new ::ucbhelper::ContentIdentifier(
- m_xSMgr, aNewChildURL );
+ = new ::ucbhelper::ContentIdentifier( aNewChildURL );
if ( !xChild->exchangeIdentity( xNewChildId ) )
return sal_False;
@@ -1730,7 +1728,7 @@ void Content::insert( const uno::Reference< io::XInputStream >& xData,
if ( bNewId )
{
m_xIdentifier
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewUri.getUri() );
+ = new ::ucbhelper::ContentIdentifier( aNewUri.getUri() );
}
if ( !storeData( xData, xEnv ) )
@@ -1846,8 +1844,7 @@ Content::queryChildContent( const rtl::OUString & rRelativeChildUri )
aBuf.append( rRelativeChildUri.copy( 1 ) );
uno::Reference< ucb::XContentIdentifier > xChildId
- = new ::ucbhelper::ContentIdentifier(
- m_xSMgr, aBuf.makeStringAndClear() );
+ = new ::ucbhelper::ContentIdentifier( aBuf.makeStringAndClear() );
uno::Reference< ucb::XContent > xChild;
try
@@ -2134,7 +2131,7 @@ void Content::transfer(
try
{
uno::Reference< ucb::XContentIdentifier > xTargetId
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, aTargetUri );
+ = new ::ucbhelper::ContentIdentifier( aTargetUri );
// Note: The static cast is okay here, because its sure that
// m_xProvider is always the WebDAVContentProvider.
@@ -2177,8 +2174,7 @@ void Content::transfer(
try
{
uno::Reference< ucb::XContentIdentifier >
- xSourceId = new ::ucbhelper::ContentIdentifier(
- m_xSMgr, rInfo.SourceURL );
+ xSourceId = new ::ucbhelper::ContentIdentifier( rInfo.SourceURL );
// Note: The static cast is okay here, because its sure
// that m_xProvider is always the ContentProvider.
diff --git a/ucb/source/ucp/tdoc/tdoc_provider.cxx b/ucb/source/ucp/tdoc/tdoc_provider.cxx
index b1b9385d2090..f9b5ba9010ee 100644
--- a/ucb/source/ucp/tdoc/tdoc_provider.cxx
+++ b/ucb/source/ucp/tdoc/tdoc_provider.cxx
@@ -130,7 +130,7 @@ ContentProvider::queryContent(
// Normalize URI.
uno::Reference< ucb::XContentIdentifier > xCanonicId
- = new ::ucbhelper::ContentIdentifier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), aUri.getUri() );
+ = new ::ucbhelper::ContentIdentifier( aUri.getUri() );
osl::MutexGuard aGuard( m_aMutex );
@@ -171,8 +171,7 @@ ContentProvider::createDocumentContent(
aBuffer.append( aDocId );
uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier(
- uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), aBuffer.makeStringAndClear() );
+ = new ::ucbhelper::ContentIdentifier( aBuffer.makeStringAndClear() );
osl::MutexGuard aGuard( m_aMutex );
diff --git a/ucb/source/ucp/webdav-neon/webdavcontent.cxx b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
index 9034c8632d1f..e2fd4c2d3a1b 100644
--- a/ucb/source/ucp/webdav-neon/webdavcontent.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavcontent.cxx
@@ -992,7 +992,7 @@ Content::createNewContent( const ucb::ContentInfo& Info )
}
uno::Reference< ucb::XContentIdentifier > xId(
- new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL ) );
+ new ::ucbhelper::ContentIdentifier( aURL ) );
// create the local content
try
@@ -1756,7 +1756,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
aNewURL += NeonUri::escapeSegment( aNewTitle );
uno::Reference< ucb::XContentIdentifier > xNewId
- = new ::ucbhelper::ContentIdentifier( xSMgr, aNewURL );
+ = new ::ucbhelper::ContentIdentifier( aNewURL );
uno::Reference< ucb::XContentIdentifier > xOldId = xIdentifier;
try
@@ -2365,8 +2365,7 @@ void Content::insert(
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- m_xIdentifier
- = new ::ucbhelper::ContentIdentifier( m_xSMgr, aURL );
+ m_xIdentifier = new ::ucbhelper::ContentIdentifier( aURL );
}
inserted();
@@ -2512,7 +2511,7 @@ void Content::transfer(
aTargetURL += aTitle;
uno::Reference< ucb::XContentIdentifier > xTargetId
- = new ::ucbhelper::ContentIdentifier( xSMgr, aTargetURL );
+ = new ::ucbhelper::ContentIdentifier( aTargetURL );
DAVResourceAccess aSourceAccess( comphelper::getComponentContext(xSMgr),
xResAccess->getSessionFactory(),
@@ -2521,7 +2520,7 @@ void Content::transfer(
if ( rArgs.MoveData == sal_True )
{
uno::Reference< ucb::XContentIdentifier > xId
- = new ::ucbhelper::ContentIdentifier( xSMgr, rArgs.SourceURL );
+ = new ::ucbhelper::ContentIdentifier( rArgs.SourceURL );
// Note: The static cast is okay here, because its sure that
// xProvider is always the WebDAVContentProvider.
@@ -2820,8 +2819,7 @@ sal_Bool Content::exchangeIdentity(
aOldURL.getLength(),
xNewId->getContentIdentifier() );
uno::Reference< ucb::XContentIdentifier > xNewChildId
- = new ::ucbhelper::ContentIdentifier(
- m_xSMgr, aNewChildURL );
+ = new ::ucbhelper::ContentIdentifier( aNewChildURL );
if ( !xChild->exchangeIdentity( xNewChildId ) )
return sal_False;
diff --git a/ucb/source/ucp/webdav-neon/webdavprovider.cxx b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
index f3985121488e..49ee82c1d5fb 100644
--- a/ucb/source/ucp/webdav-neon/webdavprovider.cxx
+++ b/ucb/source/ucp/webdav-neon/webdavprovider.cxx
@@ -181,7 +181,7 @@ ContentProvider::queryContent(
}
if ( bNewId )
- xCanonicId = new ::ucbhelper::ContentIdentifier( uno::Reference<lang::XMultiServiceFactory>(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), aURL );
+ xCanonicId = new ::ucbhelper::ContentIdentifier( aURL );
else
xCanonicId = Identifier;
diff --git a/ucbhelper/inc/ucbhelper/contentidentifier.hxx b/ucbhelper/inc/ucbhelper/contentidentifier.hxx
index 8fb73d9651bb..31f0a276ea36 100644
--- a/ucbhelper/inc/ucbhelper/contentidentifier.hxx
+++ b/ucbhelper/inc/ucbhelper/contentidentifier.hxx
@@ -25,10 +25,6 @@
#include <com/sun/star/ucb/XContentIdentifier.hpp>
#include "ucbhelper/ucbhelperdllapi.h"
-namespace com { namespace sun { namespace star { namespace lang {
- class XMultiServiceFactory;
-} } } }
-
namespace rtl {
class OUString;
}
@@ -52,9 +48,6 @@ class UCBHELPER_DLLPUBLIC ContentIdentifier :
public com::sun::star::ucb::XContentIdentifier
{
public:
- ContentIdentifier( const com::sun::star::uno::Reference<
- com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
- const rtl::OUString& rURL );
ContentIdentifier( const rtl::OUString& rURL );
virtual ~ContentIdentifier();
diff --git a/ucbhelper/source/provider/contenthelper.cxx b/ucbhelper/source/provider/contenthelper.cxx
index 39e08fc242b5..e09a5ab84559 100644
--- a/ucbhelper/source/provider/contenthelper.cxx
+++ b/ucbhelper/source/provider/contenthelper.cxx
@@ -774,7 +774,7 @@ uno::Reference< uno::XInterface > SAL_CALL ContentImplHelper::getParent()
if ( !aURL.isEmpty() )
{
uno::Reference< com::sun::star::ucb::XContentIdentifier > xId(
- new ContentIdentifier( m_xSMgr, aURL ) );
+ new ContentIdentifier( aURL ) );
try
{
xParent.set( m_xProvider->queryContent( xId ) );
diff --git a/ucbhelper/source/provider/contentidentifier.cxx b/ucbhelper/source/provider/contentidentifier.cxx
index c8dd27fdc69d..e99b67fcffd0 100644
--- a/ucbhelper/source/provider/contentidentifier.cxx
+++ b/ucbhelper/source/provider/contentidentifier.cxx
@@ -47,13 +47,11 @@ namespace ucbhelper
struct ContentIdentifier_Impl
{
- Reference< XMultiServiceFactory > m_xSMgr;
OUString m_aContentId;
OUString m_aProviderScheme;
osl::Mutex m_aMutex;
- ContentIdentifier_Impl( const Reference< XMultiServiceFactory >& rSMgr,
- const OUString& rURL );
+ ContentIdentifier_Impl( const OUString& rURL );
};
//=========================================================================
@@ -62,10 +60,7 @@ struct ContentIdentifier_Impl
//
//=========================================================================
-ContentIdentifier_Impl::ContentIdentifier_Impl(
- const Reference< XMultiServiceFactory >& rSMgr,
- const OUString& rURL )
-: m_xSMgr( rSMgr )
+ContentIdentifier_Impl::ContentIdentifier_Impl(const OUString& rURL )
{
// Normalize URL scheme ( it's case insensitive ).
@@ -86,18 +81,9 @@ ContentIdentifier_Impl::ContentIdentifier_Impl(
//
//=========================================================================
-ContentIdentifier::ContentIdentifier(
- const Reference< XMultiServiceFactory >& rxSMgr,
- const OUString& rURL )
-{
- m_pImpl = new ContentIdentifier_Impl( rxSMgr, rURL );
-}
-
-//=========================================================================
ContentIdentifier::ContentIdentifier( const OUString& rURL )
{
- m_pImpl = new ContentIdentifier_Impl(
- Reference< XMultiServiceFactory >(), rURL );
+ m_pImpl = new ContentIdentifier_Impl( rURL );
}
//=========================================================================
diff --git a/xmlhelp/source/cxxhelp/provider/content.cxx b/xmlhelp/source/cxxhelp/provider/content.cxx
index 55ceac639727..d4fc1cb668a9 100644
--- a/xmlhelp/source/cxxhelp/provider/content.cxx
+++ b/xmlhelp/source/cxxhelp/provider/content.cxx
@@ -45,6 +45,7 @@
#include <com/sun/star/io/XActiveDataStreamer.hpp>
#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
#include <osl/diagnose.h>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
@@ -209,7 +210,7 @@ class ResultSetForRootFactory
{
private:
- uno::Reference< lang::XMultiServiceFactory > m_xSMgr;
+ uno::Reference< uno::XComponentContext > m_xContext;
uno::Reference< ucb::XContentProvider > m_xProvider;
sal_Int32 m_nOpenMode;
uno::Sequence< beans::Property > m_seq;
@@ -221,14 +222,14 @@ private:
public:
ResultSetForRootFactory(
- const uno::Reference< lang::XMultiServiceFactory >& xSMgr,
+ const uno::Reference< uno::XComponentContext >& xContext,
const uno::Reference< ucb::XContentProvider >& xProvider,
sal_Int32 nOpenMode,
const uno::Sequence< beans::Property >& seq,
const uno::Sequence< ucb::NumberedSortingInfo >& seqSort,
URLParameter aURLParameter,
Databases* pDatabases )
- : m_xSMgr( xSMgr ),
+ : m_xContext( xContext ),
m_xProvider( xProvider ),
m_nOpenMode( nOpenMode ),
m_seq( seq ),
@@ -240,7 +241,7 @@ public:
ResultSetBase* createResultSet()
{
- return new ResultSetForRoot( m_xSMgr,
+ return new ResultSetForRoot( m_xContext,
m_xProvider,
m_nOpenMode,
m_seq,
@@ -401,7 +402,7 @@ uno::Any SAL_CALL Content::execute(
aOpenCommand,
Environment,
new ResultSetForRootFactory(
- m_xSMgr,
+ comphelper::getComponentContext(m_xSMgr),
m_xProvider.get(),
aOpenCommand.Mode,
aOpenCommand.Properties,
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
index eb124bfdc382..7a004fb62c4c 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.cxx
@@ -40,12 +40,12 @@
using namespace chelp;
using namespace com::sun::star;
-ResultSetBase::ResultSetBase( const uno::Reference< lang::XMultiServiceFactory >& xMSF,
+ResultSetBase::ResultSetBase( const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Reference< ucb::XContentProvider >& xProvider,
sal_Int32 nOpenMode,
const uno::Sequence< beans::Property >& seq,
const uno::Sequence< ucb::NumberedSortingInfo >& seqSort )
- : m_xMSF( xMSF ),
+ : m_xContext( rxContext ),
m_xProvider( xProvider ),
m_nRow( -1 ),
m_nWasNull( true ),
@@ -413,7 +413,7 @@ ResultSetBase::queryContentIdentifier(
rtl::OUString url = queryContentIdentifierString();
if( ! m_aIdents[m_nRow].is() && !url.isEmpty() )
m_aIdents[m_nRow] = uno::Reference< ucb::XContentIdentifier >(
- new ::ucbhelper::ContentIdentifier( m_xMSF,url ) );
+ new ::ucbhelper::ContentIdentifier( url ) );
return m_aIdents[m_nRow];
}
@@ -648,8 +648,7 @@ ResultSetBase::getMetaData(
uno::RuntimeException )
{
::ucbhelper::ResultSetMetaData* p =
- new ::ucbhelper::ResultSetMetaData(
- comphelper::getComponentContext(m_xMSF), m_sProperty );
+ new ::ucbhelper::ResultSetMetaData( m_xContext, m_sProperty );
return uno::Reference< sdbc::XResultSetMetaData >( p );
}
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx b/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx
index f592d113047a..f74f023a2d5b 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetbase.hxx
@@ -32,7 +32,7 @@
#include <com/sun/star/ucb/NumberedSortingInfo.hpp>
#include <com/sun/star/ucb/XContentProvider.hpp>
#include <com/sun/star/ucb/XContentIdentifier.hpp>
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/beans/Property.hpp>
@@ -50,7 +50,7 @@ namespace chelp {
{
public:
- ResultSetBase( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF,
+ ResultSetBase( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
const com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider >& xProvider,
sal_Int32 nOpenMode,
const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& seq,
@@ -533,7 +533,7 @@ namespace chelp {
protected:
- com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory > m_xMSF;
+ com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext > m_xContext;
com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider > m_xProvider;
sal_Int32 m_nRow;
bool m_nWasNull;
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
index 7129b8407659..93f3e4dfced5 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforquery.cxx
@@ -26,6 +26,7 @@
*
************************************************************************/
+#include <comphelper/processfactory.hxx>
#include <com/sun/star/ucb/Command.hpp>
#include <com/sun/star/ucb/XCommandEnvironment.hpp>
#include <com/sun/star/i18n/XExtendedTransliteration.hpp>
@@ -94,7 +95,7 @@ ResultSetForQuery::ResultSetForQuery( const uno::Reference< lang::XMultiServiceF
const uno::Sequence< NumberedSortingInfo >& seqSort,
URLParameter& aURLParameter,
Databases* pDatabases )
- : ResultSetBase( xMSF,xProvider,nOpenMode,seq,seqSort ),
+ : ResultSetBase( comphelper::getComponentContext(xMSF),xProvider,nOpenMode,seq,seqSort ),
m_aURLParameter( aURLParameter )
{
Reference< XTransliteration > xTrans(
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
index f5702566a410..b3dd5a6dd6bb 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.cxx
@@ -39,14 +39,14 @@ using namespace com::sun::star::ucb;
-ResultSetForRoot::ResultSetForRoot( const uno::Reference< lang::XMultiServiceFactory >& xMSF,
+ResultSetForRoot::ResultSetForRoot( const uno::Reference< uno::XComponentContext >& rxContext,
const uno::Reference< XContentProvider >& xProvider,
sal_Int32 nOpenMode,
const uno::Sequence< beans::Property >& seq,
const uno::Sequence< NumberedSortingInfo >& seqSort,
URLParameter& aURLParameter,
Databases* pDatabases )
- : ResultSetBase( xMSF,xProvider,nOpenMode,seq,seqSort ),
+ : ResultSetBase( rxContext, xProvider,nOpenMode,seq,seqSort ),
m_aURLParameter( aURLParameter ),
m_pDatabases( pDatabases )
{
diff --git a/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx b/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx
index b0e9f04f750b..83ae9b725534 100644
--- a/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx
+++ b/xmlhelp/source/cxxhelp/provider/resultsetforroot.hxx
@@ -19,7 +19,7 @@
#ifndef _RESULTSETFORROOT_HXX
#define _RESULTSETFORROOT_HXX
-#include <com/sun/star/lang/XMultiServiceFactory.hpp>
+#include <com/sun/star/uno/XComponentContext.hpp>
#include <com/sun/star/ucb/XContentProvider.hpp>
#include <com/sun/star/beans/Property.hpp>
#include <com/sun/star/ucb/NumberedSortingInfo.hpp>
@@ -36,7 +36,7 @@ namespace chelp {
{
public:
- ResultSetForRoot( const com::sun::star::uno::Reference< com::sun::star::lang::XMultiServiceFactory >& xMSF,
+ ResultSetForRoot( const com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >& rxContext,
const com::sun::star::uno::Reference< com::sun::star::ucb::XContentProvider >& xProvider,
sal_Int32 nOpenMode,
const com::sun::star::uno::Sequence< com::sun::star::beans::Property >& seq,