WinCE fix. IsEmpty() -> empty().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@30572 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -21,7 +21,9 @@
|
|||||||
|
|
||||||
#if wxUSE_XRC
|
#if wxUSE_XRC
|
||||||
|
|
||||||
|
#ifndef __WXWINCE__
|
||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include "wx/dialog.h"
|
#include "wx/dialog.h"
|
||||||
#include "wx/panel.h"
|
#include "wx/panel.h"
|
||||||
@@ -866,12 +868,16 @@ float wxXmlResourceHandler::GetFloat(const wxString& param, float defaultv)
|
|||||||
double value;
|
double value;
|
||||||
wxString str1 = GetParamValue(param);
|
wxString str1 = GetParamValue(param);
|
||||||
|
|
||||||
|
#ifndef __WXWINCE__
|
||||||
const char *prevlocale = setlocale(LC_NUMERIC, "C");
|
const char *prevlocale = setlocale(LC_NUMERIC, "C");
|
||||||
|
#endif
|
||||||
|
|
||||||
if (!str1.ToDouble(&value))
|
if (!str1.ToDouble(&value))
|
||||||
value = defaultv;
|
value = defaultv;
|
||||||
|
|
||||||
|
#ifndef __WXWINCE__
|
||||||
setlocale(LC_NUMERIC, prevlocale);
|
setlocale(LC_NUMERIC, prevlocale);
|
||||||
|
#endif
|
||||||
|
|
||||||
return value;
|
return value;
|
||||||
}
|
}
|
||||||
@@ -1004,7 +1010,7 @@ wxBitmap wxXmlResourceHandler::GetBitmap(const wxString& param,
|
|||||||
|
|
||||||
/* ...or load the bitmap from file: */
|
/* ...or load the bitmap from file: */
|
||||||
wxString name = GetParamValue(param);
|
wxString name = GetParamValue(param);
|
||||||
if (name.IsEmpty()) return wxNullBitmap;
|
if (name.empty()) return wxNullBitmap;
|
||||||
#if wxUSE_FILESYSTEM
|
#if wxUSE_FILESYSTEM
|
||||||
wxFSFile *fsfile = GetCurFileSystem().OpenFile(name);
|
wxFSFile *fsfile = GetCurFileSystem().OpenFile(name);
|
||||||
if (fsfile == NULL)
|
if (fsfile == NULL)
|
||||||
@@ -1079,7 +1085,7 @@ wxString wxXmlResourceHandler::GetNodeContent(wxXmlNode *node)
|
|||||||
|
|
||||||
wxString wxXmlResourceHandler::GetParamValue(const wxString& param)
|
wxString wxXmlResourceHandler::GetParamValue(const wxString& param)
|
||||||
{
|
{
|
||||||
if (param.IsEmpty())
|
if (param.empty())
|
||||||
return GetNodeContent(m_node);
|
return GetNodeContent(m_node);
|
||||||
else
|
else
|
||||||
return GetNodeContent(GetParamNode(param));
|
return GetNodeContent(GetParamNode(param));
|
||||||
@@ -1090,7 +1096,7 @@ wxString wxXmlResourceHandler::GetParamValue(const wxString& param)
|
|||||||
wxSize wxXmlResourceHandler::GetSize(const wxString& param)
|
wxSize wxXmlResourceHandler::GetSize(const wxString& param)
|
||||||
{
|
{
|
||||||
wxString s = GetParamValue(param);
|
wxString s = GetParamValue(param);
|
||||||
if (s.IsEmpty()) s = wxT("-1,-1");
|
if (s.empty()) s = wxT("-1,-1");
|
||||||
bool is_dlg;
|
bool is_dlg;
|
||||||
long sx, sy = 0;
|
long sx, sy = 0;
|
||||||
|
|
||||||
@@ -1130,7 +1136,7 @@ wxPoint wxXmlResourceHandler::GetPosition(const wxString& param)
|
|||||||
wxCoord wxXmlResourceHandler::GetDimension(const wxString& param, wxCoord defaultv)
|
wxCoord wxXmlResourceHandler::GetDimension(const wxString& param, wxCoord defaultv)
|
||||||
{
|
{
|
||||||
wxString s = GetParamValue(param);
|
wxString s = GetParamValue(param);
|
||||||
if (s.IsEmpty()) return defaultv;
|
if (s.empty()) return defaultv;
|
||||||
bool is_dlg;
|
bool is_dlg;
|
||||||
long sx;
|
long sx;
|
||||||
|
|
||||||
@@ -1267,7 +1273,7 @@ wxFont wxXmlResourceHandler::GetFont(const wxString& param)
|
|||||||
{
|
{
|
||||||
wxString encoding = GetParamValue(wxT("encoding"));
|
wxString encoding = GetParamValue(wxT("encoding"));
|
||||||
wxFontMapper mapper;
|
wxFontMapper mapper;
|
||||||
if (!encoding.IsEmpty())
|
if (!encoding.empty())
|
||||||
enc = mapper.CharsetToEncoding(encoding);
|
enc = mapper.CharsetToEncoding(encoding);
|
||||||
if (enc == wxFONTENCODING_SYSTEM)
|
if (enc == wxFONTENCODING_SYSTEM)
|
||||||
enc = wxFONTENCODING_DEFAULT;
|
enc = wxFONTENCODING_DEFAULT;
|
||||||
|
Reference in New Issue
Block a user