Kaydet (Commit) b50610f0 authored tarafından David Tardon's avatar David Tardon

fdo#46808 adapt GIO provider

Change-Id: I63d2c4a3e4b83ef94c309223c78fb2f93ccf251e
üst a6ac5b2a
...@@ -599,7 +599,7 @@ sal_Bool Content::exchangeIdentity( const uno::Reference< ucb::XContentIdentifie ...@@ -599,7 +599,7 @@ sal_Bool Content::exchangeIdentity( const uno::Reference< ucb::XContentIdentifie
0, aOldURL.getLength(), xNewId->getContentIdentifier() ); 0, aOldURL.getLength(), xNewId->getContentIdentifier() );
uno::Reference< ucb::XContentIdentifier > xNewChildId uno::Reference< ucb::XContentIdentifier > xNewChildId
= new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewChildURL ); = new ::ucbhelper::ContentIdentifier( aNewChildURL );
if ( !xChild->exchangeIdentity( xNewChildId ) ) if ( !xChild->exchangeIdentity( xNewChildId ) )
return sal_False; return sal_False;
...@@ -730,7 +730,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues( ...@@ -730,7 +730,7 @@ uno::Sequence< uno::Any > Content::setPropertyValues(
rtl::OUString aNewURL = getParentURL(); rtl::OUString aNewURL = getParentURL();
aNewURL += rtl::OUString( newName, strlen(newName), RTL_TEXTENCODING_UTF8 ); aNewURL += rtl::OUString( newName, strlen(newName), RTL_TEXTENCODING_UTF8 );
uno::Reference< ucb::XContentIdentifier > xNewId uno::Reference< ucb::XContentIdentifier > xNewId
= new ::ucbhelper::ContentIdentifier( m_xSMgr, aNewURL ); = new ::ucbhelper::ContentIdentifier( aNewURL );
if (!exchangeIdentity( xNewId ) ) if (!exchangeIdentity( xNewId ) )
{ {
...@@ -1158,7 +1158,7 @@ uno::Reference< ucb::XContent > ...@@ -1158,7 +1158,7 @@ uno::Reference< ucb::XContent >
name = create_document ? "[New_Content]" : "[New_Collection]"; name = create_document ? "[New_Content]" : "[New_Collection]";
aURL += rtl::OUString::createFromAscii( name ); aURL += rtl::OUString::createFromAscii( name );
uno::Reference< ucb::XContentIdentifier > xId(new ::ucbhelper::ContentIdentifier(m_xSMgr, aURL)); uno::Reference< ucb::XContentIdentifier > xId(new ::ucbhelper::ContentIdentifier(aURL));
try try
{ {
......
...@@ -51,7 +51,8 @@ ContentProvider::queryContent( ...@@ -51,7 +51,8 @@ ContentProvider::queryContent(
try try
{ {
xContent = new ::gio::Content(m_xSMgr, this, Identifier); uno::Reference<lang::XMultiServiceFactory> xMSF(m_xContext->getServiceManager(), uno::UNO_QUERY_THROW);
xContent = new ::gio::Content(xMSF, this, Identifier);
} }
catch ( com::sun::star::ucb::ContentCreationException const & ) catch ( com::sun::star::ucb::ContentCreationException const & )
{ {
...@@ -65,8 +66,8 @@ ContentProvider::queryContent( ...@@ -65,8 +66,8 @@ ContentProvider::queryContent(
} }
ContentProvider::ContentProvider( ContentProvider::ContentProvider(
const uno::Reference< lang::XMultiServiceFactory >& rSMgr ) const uno::Reference< uno::XComponentContext >& rxContext )
: ::ucbhelper::ContentProviderImplHelper( rSMgr ) : ::ucbhelper::ContentProviderImplHelper( rxContext )
{ {
} }
...@@ -84,7 +85,7 @@ XTYPEPROVIDER_IMPL_3( ContentProvider, ...@@ -84,7 +85,7 @@ XTYPEPROVIDER_IMPL_3( ContentProvider,
lang::XServiceInfo, lang::XServiceInfo,
com::sun::star::ucb::XContentProvider ); com::sun::star::ucb::XContentProvider );
XSERVICEINFO_IMPL_1( ContentProvider, XSERVICEINFO_IMPL_1_CTX( ContentProvider,
rtl::OUString( "com.sun.star.comp.GIOContentProvider" ), rtl::OUString( "com.sun.star.comp.GIOContentProvider" ),
rtl::OUString( "com.sun.star.ucb.GIOContentProvider" ) ); rtl::OUString( "com.sun.star.ucb.GIOContentProvider" ) );
......
...@@ -32,7 +32,7 @@ class ContentProvider : public ::ucbhelper::ContentProviderImplHelper ...@@ -32,7 +32,7 @@ class ContentProvider : public ::ucbhelper::ContentProviderImplHelper
{ {
public: public:
ContentProvider( const ::com::sun::star::uno::Reference< ContentProvider( const ::com::sun::star::uno::Reference<
::com::sun::star::lang::XMultiServiceFactory >& rSMgr ); ::com::sun::star::uno::XComponentContext >& rxContext );
virtual ~ContentProvider(); virtual ~ContentProvider();
// XInterface // XInterface
......
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