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 /sfx2/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 'sfx2/source')
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/sfx2/source/doc/templatedlg.cxx b/sfx2/source/doc/templatedlg.cxx index ca5e0b31cd69..01a9a8a47508 100644 --- a/sfx2/source/doc/templatedlg.cxx +++ b/sfx2/source/doc/templatedlg.cxx @@ -46,7 +46,7 @@ #include <com/sun/star/lang/XMultiServiceFactory.hpp> #include <com/sun/star/ui/dialogs/ExecutableDialogResults.hpp> #include <com/sun/star/ui/dialogs/TemplateDescription.hpp> -#include <com/sun/star/ui/dialogs/XFolderPicker.hpp> +#include <com/sun/star/ui/dialogs/FolderPicker.hpp> #include "doc.hrc" #include "templatedlg.hrc" @@ -62,6 +62,7 @@ using namespace ::com::sun::star::beans; using namespace ::com::sun::star::embed; using namespace ::com::sun::star::frame; using namespace ::com::sun::star::lang; +using namespace ::com::sun::star::uno; using namespace ::com::sun::star::ui::dialogs; static bool lcl_getServiceName (const OUString &rFileURL, OUString &rName ); @@ -838,8 +839,8 @@ void SfxTemplateManagerDlg::OnTemplateImport () void SfxTemplateManagerDlg::OnTemplateExport() { - uno::Reference<XMultiServiceFactory> xFactory(comphelper::getProcessServiceFactory()); - uno::Reference<XFolderPicker> xFolderPicker(xFactory->createInstance(FOLDER_PICKER_SERVICE_NAME),uno::UNO_QUERY); + uno::Reference<XComponentContext> xContext(comphelper::getProcessComponentContext()); + uno::Reference<XFolderPicker2> xFolderPicker = FolderPicker::create(xContext); xFolderPicker->setDisplayDirectory(SvtPathOptions().GetWorkPath()); |