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 /scripting/source/inc | |
parent | Make setsdkenv_unix executable instead of configure.pl (diff) | |
download | core-d08578912f2c9ef42d4349079422e25b951e544e.tar.gz core-d08578912f2c9ef42d4349079422e25b951e544e.zip |
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 'scripting/source/inc')
-rw-r--r-- | scripting/source/inc/util/MiscUtils.hxx | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/scripting/source/inc/util/MiscUtils.hxx b/scripting/source/inc/util/MiscUtils.hxx index 5a8554b24294..a72e629caba2 100644 --- a/scripting/source/inc/util/MiscUtils.hxx +++ b/scripting/source/inc/util/MiscUtils.hxx @@ -39,7 +39,8 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/container/XContentEnumerationAccess.hpp> #include <com/sun/star/ucb/XCommandEnvironment.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/ucb/XContentAccess.hpp> #include <com/sun/star/sdbc/XResultSet.hpp> #include <com/sun/star/sdbc/XRow.hpp> @@ -65,14 +66,10 @@ public: { return result; } - css::uno::Reference < css::lang::XMultiComponentFactory > xFac( xCtx->getServiceManager(), css::uno::UNO_QUERY ); - if ( xFac.is() ) + css::uno::Reference < css::ucb::XSimpleFileAccess2 > xSFA( css::ucb::SimpleFileAccess::create(xCtx) ); + if ( xSFA.is() ) { - css::uno::Reference < com::sun::star::ucb::XSimpleFileAccess > xSFA( xFac->createInstanceWithContext( OUSTR("com.sun.star.ucb.SimpleFileAccess"), xCtx ), css::uno::UNO_QUERY ); - if ( xSFA.is() ) - { - result = xSFA->getFolderContents( OUSTR("vnd.sun.star.tdoc:/"), true ); - } + result = xSFA->getFolderContents( OUSTR("vnd.sun.star.tdoc:/"), true ); } } catch ( css::uno::Exception& ) |