Kaydet (Commit) 3015b3b6 authored tarafından Pranav Kant's avatar Pranav Kant Kaydeden (comit) Jan Holesovsky

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 9711a8a3)
Reviewed-on: https://gerrit.libreoffice.org/48562Reviewed-by: 's avatarJan Holesovsky <kendy@collabora.com>
Tested-by: 's avatarJan Holesovsky <kendy@collabora.com>
üst cc9ca93c
...@@ -68,6 +68,7 @@ ...@@ -68,6 +68,7 @@
#include <com/sun/star/beans/XPropertySet.hpp> #include <com/sun/star/beans/XPropertySet.hpp>
#include <comphelper/interaction.hxx> #include <comphelper/interaction.hxx>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx> #include <comphelper/processfactory.hxx>
#include <comphelper/string.hxx> #include <comphelper/string.hxx>
...@@ -1692,7 +1693,8 @@ short SvtFileDialog::Execute() ...@@ -1692,7 +1693,8 @@ short SvtFileDialog::Execute()
void SvtFileDialog::StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl ) void SvtFileDialog::StartExecuteModal( const Link<Dialog&,void>& rEndDialogHdl )
{ {
PrepareExecute(); if (!PrepareExecute())
return;
// start of the dialog // start of the dialog
ModalDialog::StartExecuteModal( rEndDialogHdl ); ModalDialog::StartExecuteModal( rEndDialogHdl );
...@@ -1807,6 +1809,9 @@ void SvtFileDialog::EnableControl( Control* _pControl, bool _bEnable ) ...@@ -1807,6 +1809,9 @@ void SvtFileDialog::EnableControl( Control* _pControl, bool _bEnable )
short SvtFileDialog::PrepareExecute() short SvtFileDialog::PrepareExecute()
{ {
if (comphelper::LibreOfficeKit::isActive())
return 0;
OUString aEnvValue; OUString aEnvValue;
if ( getEnvironmentValue( "WorkDirMustContainRemovableMedia", aEnvValue ) && aEnvValue == "1" ) if ( getEnvironmentValue( "WorkDirMustContainRemovableMedia", aEnvValue ) && aEnvValue == "1" )
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment