summaryrefslogtreecommitdiff
path: root/sw/source/ui/envelp
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 /sw/source/ui/envelp
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 'sw/source/ui/envelp')
-rw-r--r--sw/source/ui/envelp/mailmrge.cxx13
1 files changed, 3 insertions, 10 deletions
diff --git a/sw/source/ui/envelp/mailmrge.cxx b/sw/source/ui/envelp/mailmrge.cxx
index 1367afc64f54..4b6040676d2a 100644
--- a/sw/source/ui/envelp/mailmrge.cxx
+++ b/sw/source/ui/envelp/mailmrge.cxx
@@ -51,7 +51,7 @@
#include <sfx2/docfile.hxx>
#include <sfx2/docfilt.hxx>
#include <comphelper/sequenceashashmap.hxx>
-#include <com/sun/star/ui/dialogs/XFolderPicker.hpp>
+#include <com/sun/star/ui/dialogs/FolderPicker.hpp>
#include <com/sun/star/frame/XDispatchProvider.hpp>
#include <com/sun/star/sdbcx/XColumnsSupplier.hpp>
#include <com/sun/star/sdbcx/XRowLocate.hpp>
@@ -782,15 +782,8 @@ IMPL_LINK_NOARG(SwMailMergeDlg, InsertPathHdl)
sPath = aPathOpt.GetWorkPath();
}
- uno::Reference< XMultiServiceFactory > xMgr( ::comphelper::getProcessServiceFactory() );
- uno::Reference < XFolderPicker > xFP;
- if( xMgr.is() )
- {
- xFP = uno::Reference< XFolderPicker >(
- xMgr->createInstance(
- C2U( "com.sun.star.ui.dialogs.FolderPicker" ) ),
- UNO_QUERY );
- }
+ uno::Reference< XComponentContext > xContext( ::comphelper::getProcessComponentContext() );
+ uno::Reference < XFolderPicker2 > xFP = FolderPicker::create(xContext);
xFP->setDisplayDirectory(sPath);
if( xFP->execute() == RET_OK )
{