summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndras Timar <andras.timar@collabora.com>2019-09-18 11:48:13 +0200
committerAndras Timar <andras.timar@collabora.com>2019-09-22 19:03:25 +0200
commit0976d3b966186422c1051c8513d4caaec8968826 (patch)
tree0a409c794748343105af199fb4376fa9fb0a2911
parent102f3e37a9439c6eba4f990576019eb7110fecdc (diff)
Replace remaining occurrences of LIBO_HEADLESS with HAVE_FEATURE_UI
Change-Id: Ie2b04ee443dece851d3d96afbc932aa64369c75c Reviewed-on: https://gerrit.libreoffice.org/79084 Tested-by: Jenkins Reviewed-by: Andras Timar <andras.timar@collabora.com>
-rw-r--r--desktop/inc/app.hxx4
-rw-r--r--desktop/source/app/app.cxx2
-rw-r--r--desktop/source/app/cmdlineargs.cxx8
-rw-r--r--desktop/source/app/sofficemain.cxx2
-rw-r--r--desktop/unx/source/splashx.c3
-rw-r--r--framework/source/fwe/helper/titlehelper.cxx4
-rw-r--r--include/vcl/opengl/OpenGLWrapper.hxx13
-rw-r--r--scp2/source/ooo/module_hidden_ooo.scp2
-rw-r--r--solenv/gbuild/gbuild.mk5
-rw-r--r--sw/qa/extras/odfimport/odfimport.cxx4
-rw-r--r--vcl/headless/svpinst.cxx22
-rw-r--r--vcl/inc/svsys.h4
-rw-r--r--vcl/source/salmain/salmain.cxx5
13 files changed, 42 insertions, 36 deletions
diff --git a/desktop/inc/app.hxx b/desktop/inc/app.hxx
index 01224c68ffeb..8a1ca8a36bb2 100644
--- a/desktop/inc/app.hxx
+++ b/desktop/inc/app.hxx
@@ -20,6 +20,8 @@
#ifndef INCLUDED_DESKTOP_INC_APP_HXX
#define INCLUDED_DESKTOP_INC_APP_HXX
+#include <config_features.h>
+
#include <boost/optional.hpp>
#include <com/sun/star/lang/XMultiServiceFactory.hpp>
#include <sal/log.hxx>
@@ -181,7 +183,7 @@ OUString ReplaceStringHookProc(const OUString& rStr);
}
-#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined LIBO_HEADLESS
+#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && HAVE_FEATURE_UI
bool fire_glxtest_process();
void reap_glxtest_process();
#endif
diff --git a/desktop/source/app/app.cxx b/desktop/source/app/app.cxx
index 0fd6ebe187ec..59d6a0db378f 100644
--- a/desktop/source/app/app.cxx
+++ b/desktop/source/app/app.cxx
@@ -1596,7 +1596,7 @@ int Desktop::Main()
// In headless mode, reap the process started by fire_glxtest_process() early in soffice_main
// (desktop/source/app/sofficemain.cxx), in a code block that needs to be covered by the same
// #if condition as this code block:
-#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS) && HAVE_FEATURE_OPENGL
+#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && HAVE_FEATURE_UI && HAVE_FEATURE_OPENGL
if (rCmdLineArgs.IsHeadless()) {
reap_glxtest_process();
}
diff --git a/desktop/source/app/cmdlineargs.cxx b/desktop/source/app/cmdlineargs.cxx
index 30d0c3f4cced..381147cd534e 100644
--- a/desktop/source/app/cmdlineargs.cxx
+++ b/desktop/source/app/cmdlineargs.cxx
@@ -695,12 +695,12 @@ void CommandLineArgs::InitParamValues()
{
m_minimized = false;
m_norestore = false;
-#ifdef LIBO_HEADLESS
- m_invisible = true;
- m_headless = true;
-#else
+#if HAVE_FEATURE_UI
m_invisible = false;
m_headless = false;
+#else
+ m_invisible = true;
+ m_headless = true;
#endif
m_eventtesting = false;
m_quickstart = false;
diff --git a/desktop/source/app/sofficemain.cxx b/desktop/source/app/sofficemain.cxx
index 372598abdb9d..d4a212ee0876 100644
--- a/desktop/source/app/sofficemain.cxx
+++ b/desktop/source/app/sofficemain.cxx
@@ -121,7 +121,7 @@ extern "C" int DESKTOP_DLLPUBLIC soffice_main()
#endif
#endif
-#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined(LIBO_HEADLESS) && HAVE_FEATURE_OPENGL
+#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && HAVE_FEATURE_UI && HAVE_FEATURE_OPENGL
/* Run test for OpenGL support in own process to avoid crash with broken
* OpenGL drivers. Start process as early as possible.
* In non-headless mode, the process will be reaped in X11OpenGLDeviceInfo::GetData
diff --git a/desktop/unx/source/splashx.c b/desktop/unx/source/splashx.c
index e03fc094abcb..ed88f8b16fd4 100644
--- a/desktop/unx/source/splashx.c
+++ b/desktop/unx/source/splashx.c
@@ -7,9 +7,10 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <config_features.h>
#include "splashx.h"
-#if defined(ENABLE_QUICKSTART_LIBPNG) && !defined(LIBO_HEADLESS)
+#if defined(ENABLE_QUICKSTART_LIBPNG) && HAVE_FEATURE_UI
#include <X11/Xlib.h>
#include <X11/Xatom.h>
diff --git a/framework/source/fwe/helper/titlehelper.cxx b/framework/source/fwe/helper/titlehelper.cxx
index 36141cfba0f1..cab7be43d50d 100644
--- a/framework/source/fwe/helper/titlehelper.cxx
+++ b/framework/source/fwe/helper/titlehelper.cxx
@@ -17,6 +17,8 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
+
#include <framework/titlehelper.hxx>
#include <classes/fwkresid.hxx>
#include <strings.hrc>
@@ -577,7 +579,7 @@ void TitleHelper::impl_appendDebugVersion (OUStringBuffer& sTitle)
OUString sVersion = ::utl::Bootstrap::getBuildIdData("development");
sTitle.append(" [");
sTitle.append(sVersion);
-#ifndef LIBO_HEADLESS
+#if HAVE_FEATURE_UI
if (OpenGLWrapper::isVCLOpenGLEnabled())
sTitle.append("-GL");
#endif
diff --git a/include/vcl/opengl/OpenGLWrapper.hxx b/include/vcl/opengl/OpenGLWrapper.hxx
index 9c61a11c2a48..c84286ea5244 100644
--- a/include/vcl/opengl/OpenGLWrapper.hxx
+++ b/include/vcl/opengl/OpenGLWrapper.hxx
@@ -12,6 +12,7 @@
#ifndef INCLUDED_VCL_OPENGL_OPENGLWRAPPER_HXX
#define INCLUDED_VCL_OPENGL_OPENGLWRAPPER_HXX
+#include <config_features.h>
#include <vcl/dllapi.h>
// All member functions static and VCL_DLLPUBLIC. Basically a glorified namespace.
@@ -22,18 +23,18 @@ struct VCL_DLLPUBLIC OpenGLWrapper
/**
* Returns true if VCL has OpenGL rendering enabled
*/
-#ifdef LIBO_HEADLESS
- static bool isVCLOpenGLEnabled()
- {
- return false;
- }
-#else
+#if HAVE_FEATURE_UI
static bool isVCLOpenGLEnabled();
/**
* Returns the number of times OpenGL buffers have been swapped.
*/
static sal_Int64 getBufferSwapCounter();
+#else
+ static bool isVCLOpenGLEnabled()
+ {
+ return false;
+ }
#endif
};
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index cff32e16930d..904cea2420bd 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -75,7 +75,6 @@ End
#endif
#endif
-#ifndef LIBO_HEADLESS
Module gid_Module_Root_Files_Images
PackageInfo = "packinfo_office.txt";
ParentID = gid_Module_Root;
@@ -87,7 +86,6 @@ Module gid_Module_Root_Files_Images
Styles = (HIDDEN_ROOT);
Files = (auto_ooo_images_ALL);
End
-#endif
#ifndef WITHOUT_FONTS
Module gid_Module_Root_Fonts_OOo_Hidden
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 0aee4f84776d..1a20050b651e 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -228,11 +228,6 @@ gb_GLOBALDEFS += -DDEBUG \
endif
endif
-ifeq ($(DISABLE_GUI),TRUE)
-gb_GLOBALDEFS += -DLIBO_HEADLESS \
-
-endif
-
gb_GLOBALDEFS += \
$(call gb_Helper_define_if_set,\
DISABLE_DYNLOADING \
diff --git a/sw/qa/extras/odfimport/odfimport.cxx b/sw/qa/extras/odfimport/odfimport.cxx
index 4df20d9e42a8..38185017ecda 100644
--- a/sw/qa/extras/odfimport/odfimport.cxx
+++ b/sw/qa/extras/odfimport/odfimport.cxx
@@ -7,6 +7,8 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#include <config_features.h>
+
#include <swmodeltestbase.hxx>
#include <com/sun/star/awt/FontWeight.hpp>
@@ -611,7 +613,7 @@ DECLARE_ODFIMPORT_TEST(testFdo37606Copy, "fdo37606.odt")
// Previously copy&paste failed to copy the table in case it was the document-starting one.
uno::Reference<text::XTextTablesSupplier> xTablesSupplier(mxComponent, uno::UNO_QUERY);
uno::Reference<container::XIndexAccess> xTables(xTablesSupplier->getTextTables(), uno::UNO_QUERY);
-#if !defined(MACOSX) && !defined(LIBO_HEADLESS) // FIXME
+#if !defined(MACOSX) && HAVE_FEATURE_UI
CPPUNIT_ASSERT_EQUAL(sal_Int32(2), xTables->getCount());
#endif
}
diff --git a/vcl/headless/svpinst.cxx b/vcl/headless/svpinst.cxx
index 22ec77ec8c7f..80223ac58904 100644
--- a/vcl/headless/svpinst.cxx
+++ b/vcl/headless/svpinst.cxx
@@ -17,6 +17,7 @@
* the License at http://www.apache.org/licenses/LICENSE-2.0 .
*/
+#include <config_features.h>
#include <unistd.h>
#include <errno.h>
#include <fcntl.h>
@@ -29,7 +30,7 @@
#include <vcl/inputtypes.hxx>
#include <vcl/lok.hxx>
-#ifndef LIBO_HEADLESS
+#if HAVE_FEATURE_UI
# include <vcl/opengl/OpenGLContext.hxx>
#endif
@@ -548,32 +549,33 @@ void SvpSalInstance::AddToRecentDocumentList(const OUString&, const OUString&, c
//obviously doesn't actually do anything, it's just a nonfunctional stub
-#ifdef LIBO_HEADLESS
+#if HAVE_FEATURE_UI
-class SvpOpenGLContext
+class SvpOpenGLContext : public OpenGLContext
{
+ GLWindow m_aGLWin;
+private:
+ virtual const GLWindow& getOpenGLWindow() const override { return m_aGLWin; }
+ virtual GLWindow& getModifiableOpenGLWindow() override { return m_aGLWin; }
};
OpenGLContext* SvpSalInstance::CreateOpenGLContext()
{
- return nullptr;
+ return new SvpOpenGLContext;
}
#else
-class SvpOpenGLContext : public OpenGLContext
+class SvpOpenGLContext
{
- GLWindow m_aGLWin;
-private:
- virtual const GLWindow& getOpenGLWindow() const override { return m_aGLWin; }
- virtual GLWindow& getModifiableOpenGLWindow() override { return m_aGLWin; }
};
OpenGLContext* SvpSalInstance::CreateOpenGLContext()
{
- return new SvpOpenGLContext;
+ return nullptr;
}
+
#endif
SvpSalTimer::~SvpSalTimer()
diff --git a/vcl/inc/svsys.h b/vcl/inc/svsys.h
index 8c283f221e11..d86985669e80 100644
--- a/vcl/inc/svsys.h
+++ b/vcl/inc/svsys.h
@@ -20,6 +20,8 @@
#ifndef INCLUDED_VCL_INC_SVSYS_H
#define INCLUDED_VCL_INC_SVSYS_H
+#include <config_features.h>
+
#ifdef _WIN32
#include "win/svsys.h"
#elif defined MACOSX
@@ -29,7 +31,7 @@
#elif defined ANDROID
#include "android/svsys.h"
#elif defined HAIKU
-#elif defined LIBO_HEADLESS
+#elif !HAVE_FEATURE_UI
#else
#include "unx/svsys.h"
#endif
diff --git a/vcl/source/salmain/salmain.cxx b/vcl/source/salmain/salmain.cxx
index b2b45a89e934..95f23eebde5f 100644
--- a/vcl/source/salmain/salmain.cxx
+++ b/vcl/source/salmain/salmain.cxx
@@ -18,6 +18,7 @@
*/
#include <sal/config.h>
+#include <config_features.h>
#include <cstdlib>
@@ -28,12 +29,12 @@
#include <salinst.hxx>
-#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined LIBO_HEADLESS && !defined HAIKU
+#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && HAVE_FEATURE_UI && !defined HAIKU
#include <opengl/x11/glxtest.hxx>
#endif
SAL_IMPLEMENT_MAIN() {
-#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && !defined LIBO_HEADLESS && !defined HAIKU
+#if defined( UNX ) && !defined MACOSX && !defined IOS && !defined ANDROID && HAVE_FEATURE_UI && !defined HAIKU
fire_glxtest_process();
#endif
tools::extendApplicationEnvironment();