summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-08-17 15:32:44 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-08-27 15:40:06 +0200
commit65c78617de30f4928255b15599e7709fa0081f67 (patch)
tree2f75f960a5802bc12460d92db5d26f3a25e04a3f
parent93cdd851ee5917fa95e78d84734c73055b0edc4e (diff)
fdo#46808, Shiny UNO, More use factory to create XSimpleFileAccess instances
Change-Id: I62fdd31fe89ae280e4ad2843dbc821f1fecb59a1
-rw-r--r--forms/source/xforms/model.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/forms/source/xforms/model.cxx b/forms/source/xforms/model.cxx
index 91863d357877..31c7169723cd 100644
--- a/forms/source/xforms/model.cxx
+++ b/forms/source/xforms/model.cxx
@@ -44,6 +44,7 @@
#include <tools/debug.hxx>
#include <comphelper/propertysetinfo.hxx>
+#include <comphelper/processfactory.hxx>
#include <cppuhelper/typeprovider.hxx>
#include <algorithm>
@@ -58,7 +59,7 @@
#include <com/sun/star/xml/dom/XDocumentBuilder.hpp>
#include <com/sun/star/uno/Sequence.hxx>
#include <com/sun/star/beans/PropertyValue.hpp>
-#include <com/sun/star/ucb/XSimpleFileAccess.hpp>
+#include <com/sun/star/ucb/SimpleFileAccess.hpp>
#include <com/sun/star/io/XInputStream.hpp>
@@ -73,7 +74,8 @@ using com::sun::star::beans::UnknownPropertyException;
using com::sun::star::util::VetoException;
using com::sun::star::lang::WrappedTargetException;
using com::sun::star::lang::IllegalArgumentException;
-using com::sun::star::ucb::XSimpleFileAccess;
+using com::sun::star::ucb::XSimpleFileAccess2;
+using com::sun::star::ucb::SimpleFileAccess;
using com::sun::star::io::XInputStream;
using namespace com::sun::star::uno;
@@ -407,10 +409,7 @@ void Model::loadInstance( sal_Int32 nInstance )
try
{
Reference<XInputStream> xInput =
- Reference<XSimpleFileAccess>(
- createInstance(
- OUSTRING("com.sun.star.ucb.SimpleFileAccess") ),
- UNO_QUERY_THROW )->openFileRead( sURL );
+ Reference<XSimpleFileAccess2>( SimpleFileAccess::create( ::comphelper::getProcessComponentContext() ) )->openFileRead( sURL );
if( xInput.is() )
{
Reference<XDocument> xInstance =