[Libreoffice-commits] core.git: Branch 'distro/collabora/cp-5.3' - fpicker/source

Pranav Kant pranavk at collabora.co.uk
Thu Jan 25 16:13:51 UTC 2018


 fpicker/source/office/iodlg.cxx |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 3015b3b62edb098e65501b0516135d92e2f6410b
Author: Pranav Kant <pranavk at collabora.co.uk>
Date:   Thu Jan 25 15:52:52 2018 +0530

    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 at collabora.com>
    Tested-by: Jan Holesovsky <kendy at collabora.com>

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" )
     {


More information about the Libreoffice-commits mailing list