summaryrefslogtreecommitdiff
path: root/cui/source/options/optupdt.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2012-10-11 15:43:08 +0200
committerStephan Bergmann <sbergman@redhat.com>2012-10-23 10:26:40 +0200
commitc988da288ec473a28f61ebb53aa3ff82bab11ef4 (patch)
tree284f184384dba369c40e0caff533a2d683e9d478 /cui/source/options/optupdt.cxx
parenteb016138e817d686795e1902a7a295d93639da27 (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 'cui/source/options/optupdt.cxx')
-rw-r--r--cui/source/options/optupdt.cxx8
1 files changed, 3 insertions, 5 deletions
diff --git a/cui/source/options/optupdt.cxx b/cui/source/options/optupdt.cxx
index 0e81360bc4f5..b0f255f80ffe 100644
--- a/cui/source/options/optupdt.cxx
+++ b/cui/source/options/optupdt.cxx
@@ -28,7 +28,7 @@
#include <comphelper/processfactory.hxx>
#include <com/sun/star/configuration/theDefaultProvider.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 <com/sun/star/frame/XDesktop.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
@@ -300,10 +300,8 @@ IMPL_LINK( SvxOnlineUpdateTabPage, AutoCheckHdl_Impl, CheckBox *, pBox )
IMPL_LINK_NOARG(SvxOnlineUpdateTabPage, FileDialogHdl_Impl)
{
- uno::Reference < lang::XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- uno::Reference < dialogs::XFolderPicker > xFolderPicker(
- xFactory->createInstance( rtl::OUString( RTL_CONSTASCII_USTRINGPARAM( FOLDER_PICKER_SERVICE_NAME ) ) ),
- uno::UNO_QUERY );
+ uno::Reference < uno::XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ uno::Reference < dialogs::XFolderPicker2 > xFolderPicker = dialogs::FolderPicker::create(xContext);
rtl::OUString aURL;
if( osl::FileBase::E_None != osl::FileBase::getFileURLFromSystemPath(m_aDestPath.GetText(), aURL) )