diff options
author | Noel Grandin <noel@peralex.com> | 2012-10-11 15:43:08 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2012-10-23 10:26:40 +0200 |
commit | c988da288ec473a28f61ebb53aa3ff82bab11ef4 (patch) | |
tree | 284f184384dba369c40e0caff533a2d683e9d478 /xmlsecurity/source | |
parent | eb016138e817d686795e1902a7a295d93639da27 (diff) |
fdo#46808, Adapt ui::dialogs::FolderPicker UNO service to new style
Create a merged XFolderPicker2 interface for this service to implement.
Which is backwards-compatible, but does not require creating a new service.
Change-Id: I4a2c2a8d491a8d5633c19ddcea547f0efe75b91d
Diffstat (limited to 'xmlsecurity/source')
-rw-r--r-- | xmlsecurity/source/dialogs/macrosecurity.cxx | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/xmlsecurity/source/dialogs/macrosecurity.cxx b/xmlsecurity/source/dialogs/macrosecurity.cxx index a86fca3fc7c1..3f5b37dc1d5c 100644 --- a/xmlsecurity/source/dialogs/macrosecurity.cxx +++ b/xmlsecurity/source/dialogs/macrosecurity.cxx @@ -34,7 +34,7 @@ #include <comphelper/processfactory.hxx> #include <com/sun/star/uno/Exception.hpp> #include <com/sun/star/lang/XMultiServiceFactory.hpp> -#include <com/sun/star/ui/dialogs/XFolderPicker.hpp> +#include <com/sun/star/ui/dialogs/FolderPicker.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <tools/urlobj.hxx> @@ -228,9 +228,8 @@ IMPL_LINK_NOARG(MacroSecurityTrustedSourcesTP, AddLocPBHdl) { try { - rtl::OUString aService( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) ); - uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() ); - uno::Reference < ui::dialogs::XFolderPicker > xFolderPicker( xFactory->createInstance( aService ), uno::UNO_QUERY ); + uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() ); + uno::Reference < ui::dialogs::XFolderPicker2 > xFolderPicker = ui::dialogs::FolderPicker::create(xContext); short nRet = xFolderPicker->execute(); |