Kaydet (Commit) 7369ac22 authored tarafından Noel Grandin's avatar Noel Grandin

fix build on windows in ucb/source/ucp/odma/*

because I messed up the UNO changes in
commit 58e9686da63f8082c5d3078745a8ed89f0d79b4d.

Change-Id: I0d2a9dc1c33009c963bc13301dafbbc69e15a1da
üst 27520df5
......@@ -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<
......
......@@ -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,
......
......@@ -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(),
......
......@@ -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() )
......
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