diff options
author | Noel Grandin <noel@peralex.com> | 2012-11-02 17:46:30 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-11-15 08:28:44 +0100 |
commit | 5837402fb1daa437d9a1a37edc9ede57319944f1 (patch) | |
tree | 61e39515cd546fe7ad76364ebb444850b93541ce /embeddedobj | |
parent | 3f15a663b273e4a437fd68335d6eab2b11fc80c9 (diff) |
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
Diffstat (limited to 'embeddedobj')
-rw-r--r-- | embeddedobj/source/msole/oleembed.cxx | 3 | ||||
-rw-r--r-- | embeddedobj/source/msole/olepersist.cxx | 9 | ||||
-rw-r--r-- | embeddedobj/source/msole/ownview.cxx | 3 |
3 files changed, 6 insertions, 9 deletions
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 <com/sun/star/frame/XLoadable.hpp> #include <com/sun/star/document/XStorageBasedDocument.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/container/XNameAccess.hpp> #include <com/sun/star/container/XNameContainer.hpp> #include <com/sun/star/system/SystemShellExecute.hpp> @@ -730,7 +729,7 @@ namespace xNativeTempFile = uno::Reference<beans::XPropertySet>(); - 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 <com/sun/star/io/XTruncate.hpp> #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <rtl/logfile.hxx> @@ -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 <com/sun/star/io/XSeekable.hpp> #include <com/sun/star/task/XInteractionHandler.hpp> #include <com/sun/star/ucb/SimpleFileAccess.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/beans/XPropertySet.hpp> @@ -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 ); |