From 8955af9b2b3d29118d314c77092c5c4c0f8e456c Mon Sep 17 00:00:00 2001 From: Tor Lillqvist Date: Sun, 29 Mar 2015 22:59:22 +0300 Subject: Add API to check whether being used through LibreOfficeKit LibreOffice code, when used in a program through LibreOfficeKit, needs to be aware of that in certain crucial spots, to avoid behaviour and functionality that makes no sense in a LibreOfficeKit scenario. As LibreOfficeKit uses a normal LibreOffice installation to perform its job, this can't be a compile-time choice. Also, none of the existing run-time "headlessness" modes fully match what is needed. Change-Id: Iaccf7f958c549f019b508854800519f54dcadb11 --- include/osl/lok.hxx | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 include/osl/lok.hxx (limited to 'include/osl') diff --git a/include/osl/lok.hxx b/include/osl/lok.hxx new file mode 100644 index 000000000000..3b241ef49748 --- /dev/null +++ b/include/osl/lok.hxx @@ -0,0 +1,34 @@ +/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef INCLUDED_OSL_LOK_HXX +#define INCLUDED_OSL_LOK_HXX + +#ifdef LIBO_INTERNAL_ONLY + +#include + +namespace osl +{ + +namespace LibreOfficeKit +{ + +SAL_DLLPUBLIC void setActive(); + +SAL_DLLPUBLIC bool isActive(); + +} +} + +#endif // LIBO_INTERNAL_ONLY + +#endif // INCLUDED_OSL_LOK_HXX + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ -- cgit