From 5837402fb1daa437d9a1a37edc9ede57319944f1 Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Fri, 2 Nov 2012 17:46:30 +0200 Subject: fdo#46808, use service constructor for ucb::SimpleFileAccess I upgraded the service to return XSimpleFileAccess3, since it already implemented that interface, and it's backwards compatible. Change-Id: I40001a46048bd21a23b6a2f58a95376f06fc634b --- embeddedobj/source/msole/oleembed.cxx | 3 +-- embeddedobj/source/msole/olepersist.cxx | 9 ++++----- embeddedobj/source/msole/ownview.cxx | 3 +-- 3 files changed, 6 insertions(+), 9 deletions(-) (limited to 'embeddedobj') diff --git a/embeddedobj/source/msole/oleembed.cxx b/embeddedobj/source/msole/oleembed.cxx index 9938ae91fdcd..ccf816153bdc 100644 --- a/embeddedobj/source/msole/oleembed.cxx +++ b/embeddedobj/source/msole/oleembed.cxx @@ -37,7 +37,6 @@ #include #include #include -#include #include #include #include @@ -730,7 +729,7 @@ namespace xNativeTempFile = uno::Reference(); - uno::Reference < ucb::XSimpleFileAccess2 > xSimpleFileAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xSimpleFileAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) ); xSimpleFileAccess->setReadOnly(sUrl, sal_True); diff --git a/embeddedobj/source/msole/olepersist.cxx b/embeddedobj/source/msole/olepersist.cxx index 31563944c214..18e01cd12817 100644 --- a/embeddedobj/source/msole/olepersist.cxx +++ b/embeddedobj/source/msole/olepersist.cxx @@ -36,7 +36,6 @@ #include #include #include -#include #include @@ -62,7 +61,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: try { - uno::Reference < ucb::XSimpleFileAccess2 > xAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) ); xAccess->kill( aURL ); @@ -114,7 +113,7 @@ sal_Bool KillFile_Impl( const ::rtl::OUString& aURL, const uno::Reference< lang: if ( !aResult.isEmpty() ) { try { - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(xFactory) ) ); uno::Reference< io::XOutputStream > xTempOutStream = xTempAccess->openFileWrite( aResult ); @@ -577,7 +576,7 @@ sal_Bool OleEmbeddedObject::HasVisReplInStream() try { // open temporary file for reading - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) ); xStream = xTempAccess->openFileRead( m_aTempURL ); @@ -1043,7 +1042,7 @@ void OleEmbeddedObject::StoreObjectToStream( uno::Reference< io::XOutputStream > throw uno::RuntimeException(); // open temporary file for reading - uno::Reference < ucb::XSimpleFileAccess2 > xTempAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xTempAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) ); uno::Reference< io::XInputStream > xTempInStream = xTempAccess->openFileRead( m_aTempURL ); diff --git a/embeddedobj/source/msole/ownview.cxx b/embeddedobj/source/msole/ownview.cxx index d92b305d0b63..01475efcc85a 100644 --- a/embeddedobj/source/msole/ownview.cxx +++ b/embeddedobj/source/msole/ownview.cxx @@ -29,7 +29,6 @@ #include #include #include -#include #include #include @@ -414,7 +413,7 @@ void OwnView_Impl::CreateNative() try { - uno::Reference < ucb::XSimpleFileAccess2 > xAccess( + uno::Reference < ucb::XSimpleFileAccess3 > xAccess( ucb::SimpleFileAccess::create( comphelper::getComponentContext(m_xFactory) ) ); uno::Reference< io::XInputStream > xInStream = xAccess->openFileRead( m_aTempFileURL ); -- cgit