Kaydet (Commit) 52f8321c authored tarafından Luboš Luňák's avatar Luboš Luňák

use #if instead of #ifdef for testing config_xxx.hxx macros

http://lists.freedesktop.org/archives/libreoffice/2013-March/047769.html

Change-Id: I81ed4500878ff3193e028410a1f0205e28d17fc3
üst 151abb8b
......@@ -13,11 +13,38 @@ Any change in this header will cause a rebuild of almost everything.
#define CONFIG_GLOBAL_H
#undef HAVE_CXX11_DELETE
#ifndef HAVE_CXX11_DELETE
#define HAVE_CXX11_DELETE 0
#endif
#undef HAVE_CXX11_OVERRIDE
#ifndef HAVE_CXX11_OVERRIDE
#define HAVE_CXX11_OVERRIDE 0
#endif
#undef HAVE_CXX11_PERFECT_FORWARDING
#ifndef HAVE_CXX11_PERFECT_FORWARDING
#define HAVE_CXX11_PERFECT_FORWARDING 0
#endif
#undef HAVE_GCC_BUILTIN_ATOMIC
#ifndef HAVE_GCC_BUILTIN_ATOMIC
#define HAVE_GCC_BUILTIN_ATOMIC 0
#endif
#undef HAVE_SFINAE_ANONYMOUS_BROKEN
#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
#define HAVE_SFINAE_ANONYMOUS_BROKEN 0
#endif
#undef HAVE_THREADSAFE_STATICS
#ifndef HAVE_THREADSAFE_STATICS
#define HAVE_THREADSAFE_STATICS 0
#endif
#undef HAVE_SYSLOG_H
#ifndef HAVE_SYSLOG_H
#define HAVE_SYSLOG_H 0
#endif
#endif
......@@ -2,5 +2,8 @@
#define CONFIG_GRAPHITE_H
#undef ENABLE_GRAPHITE
#ifndef ENABLE_GRAPHITE
#define ENABLE_GRAPHITE 0
#endif
#endif
......@@ -2,5 +2,8 @@
#define CONFIG_MINGW
#undef HAVE_FMERGENEUTRALITEMS
#ifndef HAVE_FMERGENEUTRALITEMS
#define HAVE_FMERGENEUTRALITEMS 0
#endif
#endif
......@@ -2,5 +2,8 @@
#define CONFIG_TELEPATHY
#undef ENABLE_TELEPATHY
#ifndef ENABLE_TELEPATHY
#define ENABLE_TELEPATHY 0
#endif
#endif
......@@ -8,8 +8,23 @@ Settings about which X11 desktops have support enabled.
#define CONFIG_VCLPLUG_H
#undef ENABLE_GTK
#ifndef ENABLE_GTK
#define ENABLE_GTK 0
#endif
#undef ENABLE_KDE
#ifndef ENABLE_KDE
#define ENABLE_KDE 0
#endif
#undef ENABLE_KDE4
#ifndef ENABLE_KDE4
#define ENABLE_KDE4 0
#endif
#undef ENABLE_TDE
#ifndef ENABLE_TDE
#define ENABLE_TDE 0
#endif
#endif
......@@ -27,7 +27,7 @@
#include <config_vclplug.h>
#ifdef ENABLE_TDE
#if ENABLE_TDE
// the minimum TDE version which is required at runtime
#define MIN_KDE_VERSION_MAJOR 14
......
......@@ -117,7 +117,7 @@ namespace
if ( rDesktopEnvironment.equalsIgnoreAsciiCase("kde4") )
{
#ifdef ENABLE_KDE4
#if ENABLE_KDE4
return OUString("com.sun.star.ui.dialogs.KDE4FilePicker" );
#else
return OUString();
......@@ -125,7 +125,7 @@ namespace
}
else if ( rDesktopEnvironment.equalsIgnoreAsciiCase("kde") )
{
#ifdef ENABLE_KDE
#if ENABLE_KDE
return OUString("com.sun.star.ui.dialogs.KDEFilePicker");
#else
return OUString();
......@@ -133,7 +133,7 @@ namespace
}
else if ( rDesktopEnvironment.equalsIgnoreAsciiCase("tde") )
{
#ifdef ENABLE_TDE
#if ENABLE_TDE
return OUString("com.sun.star.ui.dialogs.TDEFilePicker");
#else
return OUString();
......@@ -191,7 +191,7 @@ OfaMiscTabPage::OfaMiscTabPage(Window* pParent, const SfxItemSet& rSet)
get(m_pHelpAgentResetBtn, "resethelpagent");
if (!lcl_HasSystemFilePicker())
get<VclContainer>("filedlgframe")->Hide();
#if !defined(MACOSX) && !defined(ENABLE_GTK)
#if !defined(MACOSX) && ! ENABLE_GTK
get<VclContainer>("printdlgframe")->Hide();
#endif
get(m_pFileDlgCB, "filedlg");
......
......@@ -129,7 +129,7 @@ OfaMemoryOptionsPage::OfaMemoryOptionsPage(Window* pParent, const SfxItemSet& rS
m_pQuickLaunchCB->Show();
//Only available in Win or if building the gtk systray
#if !defined(WNT) && !defined(ENABLE_GTK)
#if !defined(WNT) && ! ENABLE_GTK
m_pQuickStarterFrame->Hide();
#endif
......
......@@ -103,7 +103,7 @@
#include <config_telepathy.h>
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
#include <tubes/manager.hxx>
#endif
......@@ -555,7 +555,7 @@ Desktop::Desktop()
Desktop::~Desktop()
{
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
TeleManager::finalize();
#endif
}
......@@ -1619,7 +1619,7 @@ int Desktop::Main()
aOptions.SetVCLSettings();
SetSplashScreenProgress(60);
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
bool bListen = rCmdLineArgs.IsInvisible();
TeleManager::init( bListen );
#endif
......
......@@ -94,7 +94,7 @@ extern "C" {
#include <config_vclplug.h>
#ifdef ENABLE_GTK
#if ENABLE_GTK
#include <gtk/gtk.h>
#include <gdk/gdkx.h>
#else
......
......@@ -410,7 +410,7 @@ static NPError l_NPN_GetValue( NPP, NPNVariable variable, void* value )
SAL_INFO("extensions.plugin", "xembed requested");
break;
case NPNVToolkit:
# ifdef ENABLE_GTK
# if ENABLE_GTK
*(int*)value = NPNVGtk2;
# else
*(int*)value = 0;
......@@ -589,7 +589,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
"0000", 4,
NULL );
#ifdef ENABLE_GTK
#if ENABLE_GTK
if( pInst->pGtkWindow )
g_object_unref( G_OBJECT(pInst->pGtkWindow) );
if( pInst->pGtkWidget )
......@@ -675,7 +675,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
" \"" << pInst->argn[i] << "\"=\"" << pInst->argv[i]
<< "\"");
#ifdef ENABLE_GTK
#if ENABLE_GTK
// check if XEMBED is to be used
// ask for Bool. there seems to be no clear definition whether the
// return value should be an int or unsigned char
......@@ -712,7 +712,7 @@ IMPL_LINK( PluginConnector, WorkOnNewMessageHdl, Mediator*, /*pMediator*/ )
if( pWindow->height < 1 )
pWindow->height = 1;
#ifdef ENABLE_GTK
#if ENABLE_GTK
if( pInst->bShouldUseXEmbed )
{
if( ! pInst->pGtkWidget )
......
......@@ -79,7 +79,7 @@ extern "C"
return 0;
}
#ifndef ENABLE_GTK
#if ! ENABLE_GTK
static void ThreadEventHandler( XtPointer /*client_data*/, int* /*source*/, XtInputId* id )
{
char buf[256];
......@@ -231,7 +231,7 @@ static void signal_handler( int nSig )
_exit(nSig);
}
#ifdef ENABLE_GTK
#if ENABLE_GTK
static gboolean noClosure( gpointer )
{
......@@ -393,7 +393,7 @@ int main( int argc, char **argv)
}
int nSocket = atol( argv[1] );
#ifdef ENABLE_GTK
#if ENABLE_GTK
g_thread_init(NULL);
gtk_init(&argc, &argv);
#endif
......@@ -408,7 +408,7 @@ int main( int argc, char **argv)
pXtAppDisplay = XtOpenDisplay( app_context, NULL, "SOPlugin", "SOPlugin", NULL, 0, &argc, argv );
#ifdef ENABLE_GTK
#if ENABLE_GTK
// integrate Xt events into GTK event loop
GPollFD aXtPollDesc, aWakeupPollDesc;
......@@ -481,7 +481,7 @@ int main( int argc, char **argv)
// of XtAppMainLoop
do
{
#ifdef ENABLE_GTK
#if ENABLE_GTK
g_main_context_iteration( NULL, sal_True );
#else
XtAppProcessEvent( app_context, XtIMAll );
......@@ -490,7 +490,7 @@ int main( int argc, char **argv)
SAL_INFO("extensions.plugin", "left plugin app main loop");
#ifdef ENABLE_GTK
#if ENABLE_GTK
g_source_remove(xt_polling_timer_id);
#endif
......
......@@ -56,7 +56,7 @@ SAL_DLLPUBLIC oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInte
@since LibreOffice 4.0
*/
#if defined( HAVE_GCC_BUILTIN_ATOMIC )
#if HAVE_GCC_BUILTIN_ATOMIC
# define osl_atomic_increment(p) __sync_add_and_fetch((p), 1)
#else
# define osl_atomic_increment(p) osl_incrementInterlockedCount((p))
......@@ -73,7 +73,7 @@ SAL_DLLPUBLIC oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInte
@since LibreOffice 4.0
*/
#if defined( HAVE_GCC_BUILTIN_ATOMIC )
#if HAVE_GCC_BUILTIN_ATOMIC
# define osl_atomic_decrement(p) __sync_sub_and_fetch((p), 1)
#else
# define osl_atomic_decrement(p) osl_decrementInterlockedCount((p))
......
......@@ -129,7 +129,7 @@ public:
}
//-----------------------------------------
#if defined HAVE_CXX11_PERFECT_FORWARDING
#if HAVE_CXX11_PERFECT_FORWARDING
template< typename... Args >
void construct (pointer p, Args &&... value)
{
......
......@@ -381,7 +381,7 @@ namespace rtl {
using the outer class
(the one that derives from this base class)
*/
#if defined HAVE_THREADSAFE_STATICS
#if HAVE_THREADSAFE_STATICS
template<typename T, typename Unique>
class Static {
public:
......@@ -441,7 +441,7 @@ private:
using the outer class
(the one that derives from this base class)
*/
#if defined HAVE_THREADSAFE_STATICS
#if HAVE_THREADSAFE_STATICS
template<typename T, typename Data, typename Unique>
class StaticWithArg {
public:
......@@ -523,7 +523,7 @@ private:
@tparam InitAggregate
initializer functor class
*/
#if defined HAVE_THREADSAFE_STATICS
#if HAVE_THREADSAFE_STATICS
template<typename T, typename InitAggregate>
class StaticAggregate {
public:
......@@ -588,7 +588,7 @@ public:
Initializer functor's return type.
Default is T (common practice).
*/
#if defined HAVE_THREADSAFE_STATICS
#if HAVE_THREADSAFE_STATICS
template<typename T, typename InitData,
typename Unique = InitData, typename Data = T>
class StaticWithInit {
......
......@@ -154,7 +154,7 @@ public:
@overload
@since LibreOffice 3.6
*/
#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN // see the OString ctors
#if HAVE_SFINAE_ANONYMOUS_BROKEN // see the OString ctors
OStringBuffer( const char* value )
: pData(NULL)
{
......@@ -454,7 +454,7 @@ public:
@param str the characters to be appended.
@return this string buffer.
*/
#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
#if HAVE_SFINAE_ANONYMOUS_BROKEN
OStringBuffer & append( const sal_Char * str )
{
return append( str, rtl_str_getLength( str ) );
......@@ -665,7 +665,7 @@ public:
@param str a character array.
@return this string buffer.
*/
#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
#if HAVE_SFINAE_ANONYMOUS_BROKEN
OStringBuffer & insert( sal_Int32 offset, const sal_Char * str )
{
return insert( offset, str, rtl_str_getLength( str ) );
......
......@@ -165,7 +165,7 @@ public:
@param value a NULL-terminated character array.
*/
#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
#if HAVE_SFINAE_ANONYMOUS_BROKEN
// Old gcc can try to convert anonymous enums to OString and give compile error.
// So there's no special-cased handling of string literals.
// These are inline functions and technically both variants should work
......@@ -535,7 +535,7 @@ public:
@return sal_True if the strings are equal;
sal_False, otherwise.
*/
#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
#if HAVE_SFINAE_ANONYMOUS_BROKEN
sal_Bool equalsIgnoreAsciiCase( const sal_Char * asciiStr ) const SAL_THROW(())
{
return rtl_str_compareIgnoreAsciiCase( pData->buffer, asciiStr ) == 0;
......
......@@ -38,7 +38,7 @@
// Manually defining RTL_DISABLE_FAST_STRING allows to force turning fast string concatenation off
// (e.g. for debugging).
#ifndef RTL_DISABLE_FAST_STRING
#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
// This feature is not part of public API and is meant to be used only internally by LibreOffice.
#ifdef LIBO_INTERNAL_ONLY
// Enable fast string concatenation.
......
......@@ -146,7 +146,7 @@ public:
rtl_uStringbuffer_newFromStr_WithLength( &pData, value.getStr(), value.getLength() );
}
#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN // see OUString ctors
#if HAVE_SFINAE_ANONYMOUS_BROKEN // see OUString ctors
template< int N >
OUStringBuffer( const char (&literal)[ N ] )
: pData(NULL)
......@@ -588,7 +588,7 @@ public:
sal_Unicode sz[RTL_USTR_MAX_VALUEOFBOOLEAN];
return append( sz, rtl_ustr_valueOfBoolean( sz, b ) );
}
#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
// Pointer can be automatically converted to bool, which is unwanted here.
// Explicitly delete all pointer append() overloads to prevent this
// (except for char* and sal_Unicode* overloads, which are handled elsewhere).
......
......@@ -193,7 +193,7 @@ public:
@since LibreOffice 3.6
*/
#ifdef HAVE_SFINAE_ANONYMOUS_BROKEN
#if HAVE_SFINAE_ANONYMOUS_BROKEN
// Old gcc can try to convert anonymous enums to OUString and give compile error.
// So instead have a variant for const and non-const char[].
template< int N >
......
......@@ -394,7 +394,7 @@ namespace css = ::com::sun::star;
@since LibreOffice 4.1
*/
#if defined HAVE_CXX11_DELETE
#if HAVE_CXX11_DELETE
#define SAL_DELETED_FUNCTION = delete
#else
#define SAL_DELETED_FUNCTION
......@@ -407,7 +407,7 @@ namespace css = ::com::sun::star;
@since LibreOffice 4.1
*/
#if defined HAVE_CXX11_OVERRIDE
#if HAVE_CXX11_OVERRIDE
#define SAL_OVERRIDE override
#else
#define SAL_OVERRIDE
......
......@@ -56,7 +56,7 @@
#define OSL_DETAIL_GETPID getpid()
#endif
#ifdef HAVE_SYSLOG_H
#if HAVE_SYSLOG_H
#include <syslog.h>
// sal/osl/unx/salinit.cxx::sal_detail_initialize updates this:
bool sal_use_syslog;
......@@ -123,7 +123,7 @@ char const * getEnvironmentVariable() {
#endif
#ifdef HAVE_SYSLOG_H
#if HAVE_SYSLOG_H
int toSyslogPriority(sal_detail_LogLevel level) {
switch (level) {
default:
......@@ -214,7 +214,7 @@ void log(
{
std::ostringstream s;
#ifndef ANDROID
#ifdef HAVE_SYSLOG_H
#if HAVE_SYSLOG_H
if (!sal_use_syslog)
#endif
s << toString(level) << ':';
......@@ -254,7 +254,7 @@ void log(
area = "LibreOffice";
__android_log_print(android_log_level, area, "%s", s.str().c_str());
#else
#ifdef HAVE_SYSLOG_H
#if HAVE_SYSLOG_H
if (sal_use_syslog)
syslog(toSyslogPriority(level), "%s", s.str().c_str());
else
......
......@@ -49,7 +49,7 @@ oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount*
: "memory");
return ++nCount;
}
#if defined( HAVE_GCC_BUILTIN_ATOMIC )
#if HAVE_GCC_BUILTIN_ATOMIC
else
return __sync_add_and_fetch (pCount, 1);
#else
......@@ -79,7 +79,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
: "memory");
return --nCount;
}
#if defined( HAVE_GCC_BUILTIN_ATOMIC )
#if HAVE_GCC_BUILTIN_ATOMIC
else
return __sync_sub_and_fetch (pCount, 1);
#else
......@@ -96,7 +96,7 @@ oslInterlockedCount SAL_CALL osl_decrementInterlockedCount(oslInterlockedCount*
}
#endif
}
#elif defined( HAVE_GCC_BUILTIN_ATOMIC )
#elif HAVE_GCC_BUILTIN_ATOMIC
oslInterlockedCount SAL_CALL osl_incrementInterlockedCount(oslInterlockedCount* pCount)
{
return __sync_add_and_fetch(pCount, 1);
......
......@@ -29,7 +29,7 @@
#include "sal/main.h"
#include "sal/types.h"
#ifdef HAVE_SYSLOG_H
#if HAVE_SYSLOG_H
#include <string.h>
#include <syslog.h>
// from sal/osl/all/log.cxx:
......@@ -64,7 +64,7 @@ void sal_detail_initialize(int argc, char ** argv) {
close(fd);
}
#endif
#ifdef HAVE_SYSLOG_H
#if HAVE_SYSLOG_H
const char *use_syslog = getenv("SAL_LOG_SYSLOG");
sal_use_syslog = use_syslog != NULL && !strcmp(use_syslog, "1");
if (sal_use_syslog)
......
......@@ -77,7 +77,7 @@ CPPUNIT_TEST_SUITE_END();
void test::ostring::StringLiterals::checkCtors()
{
// string literal ctors do not work with SFINAE broken and are disabled
#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
bool result_tmp;
CPPUNIT_ASSERT( CONST_CTOR_USED( "test" ));
const char good1[] = "test";
......@@ -159,7 +159,7 @@ void test::ostring::StringLiterals::checkUsage()
rtl_string_unittest_const_literal_function = false;
CPPUNIT_ASSERT_EQUAL( foo, rtl::OString() = "foo" );
CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
rtl_string_unittest_const_literal_function = false;
CPPUNIT_ASSERT( FoO.equalsIgnoreAsciiCase( "fOo" ));
CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
......@@ -264,7 +264,7 @@ void test::ostring::StringLiterals::checkNonConstUsage()
void test::ostring::StringLiterals::checkBuffer()
{
rtl::OStringBuffer buf;
#ifndef HAVE_SFINAE_ANONYMOUS_BROKEN
#if ! HAVE_SFINAE_ANONYMOUS_BROKEN
rtl_string_unittest_const_literal_function = false;
buf.append( "foo" );
CPPUNIT_ASSERT( rtl_string_unittest_const_literal_function == true );
......
......@@ -121,7 +121,7 @@
#include <config_telepathy.h>
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
#include "sccollaboration.hxx"
#endif
......@@ -2556,7 +2556,7 @@ sal_Bool ScDocShell::HasAutomaticTableName( const String& rFilter )
|| rFilter.EqualsAscii( pFilterRtf );
}
#ifndef ENABLE_TELEPATHY
#if ! ENABLE_TELEPATHY
ScDocFunc *ScDocShell::CreateDocFunc()
{
return new ScDocFuncDirect( *this );
......@@ -2592,7 +2592,7 @@ ScDocShell::ScDocShell( const ScDocShell& rShell ) :
pSolverSaveData ( NULL ),
pSheetSaveData ( NULL ),
pModificator ( NULL )
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
, mpCollaboration( new ScCollaboration( this ) )
#endif
{
......@@ -2641,7 +2641,7 @@ ScDocShell::ScDocShell( const sal_uInt64 i_nSfxCreationFlags ) :
pSolverSaveData ( NULL ),
pSheetSaveData ( NULL ),
pModificator ( NULL )
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
, mpCollaboration( new ScCollaboration( this ) )
#endif
{
......@@ -2702,7 +2702,7 @@ ScDocShell::~ScDocShell()
OSL_FAIL("The Modificator should not exist");
delete pModificator;
}
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
delete mpCollaboration;
#endif
}
......
......@@ -63,7 +63,7 @@ class ScOptSolverSave;
class ScSheetSaveData;
class ScFlatBoolRowSegments;
struct ScColWidthParam;
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
class ScCollaboration;
#endif
......@@ -111,7 +111,7 @@ class SC_DLLPUBLIC ScDocShell: public SfxObjectShell, public SfxListener
ScSheetSaveData* pSheetSaveData;
ScDocShellModificator* pModificator; // #109979#; is used to load XML (created in BeforeXMLLoading and destroyed in AfterXMLLoading)
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
ScCollaboration* mpCollaboration;
#endif
......@@ -180,7 +180,7 @@ public:
using SfxShell::Activate; // with sal_Bool bMDI
using SfxShell::Deactivate; // with sal_Bool bMDI
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
SC_DLLPRIVATE ScCollaboration* GetCollaboration();
#endif
virtual void Activate();
......
......@@ -45,7 +45,7 @@
#include <config_telepathy.h>
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
#include "sccollaboration.hxx"
#endif
......@@ -106,7 +106,7 @@ void ScCellShell::Execute( SfxRequest& rReq )
break;
case SID_COLLABORATION:
#ifdef ENABLE_TELEPATHY
#if ENABLE_TELEPATHY
GetViewData()->GetDocShell()->GetCollaboration()->DisplayContacts();
#endif
break;
......
......@@ -22,7 +22,7 @@
#include <config_vclplug.h>
#ifdef ENABLE_TDE
#if ENABLE_TDE
#include "shell/tde_headers.h"
......
......@@ -2620,7 +2620,7 @@ namespace {
nReformat -= 2;
#ifndef MACOSX
#ifndef ENABLE_GRAPHITE
#if ! ENABLE_GRAPHITE
// #i28795#, #i34607#, #i38388#
// step back six(!) more characters for complex scripts
// this is required e.g., for Khmer (thank you, Javier!)
......
......@@ -29,7 +29,7 @@
#include <outfont.hxx>
#include <impfont.hxx>
#include <config_graphite.h>
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
#include <graphite2/Font.h>
#include <graphite_layout.hxx>
#endif
......@@ -269,7 +269,7 @@ void FtFontFile::Unmap()
mpFileMap = NULL;
}
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
// wrap FtFontInfo's table function
const void * graphiteFontTable(const void* appFaceHandle, unsigned int name, size_t *len)
{
......@@ -307,7 +307,7 @@ FtFontInfo::FtFontInfo( const ImplDevFontAttributes& rDevFontAttributes,
mnFaceNum( nFaceNum ),
mnRefCount( 0 ),
mnSynthetic( nSynthetic ),
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
mbCheckedGraphite(false),
mpGraphiteFace(NULL),
#endif
......@@ -336,7 +336,7 @@ FtFontInfo::~FtFontInfo()
delete mpExtraKernInfo;
delete mpChar2Glyph;
delete mpGlyph2Char;
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
delete mpGraphiteFace;
#endif
}
......@@ -367,7 +367,7 @@ FT_FaceRec_* FtFontInfo::GetFaceFT()
return maFaceFT;
}
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
GraphiteFaceWrapper * FtFontInfo::GetGraphiteFace()
{
if (mbCheckedGraphite)
......@@ -2574,7 +2574,7 @@ const unsigned char* ServerFont::GetTable(const char* pName, sal_uLong* pLength)
return mpFontInfo->GetTable( pName, pLength );
}
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
GraphiteFaceWrapper* ServerFont::GetGraphiteFace() const
{
return mpFontInfo->GetGraphiteFace();
......
......@@ -25,7 +25,7 @@
#include <rtl/textcvt.h>
#include <config_graphite.h>
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
class GraphiteFaceWrapper;
#endif
......@@ -72,7 +72,7 @@ public:
const unsigned char* GetTable( const char*, sal_uLong* pLength=0 ) const;
FT_FaceRec_* GetFaceFT();
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
GraphiteFaceWrapper* GetGraphiteFace();
#endif
void ReleaseFaceFT( FT_FaceRec_* );
......@@ -101,7 +101,7 @@ private:
const int mnFaceNum;
int mnRefCount;
const int mnSynthetic;
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
bool mbCheckedGraphite;
GraphiteFaceWrapper * mpGraphiteFace;
#endif
......
......@@ -28,7 +28,7 @@
#include <outfont.hxx>
#include <config_graphite.h>
#ifdef ENABLE_GRAPHITE
#if ENABLE_GRAPHITE
#include <graphite_features.hxx>