Blob Blame History Raw
From 03ea9bee49bbd6961677ab020695f8d2f7af9d4e Mon Sep 17 00:00:00 2001
From: Jan Holesovsky <kendy@collabora.com>
Date: Wed, 21 Oct 2015 09:21:34 +0200
Subject: [PATCH 222/398] lok: Avoid adding to recent documents completely.

(cherry picked from commit dcdba6ed8984fd135a346a921b3a7888ecef9cb0)

Change-Id: I292281e300e8976bf5ae286262a6a3e20de41858
---
 sfx2/source/appl/sfxpicklist.cxx | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)

diff --git a/sfx2/source/appl/sfxpicklist.cxx b/sfx2/source/appl/sfxpicklist.cxx
index 0f3196df45cc..24754ca01b74 100644
--- a/sfx2/source/appl/sfxpicklist.cxx
+++ b/sfx2/source/appl/sfxpicklist.cxx
@@ -19,6 +19,7 @@
 
 #include <config_features.h>
 
+#include <comphelper/lok.hxx>
 #include <com/sun/star/document/XDocumentProperties.hpp>
 #include <unotools/historyoptions.hxx>
 #include <unotools/useroptions.hxx>
@@ -161,6 +162,9 @@ SfxPickList::PickListEntry* SfxPickList::GetPickListEntry( sal_uInt32 nIndex )
 
 void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
 {
+    if (comphelper::LibreOfficeKit::isActive())
+        return;
+
     SfxMedium *pMed = pDocSh->GetMedium();
     if( !pMed )
         return;
@@ -193,10 +197,9 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
     if ( pFilter )
         aFilter = pFilter->GetFilterName();
 
-    // generate a thumbnail
     boost::optional<OUString> aThumbnail;
-    // don't generate thumbnail when in headless mode, or on non-desktop (?)
-#if HAVE_FEATURE_DESKTOP
+
+    // generate the thumbnail
     if (!pDocSh->IsModified() && !Application::IsHeadlessModeEnabled())
     {
         // not modified => the document matches what is in the shell
@@ -224,7 +227,7 @@ void SfxPickList::AddDocumentToPickList( SfxObjectShell* pDocSh )
             }
         }
     }
-#endif
+
     // add to svtool history options
     SvtHistoryOptions().AppendItem( ePICKLIST,
             aURL.GetURLNoPass( INetURLObject::NO_DECODE ),
-- 
2.12.0