move HAVE_FEATURE_DESKTOP/OPENCL to their dedicated headers

HAVE_FEATURE_OPENCL is included by a common Calc header
and HAVE_FEATURE_DESKTOP is included by a common Writer header,
causing pretty much their full rebuilds if any feature changes.

Change-Id: If29bf78bd4fd70b37981e0826a577777fd255c89
Reviewed-on: https://gerrit.libreoffice.org/80776
Tested-by: Jenkins
Reviewed-by: Tor Lillqvist <tml@collabora.com>
This commit is contained in:
Luboš Luňák 2019-10-14 15:43:34 +02:00 committed by Tor Lillqvist
parent 46d630f98f
commit 4704acf63f
37 changed files with 82 additions and 49 deletions

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <toolkit/awt/vclxwindows.hxx>
#include <toolkit/helper/accessiblefactory.hxx>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <ChartView.hxx>
#include <chartview/DrawModelWrapper.hxx>

View File

@ -0,0 +1,28 @@
/* A feature split out from config_features.h because it affects many files.
*/
#ifndef CONFIG_FEATURE_DESKTOP_H
#define CONFIG_FEATURE_DESKTOP_H
/* DESKTOP - Whether we have a "normal" desktop UI or not.
*
* Non-DESKTOP in practice means touch-based mobile devices, Android
* or iOS for now. Support for those is work in progress.
*
* Non-DESKTOP implies that the OS makes sure that only one instance
* of each LibreOffice-based "app" at a time can be running, and thus
* the LibreOffice code does not need to handle such things itself.
*
* Non-DESKTOP implies no traditional inter-app drag and drop concept.
*
* Non-DESKTOP implies no traditional help mechanism, and to some
* extent (as noticed, and as possible without making the code too
* ugly) the related code is ifdeffed out.
*
* Non-DESKTOP implies no traditional desktop-style GUI elements like
* toolbars and scrollbars presented by the LO code.
*/
#define HAVE_FEATURE_DESKTOP 0
#endif

View File

@ -0,0 +1,13 @@
/* A feature split out from config_features.h because it affects many files.
*/
#ifndef CONFIG_FEATURE_OPENCL_H
#define CONFIG_FEATURE_OPENCL_H
/*
* Whether OpenCL is usable on the platform and we should compile in use of OpenCL.
*/
#define HAVE_FEATURE_OPENCL 0
#endif

View File

@ -7,27 +7,6 @@
#ifndef CONFIG_FEATURES_H
#define CONFIG_FEATURES_H
/* DESKTOP - Whether we have a "normal" desktop UI or not.
*
* Non-DESKTOP in practice means touch-based mobile devices, Android
* or iOS for now. Support for those is work in progress.
*
* Non-DESKTOP implies that the OS makes sure that only one instance
* of each LibreOffice-based "app" at a time can be running, and thus
* the LibreOffice code does not need to handle such things itself.
*
* Non-DESKTOP implies no traditional inter-app drag and drop concept.
*
* Non-DESKTOP implies no traditional help mechanism, and to some
* extent (as noticed, and as possible without making the code too
* ugly) the related code is ifdeffed out.
*
* Non-DESKTOP implies no traditional desktop-style GUI elements like
* toolbars and scrollbars presented by the LO code.
*/
#define HAVE_FEATURE_DESKTOP 0
/* X11
*
* Whether we are building code to run in an X11 environment.
@ -72,12 +51,6 @@
#define HAVE_FEATURE_MULTIUSER_ENVIRONMENT 0
/*
* Whether OpenCL is usable on the platform and we should compile in use of OpenCL.
*/
#define HAVE_FEATURE_OPENCL 0
/*
* Whether the OS has Avahi support,
* This library is used for zeroconf service publication on the local network

View File

@ -12862,6 +12862,8 @@ AC_CONFIG_HEADERS([config_host/config_cairo_canvas.h])
AC_CONFIG_HEADERS([config_host/config_cxxabi.h])
AC_CONFIG_HEADERS([config_host/config_dbus.h])
AC_CONFIG_HEADERS([config_host/config_features.h])
AC_CONFIG_HEADERS([config_host/config_feature_desktop.h])
AC_CONFIG_HEADERS([config_host/config_feature_opencl.h])
AC_CONFIG_HEADERS([config_host/config_firebird.h])
AC_CONFIG_HEADERS([config_host/config_folders.h])
AC_CONFIG_HEADERS([config_host/config_fuzzers.h])

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_opencl.h>
#include <osl/process.h>
#include <sal/log.hxx>
#include <osl/diagnose.h>

View File

@ -19,6 +19,8 @@
#include <memory>
#include <config_features.h>
#include <config_feature_opencl.h>
#include <config_feature_desktop.h>
#include <config_gpgme.h>
#include <svx/dialogs.hrc>

View File

@ -19,6 +19,8 @@
#include <memory>
#include <config_features.h>
#include <config_feature_desktop.h>
#include <config_feature_opencl.h>
#include <config_java.h>
#include <config_folders.h>
#include <config_extensions.h>

View File

@ -21,6 +21,7 @@
#include <config_dbus.h>
#include <config_features.h>
#include <config_feature_desktop.h>
#include <app.hxx>
#include "officeipcthread.hxx"

View File

@ -15,7 +15,7 @@
#include <app.hxx>
#include <config_version.h>
#include <config_features.h>
#include <config_feature_opencl.h>
#include <config_folders.h>
#include <rtl/bootstrap.hxx>

View File

@ -18,7 +18,7 @@
*/
#include <memory>
#include <config_features.h>
#include <config_feature_desktop.h>
#include <strings.hrc>
#include <dp_backend.h>

View File

@ -18,7 +18,7 @@
*/
#include <memory>
#include <config_features.h>
#include <config_feature_desktop.h>
#include <services/layoutmanager.hxx>
#include "helpers.hxx"

View File

@ -10,7 +10,7 @@
#ifndef INCLUDED_SC_INC_FORMULAGROUP_HXX
#define INCLUDED_SC_INC_FORMULAGROUP_HXX
#include <config_features.h>
#include <config_feature_opencl.h>
#include "address.hxx"
#include "calcconfig.hxx"

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_opencl.h>
#include <sal/config.h>
#include <sal/log.hxx>

View File

@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <config_features.h>
#include <config_feature_opencl.h>
#include <formulagroup.hxx>
#include <formulagroupcl.hxx>

View File

@ -19,6 +19,7 @@
#include <docsh.hxx>
#include <config_features.h>
#include <scitems.hxx>
#include <sc.hrc>
#include <vcl/errinf.hxx>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_opencl.h>
#include <boost/property_tree/json_parser.hpp>

View File

@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <memory>
#include <editeng/eeitem.hxx>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <sal/log.hxx>
#include <osl/module.hxx>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <comphelper/lok.hxx>
#include <comphelper/processfactory.hxx>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <algorithm>
#include <deque>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <osl/file.hxx>
#include <sfx2/docfilt.hxx>
#include <sfx2/infobar.hxx>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <svx/sdr/contact/objectcontactofpageview.hxx>
#include <sdr/contact/viewobjectcontactofunocontrol.hxx>

View File

@ -22,7 +22,7 @@
#include <map>
#include <vector>
#include <config_features.h>
#include <config_feature_desktop.h>
#include <svx/strings.hrc>
#include <svx/dialmgr.hxx>

View File

@ -18,6 +18,7 @@
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <com/sun/star/document/EventObject.hpp>
#include <com/sun/star/embed/XEmbeddedObject.hpp>

View File

@ -20,7 +20,7 @@
#ifndef INCLUDED_SW_INC_VIEWOPT_HXX
#define INCLUDED_SW_INC_VIEWOPT_HXX
#include <config_features.h>
#include <config_feature_desktop.h>
#include <tools/gen.hxx>
#include <tools/color.hxx>

View File

@ -19,7 +19,7 @@
#ifndef INCLUDED_SW_INC_VISCRS_HXX
#define INCLUDED_SW_INC_VISCRS_HXX
#include <config_features.h>
#include <config_feature_desktop.h>
#include <vcl/cursor.hxx>
#include "swcrsr.hxx"

View File

@ -9,6 +9,8 @@
#include <swmodeltestbase.hxx>
#include <config_features.h>
#include <com/sun/star/awt/FontWeight.hpp>
#include <com/sun/star/drawing/FillStyle.hpp>
#include <com/sun/star/drawing/BitmapMode.hpp>

View File

@ -9,6 +9,8 @@
#include <swmodeltestbase.hxx>
#include <config_features.h>
#include <com/sun/star/awt/Size.hpp>
#include <com/sun/star/beans/XPropertySet.hpp>
#include <com/sun/star/text/XFootnote.hpp>

View File

@ -10,6 +10,8 @@
#include <memory>
#include <swmodeltestbase.hxx>
#include <config_features.h>
#include <com/sun/star/awt/FontDescriptor.hpp>
#include <com/sun/star/awt/FontUnderline.hpp>
#include <com/sun/star/drawing/EnhancedCustomShapeParameterPair.hpp>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <sal/config.h>

View File

@ -76,6 +76,7 @@
#include <displayconnectiondispatch.hxx>
#include <config_features.h>
#include <config_feature_opencl.h>
#include <osl/process.h>
#include <com/sun/star/lang/XComponent.hpp>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <vcl/svtaccessiblefactory.hxx>
#include <vcl/accessiblefactory.hxx>

View File

@ -7,7 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#include <memory>
#include <unordered_map>

View File

@ -17,7 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
#include <config_features.h>
#include <config_feature_desktop.h>
#ifdef IOS
#include <premac.h>

View File

@ -19,6 +19,7 @@
#include <config_features.h>
#include <config_feature_desktop.h>
#include <tools/time.hxx>