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 /svx | |
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 'svx')
-rw-r--r-- | svx/source/dialog/docrecovery.cxx | 6 | ||||
-rw-r--r-- | svx/source/inc/docrecovery.hxx | 1 |
2 files changed, 3 insertions, 4 deletions
diff --git a/svx/source/dialog/docrecovery.cxx b/svx/source/dialog/docrecovery.cxx index aa68971d2ea4..7abb0fb33d9b 100644 --- a/svx/source/dialog/docrecovery.cxx +++ b/svx/source/dialog/docrecovery.cxx @@ -55,7 +55,7 @@ #include <com/sun/star/util/XURLTransformer.hpp> #include <com/sun/star/frame/XDispatch.hpp> #include <com/sun/star/awt/XWindow.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/util/URLTransformer.hpp> #include <osl/file.hxx> @@ -1548,8 +1548,8 @@ IMPL_LINK_NOARG(BrokenRecoveryDialog, SaveButtonHdl) //=============================================== void BrokenRecoveryDialog::impl_askForSavePath() { - css::uno::Reference< css::ui::dialogs::XFolderPicker > xFolderPicker( - m_pCore->getSMGR()->createInstance(SERVICENAME_FOLDERPICKER), css::uno::UNO_QUERY_THROW); + css::uno::Reference< css::ui::dialogs::XFolderPicker2 > xFolderPicker = + css::ui::dialogs::FolderPicker::create(::comphelper::getComponentContext(m_pCore->getSMGR())); INetURLObject aURL(m_sSavePath, INET_PROT_FILE); xFolderPicker->setDisplayDirectory(aURL.GetMainURL(INetURLObject::NO_DECODE)); diff --git a/svx/source/inc/docrecovery.hxx b/svx/source/inc/docrecovery.hxx index 3fcd9ca8ab9e..e037ea4fecfc 100644 --- a/svx/source/inc/docrecovery.hxx +++ b/svx/source/inc/docrecovery.hxx @@ -61,7 +61,6 @@ #define SERVICENAME_PROGRESSFACTORY rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.task.StatusIndicatorFactory")) #define SERVICENAME_RECOVERYCORE rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.AutoRecovery" )) -#define SERVICENAME_FOLDERPICKER rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.ui.dialogs.FolderPicker" )) #define SERVICENAME_DESKTOP rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "com.sun.star.frame.Desktop" )) #define PROP_PARENTWINDOW rtl::OUString(RTL_CONSTASCII_USTRINGPARAM( "Window" )) |