From f1c75e0f93b4ec9f45827cc5a2d16ef17a675dfc Mon Sep 17 00:00:00 2001 From: Julian Smart Date: Fri, 11 Jul 2003 22:06:00 +0000 Subject: [PATCH] Fixed some duff #ifdefs git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@21903 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/fmappriv.h | 2 +- include/wx/fontmap.h | 10 ++++------ src/common/fmapbase.cpp | 4 ++-- src/common/fontmap.cpp | 10 +++++----- 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/include/wx/fmappriv.h b/include/wx/fmappriv.h index a6b59d8ca3..9c183e338e 100644 --- a/include/wx/fmappriv.h +++ b/include/wx/fmappriv.h @@ -35,7 +35,7 @@ enum { wxFONTENCODING_UNKNOWN = -2 }; // wxFontMapperPathChanger: change the config path during our lifetime // ---------------------------------------------------------------------------- -#if wxUSE_CONFIG +#if wxUSE_CONFIG && wxUSE_FILECONFIG class wxFontMapperPathChanger { diff --git a/include/wx/fontmap.h b/include/wx/fontmap.h index 0af055a93e..f13cf47a50 100644 --- a/include/wx/fontmap.h +++ b/include/wx/fontmap.h @@ -24,7 +24,7 @@ #include "wx/fontutil.h" // for wxNativeEncodingInfo #endif // wxUSE_GUI -#if wxUSE_CONFIG +#if wxUSE_CONFIG && wxUSE_FILECONFIG class WXDLLIMPEXP_BASE wxConfigBase; #endif // wxUSE_CONFIG @@ -62,10 +62,9 @@ public: // return instance of the wxFontMapper singleton static wxFontMapper *Get(); - // set the sigleton to 'mapper' instance and return previous one + // set the singleton to 'mapper' instance and return previous one static wxFontMapper *Set(wxFontMapper *mapper); - // translates charset strings to encoding // -------------------------------------- @@ -77,7 +76,6 @@ public: virtual wxFontEncoding CharsetToEncoding(const wxString& charset, bool interactive = true); - // information about supported encodings // ------------------------------------- @@ -103,7 +101,7 @@ public: // GetDefaultConfigPath() // ---------------------------------------------------------------------- -#if wxUSE_CONFIG +#if wxUSE_CONFIG && wxUSE_FILECONFIG // set the config object to use (may be NULL to use default) void SetConfig(wxConfigBase *config) { m_config = config; } @@ -116,7 +114,7 @@ public: protected: -#if wxUSE_CONFIG +#if wxUSE_CONFIG && wxUSE_FILECONFIG // get the config object we're using -- if it wasn't set explicitly, this // function will use wxConfig::Get() to get the global one wxConfigBase *GetConfig(); diff --git a/src/common/fmapbase.cpp b/src/common/fmapbase.cpp index 83e91e7016..f39c95e01d 100644 --- a/src/common/fmapbase.cpp +++ b/src/common/fmapbase.cpp @@ -353,6 +353,8 @@ void wxFontMapperBase::RestorePath(const wxString& pathOld) GetConfig()->SetPath(pathOld); } +#endif + // ---------------------------------------------------------------------------- // charset/encoding correspondence // ---------------------------------------------------------------------------- @@ -642,7 +644,5 @@ wxString wxFontMapperBase::GetEncodingName(wxFontEncoding encoding) return str; } -#endif // wxUSE_CONFIG - #endif // wxUSE_FONTMAP diff --git a/src/common/fontmap.cpp b/src/common/fontmap.cpp index 171639e6e3..4df6f648b1 100644 --- a/src/common/fontmap.cpp +++ b/src/common/fontmap.cpp @@ -153,7 +153,7 @@ wxFontMapper::CharsetToEncoding(const wxString& charset, bool interactive) encoding = GetEncoding(n); } -#if wxUSE_CONFIG +#if wxUSE_CONFIG && wxUSE_FILECONFIG // save the result in the config now wxFontMapperPathChanger path(this, FONTMAPPER_CHARSET_PATH); if ( path.IsOk() ) @@ -187,7 +187,7 @@ bool wxFontMapper::TestAltEncoding(const wxString& configEntry, if ( wxGetNativeFontEncoding(encReplacement, info) && wxTestFontEncoding(*info) ) { -#if wxUSE_CONFIG +#if wxUSE_CONFIG && wxUSE_FILECONFIG // remember the mapping in the config wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH); @@ -253,7 +253,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, } configEntry += encName; -#if wxUSE_CONFIG +#if wxUSE_CONFIG && wxUSE_FILECONFIG // do we have a font spec for this encoding? wxString fontinfo; wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH); @@ -365,7 +365,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, *info = retData.EncodingInfo(); info->encoding = retData.GetEncoding(); -#if wxUSE_CONFIG +#if wxUSE_CONFIG && wxUSE_FILECONFIG // remember this in the config wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH); @@ -385,7 +385,7 @@ bool wxFontMapper::GetAltForEncoding(wxFontEncoding encoding, // or selected to use equivalent encoding // // remember it to avoid asking the same question again later -#if wxUSE_CONFIG +#if wxUSE_CONFIG && wxUSE_FILECONFIG wxFontMapperPathChanger path(this, FONTMAPPER_FONT_FROM_ENCODING_PATH); if ( path.IsOk() ) -- 2.45.2