Hello,
tml reminds us that use a generic and potentially clash-prone word
like HEADLESS as preprocessor defintion is pretty lame.
He suggests to put it under the already used LIBO namespace.
To sum it up let's do a s/HEADLESS/LIBO_HEADLESS/g.
This has been done manually fixing the occurencies of HEADLESS reported
by `git grep HEADLESS`.
Please review
--
Riccardo Magliocchetti
From a21986dca34b43df49f6c5e36543d991934028fb Mon Sep 17 00:00:00 2001
From: Riccardo Magliocchetti <riccardo.magliocchetti@gmail.com>
Date: Tue, 21 Feb 2012 11:29:42 +0100
Subject: [PATCH] Put HEADLESS definition under LIBO namespace
tml reminds us that use a generic and potentially clash-prone word
like HEADLESS as preprocessor defintion is pretty lame.
He suggests to put it under the already used LIBO namespace.
To sum it up let's do a s/HEADLESS/LIBO_HEADLESS/g.
---
configure.in | 2 +-
scp2/source/ooo/common_brand.scp | 2 +-
scp2/source/ooo/file_library_ooo.scp | 12 ++++++------
scp2/source/ooo/file_ooo.scp | 2 +-
scp2/source/ooo/file_resource_ooo.scp | 2 +-
scp2/source/ooo/module_hidden_ooo.scp | 2 +-
solenv/gbuild/gbuild.mk | 2 +-
vcl/inc/svsys.h | 2 +-
vcl/null/printerinfomanager.cxx | 2 +-
vcl/unx/generic/plugadapt/salplug.cxx | 4 ++--
vcl/unx/generic/printer/ppdparser.cxx | 2 +-
11 files changed, 17 insertions(+), 17 deletions(-)
diff --git a/configure.in b/configure.in
index 0d320e7..303b5c8 100644
--- a/configure.in
+++ b/configure.in
@@ -8106,7 +8106,7 @@ AC_SUBST(ENABLE_KDE4)
ENABLE_HEADLESS=""
if test "x$enable_headless" = "xyes"; then
ENABLE_HEADLESS="TRUE"
- SCPDEFS="$SCPDEFS -DHEADLESS"
+ SCPDEFS="$SCPDEFS -DLIBO_HEADLESS"
R="headless"
fi
AC_SUBST(ENABLE_HEADLESS)
diff --git a/scp2/source/ooo/common_brand.scp b/scp2/source/ooo/common_brand.scp
index 301d63d..789f826 100644
--- a/scp2/source/ooo/common_brand.scp
+++ b/scp2/source/ooo/common_brand.scp
@@ -522,7 +522,7 @@ File gid_Brand_File_Bin_Soffice
#endif
End
-#if defined(UNX) && !defined(QUARTZ) && !defined(HEADLESS)
+#if defined(UNX) && !defined(QUARTZ) && !defined(LIBO_HEADLESS)
File gid_Brand_File_Bin_Spadmin
BIN_FILE_BODY;
Dir = gid_Brand_Dir_Program;
diff --git a/scp2/source/ooo/file_library_ooo.scp b/scp2/source/ooo/file_library_ooo.scp
index 5bfe685..59aa150 100644
--- a/scp2/source/ooo/file_library_ooo.scp
+++ b/scp2/source/ooo/file_library_ooo.scp
@@ -548,7 +548,7 @@ SPECIAL_COMPONENT_LIB_FILE( gid_File_Lib_Fps_Office, fps_office.uno )
SPECIAL_COMPONENT_LIB_FILE( gid_File_Lib_Fpicker, fpicker.uno )
-#ifndef HEADLESS
+#ifndef LIBO_HEADLESS
#ifndef SYSTEM_CAIRO
@@ -934,7 +934,7 @@ STD_LIB_FILE(gid_File_Lib_DeploymentMisc, deploymentmisc)
STD_LIB_FILE( gid_File_Lib_Pl , pl)
#endif
-#if defined(UNX) && ! defined(QUARTZ) && ! defined(HEADLESS)
+#if defined(UNX) && ! defined(QUARTZ) && ! defined(LIBO_HEADLESS)
File gid_File_Lib_Desktop_Detector
Name = LIBNAME(desktop_detector);
LIB_FILE_BODY;
@@ -1160,7 +1160,7 @@ End
STD_LIB_FILE( gid_File_Lib_Sot, sot )
-#if defined(UNX) && !defined(QUARTZ) && !defined(HEADLESS)
+#if defined(UNX) && !defined(QUARTZ) && !defined(LIBO_HEADLESS)
File gid_File_Lib_Spa
Name = LIBNAME(spa);
@@ -1178,11 +1178,11 @@ File gid_File_Lib_Spell
Dir = SCP2_OOO_BIN_DIR;
End
-#if !defined HEADLESS
+#if !defined LIBO_HEADLESS
STD_LIB_FILE( gid_File_Lib_Spl, spl)
#endif
-#if defined UNX && !defined MACOSX && !defined HEADLESS
+#if defined UNX && !defined MACOSX && !defined LIBO_HEADLESS
STD_LIB_FILE( gid_File_Lib_Spl_Unx, spl_unx)
#endif
@@ -1703,7 +1703,7 @@ File gid_File_Lib_Libcroco
End
#endif
-#if ! defined HEADLESS
+#if ! defined LIBO_HEADLESS
#if ! defined SYSTEM_PANGO
File gid_File_Lib_Libpango
LIB_FILE_BODY;
diff --git a/scp2/source/ooo/file_ooo.scp b/scp2/source/ooo/file_ooo.scp
index c181a0f..3fd19c5 100644
--- a/scp2/source/ooo/file_ooo.scp
+++ b/scp2/source/ooo/file_ooo.scp
@@ -223,7 +223,7 @@ File gid_File_Bin_Senddoc
#endif
End
-#if defined(UNX) && !defined(QUARTZ) && !defined(HEADLESS)
+#if defined(UNX) && !defined(QUARTZ) && !defined(LIBO_HEADLESS)
File gid_File_Bin_Spadmin_Bin
BIN_FILE_BODY;
diff --git a/scp2/source/ooo/file_resource_ooo.scp b/scp2/source/ooo/file_resource_ooo.scp
index 05353f1..2f26dd7 100644
--- a/scp2/source/ooo/file_resource_ooo.scp
+++ b/scp2/source/ooo/file_resource_ooo.scp
@@ -76,7 +76,7 @@ STD_RES_FILE( gid_File_Res_Sd, sd )
STD_RES_FILE( gid_File_Res_Sfx, sfx )
-#if defined(UNX) && !defined(QUARTZ) && !defined(HEADLESS)
+#if defined(UNX) && !defined(QUARTZ) && !defined(LIBO_HEADLESS)
STD_RES_FILE( gid_File_Res_Spa, spa )
diff --git a/scp2/source/ooo/module_hidden_ooo.scp b/scp2/source/ooo/module_hidden_ooo.scp
index 90ec4ea..56365232 100644
--- a/scp2/source/ooo/module_hidden_ooo.scp
+++ b/scp2/source/ooo/module_hidden_ooo.scp
@@ -689,7 +689,7 @@ Module gid_Module_Root_Files_7
gid_File_Mozilla_Runtime);
End
-#ifndef HEADLESS
+#ifndef LIBO_HEADLESS
Module gid_Module_Root_Files_Images
PackageInfo = "packinfo_office.txt";
ParentID = gid_Module_Root;
diff --git a/solenv/gbuild/gbuild.mk b/solenv/gbuild/gbuild.mk
index 26eecbc..005d81b 100644
--- a/solenv/gbuild/gbuild.mk
+++ b/solenv/gbuild/gbuild.mk
@@ -238,7 +238,7 @@ gb_GLOBALDEFS += -DENABLE_GRAPHITE
endif
ifeq ($(strip $(ENABLE_HEADLESS)),TRUE)
-gb_GLOBALDEFS += -DHEADLESS
+gb_GLOBALDEFS += -DLIBO_HEADLESS
endif
ifeq ($(HAVE_THREADSAFE_STATICS),TRUE)
diff --git a/vcl/inc/svsys.h b/vcl/inc/svsys.h
index 0fbb9ce..d6d7c8b 100644
--- a/vcl/inc/svsys.h
+++ b/vcl/inc/svsys.h
@@ -39,7 +39,7 @@
#include "ios/svsys.h"
#elif defined ANDROID
#include "android/svsys.h"
-#elif defined HEADLESS
+#elif defined LIBO_HEADLESS
#else
#include "unx/svsys.h"
#endif
diff --git a/vcl/null/printerinfomanager.cxx b/vcl/null/printerinfomanager.cxx
index e5adda7..526a936 100644
--- a/vcl/null/printerinfomanager.cxx
+++ b/vcl/null/printerinfomanager.cxx
@@ -60,7 +60,7 @@ PrinterInfoManager::PrinterInfoManager( Type eType ) :
m_bUseIncludeFeature( false ),
m_bUseJobPatch( true ),
m_aSystemDefaultPaper( RTL_CONSTASCII_USTRINGPARAM( "A4" ) ),
-#ifdef HEADLESS
+#ifdef LIBO_HEADLESS
m_bDisableCUPS( true )
#else
m_bDisableCUPS( false )
diff --git a/vcl/unx/generic/plugadapt/salplug.cxx b/vcl/unx/generic/plugadapt/salplug.cxx
index 6b5279a..1ce60de 100644
--- a/vcl/unx/generic/plugadapt/salplug.cxx
+++ b/vcl/unx/generic/plugadapt/salplug.cxx
@@ -53,7 +53,7 @@ static oslModule pCloseModule = NULL;
static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = false )
{
SalInstance* pInst = NULL;
-#if !defined(ANDROID) || !defined(HEADLESS)
+#if !defined(ANDROID) || !defined(LIBO_HEADLESS)
// Disable gtk3 plugin load except in experimental mode for now.
if( !bForce &&
rModuleBase.equalsAsciiL( RTL_CONSTASCII_STRINGPARAM( "gtk3" ) ) &&
@@ -129,7 +129,7 @@ static SalInstance* tryInstance( const OUString& rModuleBase, bool bForce = fals
return pInst;
}
-#if !defined(ANDROID) || !defined(HEADLESS)
+#if !defined(ANDROID) || !defined(LIBO_HEADLESS)
static DesktopType get_desktop_environment()
{
diff --git a/vcl/unx/generic/printer/ppdparser.cxx b/vcl/unx/generic/printer/ppdparser.cxx
index 0885836..ab428d3 100644
--- a/vcl/unx/generic/printer/ppdparser.cxx
+++ b/vcl/unx/generic/printer/ppdparser.cxx
@@ -655,7 +655,7 @@ const PPDParser* PPDParser::getParser( const String& rFile )
PrinterInfoManager& rMgr = PrinterInfoManager::get();
if( rMgr.getType() == PrinterInfoManager::CUPS )
{
-#if !defined(ANDROID) && !defined(HEADLESS)
+#if !defined(ANDROID) && !defined(LIBO_HEADLESS)
pNewParser = const_cast<PPDParser*>(static_cast<CUPSManager&>(rMgr).createCUPSParser(
aFile ));
#endif
}
--
1.7.5.4
Context
Privacy Policy |
Impressum (Legal Info) |
Copyright information: Unless otherwise specified, all text and images
on this website are licensed under the
Creative Commons Attribution-Share Alike 3.0 License.
This does not include the source code of LibreOffice, which is
licensed under the Mozilla Public License (
MPLv2).
"LibreOffice" and "The Document Foundation" are
registered trademarks of their corresponding registered owners or are
in actual use as trademarks in one or more countries. Their respective
logos and icons are also subject to international copyright laws. Use
thereof is explained in our
trademark policy.