From 63feebce0a35d8897f906f8925a3e3f366504024 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Tue, 6 May 2008 21:11:59 +0000 Subject: [PATCH] compilation fixes for !wxUSE_FONTMEM case git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53471 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/dfb/fontenum.cpp | 4 ++++ src/xrc/xmlres.cpp | 8 +++++++- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/dfb/fontenum.cpp b/src/dfb/fontenum.cpp index fe1e05340e..71be1d3d1f 100644 --- a/src/dfb/fontenum.cpp +++ b/src/dfb/fontenum.cpp @@ -18,6 +18,8 @@ #include "wx/fontenum.h" #include "wx/private/fontmgr.h" +#if wxUSE_FONTENUM + // ---------------------------------------------------------------------------- // wxFontEnumerator // ---------------------------------------------------------------------------- @@ -49,3 +51,5 @@ bool wxFontEnumerator::EnumerateEncodings(const wxString& facename) { return EnumerateEncodingsUTF8(facename); } + +#endif // wxUSE_FONTENUM diff --git a/src/xrc/xmlres.cpp b/src/xrc/xmlres.cpp index 4eed81980c..c93f2ef023 100644 --- a/src/xrc/xmlres.cpp +++ b/src/xrc/xmlres.cpp @@ -1440,8 +1440,9 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param) if (hasFacename) { wxString faces = GetParamValue(wxT("face")); - wxArrayString facenames(wxFontEnumerator::GetFacenames()); wxStringTokenizer tk(faces, wxT(",")); +#if wxUSE_FONTENUM + wxArrayString facenames(wxFontEnumerator::GetFacenames()); while (tk.HasMoreTokens()) { int index = facenames.Index(tk.GetNextToken(), false); @@ -1451,6 +1452,11 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param) break; } } +#else // !wxUSE_FONTENUM + // just use the first face name if we can't check its availability: + if (tk.HasMoreTokens()) + facename = tk.GetNextToken(); +#endif // wxUSE_FONTENUM/!wxUSE_FONTENUM } // encoding -- 2.45.2