diff options
author | Noel Grandin <noel@peralex.com> | 2012-08-17 14:55:54 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-08-23 09:58:25 +0200 |
commit | 3e7990faa4dda6022c63aebb2ac8f12b2bbc0731 (patch) | |
tree | b2daf5fcd8ffeb4ffc9b4c0183da590501d9d79c /extensions | |
parent | 8b34ad6204ee35b7dca10d2b1c9761dfa72684a7 (diff) |
fdo#46808, Shiny UNO, Use factory to create XSimpleFileAccess instances
Change-Id: I86e2a8873e5646abd340015f500bf9e872e8e6c5
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'extensions')
-rw-r--r-- | extensions/source/nsplugin/source/so_instance.cxx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/extensions/source/nsplugin/source/so_instance.cxx b/extensions/source/nsplugin/source/so_instance.cxx index 8b243ae1d8d7..80bc51dc1dd8 100644 --- a/extensions/source/nsplugin/source/so_instance.cxx +++ b/extensions/source/nsplugin/source/so_instance.cxx @@ -34,7 +34,7 @@ #include <com/sun/star/awt/XVclWindowPeer.hpp> #include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/lang/DisposedException.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess.hpp> +#include <com/sun/star/ucb/SimpleFileAccess.hpp> #include <com/sun/star/presentation/XPresentation.hpp> #include <com/sun/star/presentation/XPresentationSupplier.hpp> #include <vcl/window.hxx> @@ -238,9 +238,9 @@ sal_Bool SoPluginInstance::LoadDocument(NSP_HWND hParent) } //create stream for the document - Reference< ::com::sun::star::ucb::XSimpleFileAccess > xSimpleFileAccess( - mxRemoteMSF->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")) ), - uno::UNO_QUERY ); + Reference< beans::XPropertySet > xFactoryProperties( mxRemoteMSF, uno::UNO_QUERY ); + Reference< uno::XComponentContext > xContext( xFactoryProperties->getPropertyValue( "DefaultContext" ), UNO_QUERY ); + Reference< ucb::XSimpleFileAccess2 > xSimpleFileAccess( ucb::SimpleFileAccess::create(xContext) ); if(!xSimpleFileAccess.is()) { debug_fprintf(NSP_LOG_APPEND, "can not create SimpleFileAccess to load URL\n"); |