summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-11-30 15:56:27 +0200
committerNoel Grandin <noel@peralex.com>2012-11-30 16:00:06 +0200
commit7369ac227531330b96981359c6e346da1c0e1bd1 (patch)
tree81b19406d9a1943c9a4a1c2355bb467d1d2f4725
parent27520df57c887488ff4fd5580a9e932f67bd3976 (diff)
fix build on windows in ucb/source/ucp/odma/*
because I messed up the UNO changes in commit 58e9686da63f8082c5d3078745a8ed89f0d79b4d. Change-Id: I0d2a9dc1c33009c963bc13301dafbbc69e15a1da
-rw-r--r--ucb/source/ucp/odma/odma_content.cxx16
-rw-r--r--ucb/source/ucp/odma/odma_content.hxx4
-rw-r--r--ucb/source/ucp/odma/odma_datasupplier.cxx3
-rw-r--r--ucb/source/ucp/odma/odma_provider.cxx2
4 files changed, 11 insertions, 14 deletions
diff --git a/ucb/source/ucp/odma/odma_content.cxx b/ucb/source/ucp/odma/odma_content.cxx
index be1e48f8bea3..0789bd663bda 100644
--- a/ucb/source/ucp/odma/odma_content.cxx
+++ b/ucb/source/ucp/odma/odma_content.cxx
@@ -31,7 +31,6 @@
#include <com/sun/star/ucb/OpenMode.hpp>
#include <com/sun/star/ucb/XCommandInfo.hpp>
#include <com/sun/star/ucb/XPersistentPropertySet.hpp>
-#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/propertyvalueset.hxx>
#include <ucbhelper/cancelcommandexecution.hxx>
@@ -66,11 +65,11 @@ using namespace odma;
//=========================================================================
//=========================================================================
-Content::Content( const uno::Reference< lang::XMultiServiceFactory >& rxSMgr,
+Content::Content( const uno::Reference< uno::XComponentContext >& rxContext,
ContentProvider* pProvider,
const uno::Reference< ucb::XContentIdentifier >& Identifier,
const ::rtl::Reference<ContentProperties>& _rProps)
- : ContentImplHelper( rxSMgr, pProvider, Identifier )
+ : ContentImplHelper( rxContext, pProvider, Identifier )
,m_aProps(_rProps)
,m_pProvider(pProvider)
,m_pContent(NULL)
@@ -310,7 +309,7 @@ uno::Any SAL_CALL Content::execute(
// open as folder - return result set
uno::Reference< ucb::XDynamicResultSet > xSet
- = new DynamicResultSet( comphelper::getComponentContext(m_xSMgr),
+ = new DynamicResultSet( m_xContext,
this,
aOpenCommand,
Environment );
@@ -341,9 +340,7 @@ uno::Any SAL_CALL Content::execute(
rtl::OUString aURL = m_xIdentifier->getContentIdentifier();
rtl::OUString sFileURL = openDoc();
delete m_pContent;
- m_pContent = new ::ucbhelper::Content
- (sFileURL,NULL,
- comphelper::getComponentContext(m_xSMgr));
+ m_pContent = new ::ucbhelper::Content( sFileURL, NULL, m_xContext );
if(!m_pContent->isDocument())
{
rtl::OUString sErrorMsg("File: ");
@@ -501,8 +498,7 @@ uno::Any SAL_CALL Content::execute(
sal_Int32 nLastIndex = sFileURL.lastIndexOf( sal_Unicode('/') );
// Create a new Content object for the "shadow" file
// corresponding to the opened document from the DMS.
- ::ucbhelper::Content aContent(sFileURL.copy(0,nLastIndex),NULL,
- comphelper::getComponentContext(m_xSMgr));
+ ::ucbhelper::Content aContent(sFileURL.copy(0,nLastIndex),NULL, m_xContext);
// aTransferInfo.NameClash = ucb::NameClash::OVERWRITE;
aTransferInfo.NewTitle = sFileURL.copy( 1 + nLastIndex );
// Copy our saved backup copy to the "shadow" file.
@@ -768,7 +764,7 @@ uno::Reference< sdbc::XRow > Content::getPropertyValues(
const uno::Reference< ucb::XCommandEnvironment >& /*xEnv*/ )
{
osl::Guard< osl::Mutex > aGuard( m_aMutex );
- return getPropertyValues( comphelper::getComponentContext(m_xSMgr),
+ return getPropertyValues( m_xContext,
rProperties,
m_aProps,
rtl::Reference<
diff --git a/ucb/source/ucp/odma/odma_content.hxx b/ucb/source/ucp/odma/odma_content.hxx
index 1741d11c742e..21608870da18 100644
--- a/ucb/source/ucp/odma/odma_content.hxx
+++ b/ucb/source/ucp/odma/odma_content.hxx
@@ -120,7 +120,7 @@ private:
public:
Content( const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory >& rxSMgr,
+ ::com::sun::star::uno::XComponentContext >& rxContext,
ContentProvider* pProvider,
const ::com::sun::star::uno::Reference<
::com::sun::star::ucb::XContentIdentifier >& Identifier,
@@ -172,7 +172,7 @@ public:
// Called from resultset data supplier.
static ::com::sun::star::uno::Reference< ::com::sun::star::sdbc::XRow >
getPropertyValues( const ::com::sun::star::uno::Reference<
- ::com::sun::star::lang::XMultiServiceFactory >& rSMgr,
+ ::com::sun::star::uno::XComponentContext >& rxContext,
const ::com::sun::star::uno::Sequence<
::com::sun::star::beans::Property >& rProperties,
const ::rtl::Reference<ContentProperties>& rData,
diff --git a/ucb/source/ucp/odma/odma_datasupplier.cxx b/ucb/source/ucp/odma/odma_datasupplier.cxx
index b4ed1496a728..5b2daf928d02 100644
--- a/ucb/source/ucp/odma/odma_datasupplier.cxx
+++ b/ucb/source/ucp/odma/odma_datasupplier.cxx
@@ -22,6 +22,7 @@
#include <windows.h>
#endif
#include <vector>
+#include <comphelper/processfactory.hxx>
#include <ucbhelper/contentidentifier.hxx>
#include <ucbhelper/providerhelper.hxx>
#include "odma_datasupplier.hxx"
@@ -408,7 +409,7 @@ Reference< XRow > DataSupplier::queryPropertyValues( sal_uInt32 nIndex )
if ( getResult( nIndex ) )
{
Reference< XRow > xRow = Content::getPropertyValues(
- m_pImpl->m_xSMgr,
+ comphelper::getComponentContext(m_pImpl->m_xSMgr),
getResultSet()->getProperties(),
m_pImpl->m_aResults[ nIndex ]->rData,
m_pImpl->m_xContent->getProvider(),
diff --git a/ucb/source/ucp/odma/odma_provider.cxx b/ucb/source/ucp/odma/odma_provider.cxx
index f9079981c259..61aaf76f2914 100644
--- a/ucb/source/ucp/odma/odma_provider.cxx
+++ b/ucb/source/ucp/odma/odma_provider.cxx
@@ -246,7 +246,7 @@ uno::Reference< ucb::XContent > SAL_CALL ContentProvider::queryContent(
if(!aProp.is())
throw ucb::IllegalIdentifierException();
- xContent = new Content( uno::Reference< lang::XMultiServiceFactory >(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW), this, xCanonicId ,aProp);
+ xContent = new Content( m_xContext, this, xCanonicId ,aProp);
registerNewContent( xContent );
if ( !xContent->getIdentifier().is() )