diff options
Diffstat (limited to 'sfx2')
-rw-r--r-- | sfx2/inc/sfx2/filedlghelper.hxx | 1 | ||||
-rw-r--r-- | sfx2/source/doc/templatedlg.cxx | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/sfx2/inc/sfx2/filedlghelper.hxx b/sfx2/inc/sfx2/filedlghelper.hxx index 98c55b192f08..738f8e1e1338 100644 --- a/sfx2/inc/sfx2/filedlghelper.hxx +++ b/sfx2/inc/sfx2/filedlghelper.hxx @@ -70,7 +70,6 @@ class Window; #define FILEDIALOG_FILTER_ALL "*.*" #define FILE_OPEN_SERVICE_NAME "com.sun.star.ui.dialogs.FilePicker" -#define FOLDER_PICKER_SERVICE_NAME "com.sun.star.ui.dialogs.FolderPicker" #define FILE_OPEN_SERVICE_NAME_OOO "com.sun.star.ui.dialogs.OfficeFilePicker" namespace sfx2 { 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()); |