diff options
author | Noel Grandin <noel@peralex.com> | 2012-05-29 17:17:28 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-06-06 10:01:22 +0200 |
commit | d08578912f2c9ef42d4349079422e25b951e544e (patch) | |
tree | d029b5a9110bcdc255e72ef9c98887f3f8521ea6 /sc | |
parent | 7d2a5b5114987f1ab415e32ebb5bb9a46b98dc17 (diff) |
fdo#46808, Adapt UNO services to new style, Part 7, updating ::create
Update calls to factories to use new SimpleFileAccess::create method
Change-Id: Ie5b0696fe2228a9033b19969245a53c21a61aa14
Signed-off-by: Stephan Bergmann <sbergman@redhat.com>, added some tweaks.
Diffstat (limited to 'sc')
-rw-r--r-- | sc/source/ui/vba/testvba/testvba.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sc/source/ui/vba/testvba/testvba.cxx b/sc/source/ui/vba/testvba/testvba.cxx index 4a318098684e..9f58d30643e9 100644 --- a/sc/source/ui/vba/testvba/testvba.cxx +++ b/sc/source/ui/vba/testvba/testvba.cxx @@ -12,7 +12,8 @@ #include <com/sun/star/sheet/XSpreadsheetDocument.hpp> #include <com/sun/star/util/XCloseable.hpp> #include <com/sun/star/uno/XComponentContext.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess.hpp> +#include <com/sun/star/ucb/SimpleFileAccess.hpp> +#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> #include <com/sun/star/script/provider/XScriptProviderSupplier.hpp> #include <com/sun/star/document/XTypeDetection.hpp> @@ -88,7 +89,7 @@ private: Reference< XComponentContext > mxContext; Reference< XMultiComponentFactory > mxMCF; Reference< XComponentLoader > mxCompLoader; - Reference< XSimpleFileAccess > mxSFA; + Reference< XSimpleFileAccess2 > mxSFA; rtl::OUString msOutDirPath; protected: public: @@ -98,7 +99,7 @@ public: const rtl::OUString& _outDirPath ) : mxContext( _xContext ), mxMCF( _xMCF ), mxCompLoader( _xCompLoader ), msOutDirPath( convertToURL( _outDirPath ) ) { - mxSFA.set( mxMCF->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ucb.SimpleFileAccess" )), mxContext), uno::UNO_QUERY_THROW ); + mxSFA.set( ucb::SimpleFileAccess::create(_xContext) ); } rtl::OUString getLogLocation() throw ( beans::UnknownPropertyException, lang::IllegalArgumentException, lang::WrappedTargetException, uno::Exception ) |