summaryrefslogtreecommitdiff
path: root/cui/source/options/optjava.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/optjava.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/optjava.cxx')
-rw-r--r--cui/source/options/optjava.cxx11
1 files changed, 5 insertions, 6 deletions
diff --git a/cui/source/options/optjava.cxx b/cui/source/options/optjava.cxx
index 5157dae4cdc3..6c38810b92d3 100644
--- a/cui/source/options/optjava.cxx
+++ b/cui/source/options/optjava.cxx
@@ -39,6 +39,7 @@
#include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp>
#include <com/sun/star/ui/dialogs/XAsynchronousExecutableDialog.hpp>
#include <com/sun/star/ui/dialogs/TemplateDescription.hpp>
+#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/ucb/XContentProvider.hpp>
#include <jvmfwk/framework.h>
@@ -236,9 +237,8 @@ IMPL_LINK_NOARG(SvxJavaOptionsPage, AddHdl_Impl)
{
try
{
- Reference < XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
- xFolderPicker = Reference< XFolderPicker >(
- xMgr->createInstance( ::rtl::OUString(RTL_CONSTASCII_USTRINGPARAM("com.sun.star.ui.dialogs.FolderPicker") ) ), UNO_QUERY );
+ Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ xFolderPicker = FolderPicker::create(xContext);
String sWorkFolder = SvtPathOptions().GetWorkPath();
xFolderPicker->setDisplayDirectory( sWorkFolder );
@@ -965,9 +965,8 @@ IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddArchiveHdl_Impl)
IMPL_LINK_NOARG(SvxJavaClassPathDlg, AddPathHdl_Impl)
{
- rtl::OUString sService( RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" ) );
- Reference < XMultiServiceFactory > xFactory( ::comphelper::getProcessServiceFactory() );
- Reference < XFolderPicker > xFolderPicker( xFactory->createInstance( sService ), UNO_QUERY );
+ Reference < XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ Reference < XFolderPicker2 > xFolderPicker = FolderPicker::create(xContext);;
String sOldFolder;
if ( m_aPathList.GetSelectEntryCount() > 0 )