Unicode fixes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@23225 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Julian Smart 2003-08-26 00:02:19 +00:00
parent e70b4f1095
commit 9dc6871e8f

View File

@ -57,7 +57,7 @@ bool wxEnumData::HasEnumMemberValue(const wxChar *name, int *value)
int i; int i;
for (i = 0; m_members[i].m_name ; i++ ) for (i = 0; m_members[i].m_name ; i++ )
{ {
if (!strcmp(name, m_members[i].m_name)) if (!wxStrcmp(name, m_members[i].m_name))
{ {
if ( value ) if ( value )
*value = m_members[i].m_value; *value = m_members[i].m_value;
@ -72,7 +72,7 @@ int wxEnumData::GetEnumMemberValue(const wxChar *name)
int i; int i;
for (i = 0; m_members[i].m_name ; i++ ) for (i = 0; m_members[i].m_name ; i++ )
{ {
if (!strcmp(name, m_members[i].m_name)) if (!wxStrcmp(name, m_members[i].m_name))
{ {
return m_members[i].m_value; return m_members[i].m_value;
} }
@ -96,7 +96,7 @@ int wxEnumData::GetEnumMemberValueByIndex( int idx )
return m_members[idx].m_value ; return m_members[idx].m_value ;
} }
const char * wxEnumData::GetEnumMemberNameByIndex( int idx ) const wxChar * wxEnumData::GetEnumMemberNameByIndex( int idx )
{ {
// we should cache the count in order to avoid out-of-bounds errors // we should cache the count in order to avoid out-of-bounds errors
return m_members[idx].m_name ; return m_members[idx].m_name ;
@ -123,7 +123,7 @@ template<> void wxStringReadValue(const wxString &s , bool &data )
template<> void wxStringWriteValue(wxString &s , const bool &data ) template<> void wxStringWriteValue(wxString &s , const bool &data )
{ {
s = wxString::Format("%d", data ) ; s = wxString::Format(_T("%d"), data ) ;
} }
// char // char
@ -137,7 +137,7 @@ template<> void wxStringReadValue(const wxString &s , char &data )
template<> void wxStringWriteValue(wxString &s , const char &data ) template<> void wxStringWriteValue(wxString &s , const char &data )
{ {
s = wxString::Format("%d", data ) ; s = wxString::Format(_T("%d"), data ) ;
} }
// unsigned char // unsigned char
@ -151,7 +151,7 @@ template<> void wxStringReadValue(const wxString &s , unsigned char &data )
template<> void wxStringWriteValue(wxString &s , const unsigned char &data ) template<> void wxStringWriteValue(wxString &s , const unsigned char &data )
{ {
s = wxString::Format("%d", data ) ; s = wxString::Format(_T("%d"), data ) ;
} }
// int // int
@ -163,7 +163,7 @@ template<> void wxStringReadValue(const wxString &s , int &data )
template<> void wxStringWriteValue(wxString &s , const int &data ) template<> void wxStringWriteValue(wxString &s , const int &data )
{ {
s = wxString::Format("%d", data ) ; s = wxString::Format(_T("%d"), data ) ;
} }
// unsigned int // unsigned int
@ -175,7 +175,7 @@ template<> void wxStringReadValue(const wxString &s , unsigned int &data )
template<> void wxStringWriteValue(wxString &s , const unsigned int &data ) template<> void wxStringWriteValue(wxString &s , const unsigned int &data )
{ {
s = wxString::Format("%d", data ) ; s = wxString::Format(_T("%d"), data ) ;
} }
// long // long
@ -187,7 +187,7 @@ template<> void wxStringReadValue(const wxString &s , long &data )
template<> void wxStringWriteValue(wxString &s , const long &data ) template<> void wxStringWriteValue(wxString &s , const long &data )
{ {
s = wxString::Format("%ld", data ) ; s = wxString::Format(_T("%ld"), data ) ;
} }
// unsigned long // unsigned long
@ -199,7 +199,7 @@ template<> void wxStringReadValue(const wxString &s , unsigned long &data )
template<> void wxStringWriteValue(wxString &s , const unsigned long &data ) template<> void wxStringWriteValue(wxString &s , const unsigned long &data )
{ {
s = wxString::Format("%ld", data ) ; s = wxString::Format(_T("%ld"), data ) ;
} }
// float // float
@ -211,7 +211,7 @@ template<> void wxStringReadValue(const wxString &s , float &data )
template<> void wxStringWriteValue(wxString &s , const float &data ) template<> void wxStringWriteValue(wxString &s , const float &data )
{ {
s = wxString::Format("%f", data ) ; s = wxString::Format(_T("%f"), data ) ;
} }
// double // double
@ -223,7 +223,7 @@ template<> void wxStringReadValue(const wxString &s , double &data )
template<> void wxStringWriteValue(wxString &s , const double &data ) template<> void wxStringWriteValue(wxString &s , const double &data )
{ {
s = wxString::Format("%lf", data ) ; s = wxString::Format(_T("%lf"), data ) ;
} }
// wxString // wxString
@ -363,7 +363,7 @@ wxHandlerInfo::~wxHandlerInfo()
} }
} }
const wxPropertyAccessor *wxClassInfo::FindAccessor(const char *PropertyName) const const wxPropertyAccessor *wxClassInfo::FindAccessor(const wxChar *PropertyName) const
{ {
const wxPropertyInfo* info = FindPropertyInfo( PropertyName ) ; const wxPropertyInfo* info = FindPropertyInfo( PropertyName ) ;
@ -373,13 +373,13 @@ const wxPropertyAccessor *wxClassInfo::FindAccessor(const char *PropertyName) co
return NULL ; return NULL ;
} }
wxPropertyInfo *wxClassInfo::FindPropertyInfoInThisClass (const char *PropertyName) const wxPropertyInfo *wxClassInfo::FindPropertyInfoInThisClass (const wxChar *PropertyName) const
{ {
wxPropertyInfo* info = m_firstProperty ; wxPropertyInfo* info = m_firstProperty ;
while( info ) while( info )
{ {
if ( strcmp( info->GetName() , PropertyName ) == 0 ) if ( wxStrcmp( info->GetName() , PropertyName ) == 0 )
return info ; return info ;
info = info->GetNext() ; info = info->GetNext() ;
} }
@ -387,7 +387,7 @@ wxPropertyInfo *wxClassInfo::FindPropertyInfoInThisClass (const char *PropertyNa
return 0; return 0;
} }
const wxPropertyInfo *wxClassInfo::FindPropertyInfo (const char *PropertyName) const const wxPropertyInfo *wxClassInfo::FindPropertyInfo (const wxChar *PropertyName) const
{ {
const wxPropertyInfo* info = FindPropertyInfoInThisClass( PropertyName ) ; const wxPropertyInfo* info = FindPropertyInfoInThisClass( PropertyName ) ;
if ( info ) if ( info )
@ -403,13 +403,13 @@ const wxPropertyInfo *wxClassInfo::FindPropertyInfo (const char *PropertyName) c
return 0; return 0;
} }
wxHandlerInfo *wxClassInfo::FindHandlerInfoInThisClass (const char *PropertyName) const wxHandlerInfo *wxClassInfo::FindHandlerInfoInThisClass (const wxChar *PropertyName) const
{ {
wxHandlerInfo* info = m_firstHandler ; wxHandlerInfo* info = m_firstHandler ;
while( info ) while( info )
{ {
if ( strcmp( info->GetName() , PropertyName ) == 0 ) if ( wxStrcmp( info->GetName() , PropertyName ) == 0 )
return info ; return info ;
info = info->GetNext() ; info = info->GetNext() ;
} }
@ -417,7 +417,7 @@ wxHandlerInfo *wxClassInfo::FindHandlerInfoInThisClass (const char *PropertyName
return 0; return 0;
} }
const wxHandlerInfo *wxClassInfo::FindHandlerInfo (const char *PropertyName) const const wxHandlerInfo *wxClassInfo::FindHandlerInfo (const wxChar *PropertyName) const
{ {
const wxHandlerInfo* info = FindHandlerInfoInThisClass( PropertyName ) ; const wxHandlerInfo* info = FindHandlerInfoInThisClass( PropertyName ) ;
@ -457,7 +457,7 @@ bool wxClassInfo::BeforeWriteObject( const wxObject *obj, wxWriter *streamer , w
return true ; return true ;
} }
void wxClassInfo::SetProperty(wxObject *object, const char *propertyName, const wxxVariant &value) const void wxClassInfo::SetProperty(wxObject *object, const wxChar *propertyName, const wxxVariant &value) const
{ {
const wxPropertyAccessor *accessor; const wxPropertyAccessor *accessor;
@ -466,7 +466,7 @@ void wxClassInfo::SetProperty(wxObject *object, const char *propertyName, const
accessor->SetProperty( object , value ) ; accessor->SetProperty( object , value ) ;
} }
wxxVariant wxClassInfo::GetProperty(wxObject *object, const char *propertyName) const wxxVariant wxClassInfo::GetProperty(wxObject *object, const wxChar *propertyName) const
{ {
const wxPropertyAccessor *accessor; const wxPropertyAccessor *accessor;
@ -608,7 +608,7 @@ const wxChar* wxDynamicClassInfo::GetCreateParamName(int i) const
return GetParents()[0]->GetCreateParamName( i ) ; return GetParents()[0]->GetCreateParamName( i ) ;
} }
void wxDynamicClassInfo::SetProperty(wxObject *object, const char *propertyName, const wxxVariant &value) const void wxDynamicClassInfo::SetProperty(wxObject *object, const wxChar *propertyName, const wxxVariant &value) const
{ {
wxDynamicObject* dynobj = dynamic_cast< wxDynamicObject * >( object ) ; wxDynamicObject* dynobj = dynamic_cast< wxDynamicObject * >( object ) ;
wxASSERT_MSG( dynobj , wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ) ; wxASSERT_MSG( dynobj , wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ) ;
@ -618,7 +618,7 @@ void wxDynamicClassInfo::SetProperty(wxObject *object, const char *propertyName,
GetParents()[0]->SetProperty( dynobj->GetSuperClassInstance() , propertyName , value ) ; GetParents()[0]->SetProperty( dynobj->GetSuperClassInstance() , propertyName , value ) ;
} }
wxxVariant wxDynamicClassInfo::GetProperty(wxObject *object, const char *propertyName) const wxxVariant wxDynamicClassInfo::GetProperty(wxObject *object, const wxChar *propertyName) const
{ {
wxDynamicObject* dynobj = dynamic_cast< wxDynamicObject * >( object ) ; wxDynamicObject* dynobj = dynamic_cast< wxDynamicObject * >( object ) ;
wxASSERT_MSG( dynobj , wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ) ; wxASSERT_MSG( dynobj , wxT("cannot call wxDynamicClassInfo::SetProperty on an object other than wxDynamicObject") ) ;