From afd423f49c86a0360510433302b545cfc97f3cbc Mon Sep 17 00:00:00 2001
From: Tor Lillqvist <tml@collabora.com>
Date: Sat, 23 May 2015 10:56:30 +0100
Subject: [PATCH 004/398] Don't do any magic LO OS X application stuff in a
LOKit client
Change-Id: If6b6c3e48c7d0681958ff0e2afe0b0be5f6ee1ab
(cherry picked from commit 20c9ceb708e4720205a303bf2d41274b1311e36b)
---
vcl/osx/salinst.cxx | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 58a52d58accf..f57f8f4b45c5 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -23,6 +23,8 @@
#include <tools/solarmutex.hxx>
+#include "comphelper/lok.hxx"
+
#include "osl/process.h"
#include "rtl/ustrbuf.hxx"
@@ -182,6 +184,9 @@ static void initNSApp()
bool ImplSVMainHook( int * pnInit )
{
+ if (comphelper::LibreOfficeKit::isActive())
+ return false;
+
unlink([[NSString stringWithFormat:@"%@/Library/Saved Application State/%s.savedState/restorecount.plist", NSHomeDirectory(), MACOSX_BUNDLE_IDENTIFIER] UTF8String]);
unlink([[NSString stringWithFormat:@"%@/Library/Saved Application State/%s.savedState/restorecount.txt", NSHomeDirectory(), MACOSX_BUNDLE_IDENTIFIER] UTF8String]);
--
2.12.0