From 3015b3b62edb098e65501b0516135d92e2f6410b Mon Sep 17 00:00:00 2001 From: Pranav Kant Date: Thu, 25 Jan 2018 15:52:52 +0530 Subject: 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 Tested-by: Jan Holesovsky --- fpicker/source/office/iodlg.cxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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 #include +#include #include #include @@ -1692,7 +1693,8 @@ short SvtFileDialog::Execute() void SvtFileDialog::StartExecuteModal( const Link& 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" ) { -- cgit v1.2.3