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 /sw | |
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 'sw')
-rw-r--r-- | sw/source/filter/ww8/ww8par.cxx | 5 | ||||
-rw-r--r-- | sw/source/ui/vba/vbaaddins.cxx | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/sw/source/filter/ww8/ww8par.cxx b/sw/source/filter/ww8/ww8par.cxx index 1d245c293bb4..b07404e47d96 100644 --- a/sw/source/filter/ww8/ww8par.cxx +++ b/sw/source/filter/ww8/ww8par.cxx @@ -166,7 +166,8 @@ using namespace nsHdFtFlags; #include <com/sun/star/frame/XModel.hpp> #include <filter/msfilter/msvbahelper.hxx> #include <unotools/pathoptions.hxx> -#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/document/XFilter.hpp> #include <com/sun/star/script/vba/XVBACompatibility.hpp> @@ -4303,7 +4304,7 @@ bool SwWW8ImplReader::ReadGlobalTemplateSettings( const rtl::OUString& sCreatedF uno::Sequence< rtl::OUString > sGlobalTemplates; // first get the autoload addins in the directory STARTUP - uno::Reference< ucb::XSimpleFileAccess > xSFA( ::comphelper::getProcessServiceFactory()->createInstance( "com.sun.star.ucb.SimpleFileAccess" ), uno::UNO_QUERY_THROW ); + uno::Reference<ucb::XSimpleFileAccess2> xSFA(ucb::SimpleFileAccess::create(::comphelper::getProcessComponentContext())); if( xSFA->isFolder( aAddinPath ) ) sGlobalTemplates = xSFA->getFolderContents( aAddinPath, sal_False ); diff --git a/sw/source/ui/vba/vbaaddins.cxx b/sw/source/ui/vba/vbaaddins.cxx index b0bb6aa9e5d0..964405549817 100644 --- a/sw/source/ui/vba/vbaaddins.cxx +++ b/sw/source/ui/vba/vbaaddins.cxx @@ -30,7 +30,8 @@ #include <cppuhelper/implbase3.hxx> #include <unotools/pathoptions.hxx> #include <com/sun/star/lang/XMultiComponentFactory.hpp> -#include <com/sun/star/ucb/XSimpleFileAccess.hpp> +#include <com/sun/star/ucb/SimpleFileAccess.hpp> +#include <com/sun/star/ucb/XSimpleFileAccess2.hpp> using namespace ::ooo::vba; using namespace ::com::sun::star; @@ -41,7 +42,7 @@ uno::Reference< container::XIndexAccess > lcl_getAddinCollection( const uno::Ref // first get the autoload addins in the directory STARTUP uno::Reference< lang::XMultiComponentFactory > xMCF( xContext->getServiceManager(), uno::UNO_QUERY_THROW ); - uno::Reference< ucb::XSimpleFileAccess > xSFA( xMCF->createInstanceWithContext( rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ucb.SimpleFileAccess")), xContext), uno::UNO_QUERY_THROW ); + uno::Reference<ucb::XSimpleFileAccess2> xSFA(ucb::SimpleFileAccess::create(xContext)); SvtPathOptions aPathOpt; // FIXME: temporary the STARTUP path is located in $OO/basic3.1/program/addin String aAddinPath = aPathOpt.GetAddinPath(); |