diff options
author | Pranav Kant <pranavk@collabora.co.uk> | 2018-01-25 15:52:52 +0530 |
---|---|---|
committer | Jan Holesovsky <kendy@collabora.com> | 2018-01-25 17:13:30 +0100 |
commit | 3015b3b62edb098e65501b0516135d92e2f6410b (patch) | |
tree | f6d7f9f2b899abe580dcc5706d8ea6010d7b6855 | |
parent | cc9ca93c52e40557ed918868e235d393f9ecde6e (diff) |
lokdialog: Disable filepicker for LOK
We don't want people to browser their jails in the filepicker dialog.
Change-Id: I2fdd3d948cc1f193098492d1a310424ac2d49317
(cherry picked from commit 9711a8a35796d0d4ab4b69204bd4484686bf0707)
Reviewed-on: https://gerrit.libreoffice.org/48562
Reviewed-by: Jan Holesovsky <kendy@collabora.com>
Tested-by: Jan Holesovsky <kendy@collabora.com>
-rw-r--r-- | fpicker/source/office/iodlg.cxx | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/fpicker/source/office/iodlg.cxx b/fpicker/source/office/iodlg.cxx index 1aefa0b81acc..9e4851e6a5fb 100644 --- a/fpicker/source/office/iodlg.cxx +++ b/fpicker/source/office/iodlg.cxx @@ -68,6 +68,7 @@ #include <com/sun/star/beans/XPropertySet.hpp> #include <comphelper/interaction.hxx> +#include <comphelper/lok.hxx> #include <comphelper/processfactory.hxx> #include <comphelper/string.hxx> @@ -1692,7 +1693,8 @@ short SvtFileDialog::Execute() void SvtFileDialog::StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) { - PrepareExecute(); + if (!PrepareExecute()) + return; // start of the dialog ModalDialog::StartExecuteModal( rEndDialogHdl ); @@ -1807,6 +1809,9 @@ void SvtFileDialog::EnableControl( Control* _pControl, bool _bEnable ) short SvtFileDialog::PrepareExecute() { + if (comphelper::LibreOfficeKit::isActive()) + return 0; + OUString aEnvValue; if ( getEnvironmentValue( "WorkDirMustContainRemovableMedia", aEnvValue ) && aEnvValue == "1" ) { |