Merge branch 'xtifix' of https://github.com/pavelxdd/wxWidgets
See https://github.com/wxWidgets/wxWidgets/pull/618
This commit is contained in:
commit
797fad2858
@ -270,9 +270,9 @@ template<> void wxStringWriteValue(wxString &s, const wxString &data )
|
||||
#else
|
||||
#define wxBUILTIN_TYPE_INFO( element, type ) \
|
||||
void _toString##element( const wxAny& data, wxString &result ) \
|
||||
{ wxToStringConverter<type, data, result); } \
|
||||
{ wxToStringConverter<type>(data, result); } \
|
||||
void _fromString##element( const wxString& data, wxAny &result ) \
|
||||
{ wxFromStringConverter<type, data, result); } \
|
||||
{ wxFromStringConverter<type>(data, result); } \
|
||||
wxBuiltInTypeInfo s_typeInfo##type(element, &_toString##element, \
|
||||
&_fromString##element, typeid(type).name());
|
||||
#endif
|
||||
|
@ -98,7 +98,7 @@ void wxObjectXmlWriter::DoBeginWriteTopLevelEntry( const wxString &name )
|
||||
{
|
||||
wxXmlNode *pnode;
|
||||
pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("entry"));
|
||||
pnode->AddProperty(wxString(wxT("name")), name);
|
||||
pnode->AddAttribute(wxString(wxT("name")), name);
|
||||
m_data->m_current->AddChild(pnode);
|
||||
m_data->Push( pnode );
|
||||
}
|
||||
@ -114,13 +114,13 @@ void wxObjectXmlWriter::DoBeginWriteObject(const wxObject *WXUNUSED(object),
|
||||
{
|
||||
wxXmlNode *pnode;
|
||||
pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object"));
|
||||
pnode->AddProperty(wxT("class"), wxString(classInfo->GetClassName()));
|
||||
pnode->AddProperty(wxT("id"), wxString::Format( wxT("%d"), objectID ) );
|
||||
pnode->AddAttribute(wxT("class"), wxString(classInfo->GetClassName()));
|
||||
pnode->AddAttribute(wxT("id"), wxString::Format( wxT("%d"), objectID ) );
|
||||
|
||||
wxStringToAnyHashMap::const_iterator it, en;
|
||||
for( it = metadata.begin(), en = metadata.end(); it != en; ++it )
|
||||
{
|
||||
pnode->AddProperty( it->first, wxAnyGetAsString(it->second) );
|
||||
pnode->AddAttribute( it->first, wxAnyGetAsString(it->second) );
|
||||
}
|
||||
|
||||
m_data->m_current->AddChild(pnode);
|
||||
@ -156,7 +156,7 @@ void wxObjectXmlWriter::DoBeginWriteProperty(const wxPropertyInfo *pi )
|
||||
{
|
||||
wxXmlNode *pnode;
|
||||
pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("prop") );
|
||||
pnode->AddProperty(wxT("name"), pi->GetName() );
|
||||
pnode->AddAttribute(wxT("name"), pi->GetName() );
|
||||
m_data->m_current->AddChild(pnode);
|
||||
m_data->Push( pnode );
|
||||
}
|
||||
@ -170,7 +170,7 @@ void wxObjectXmlWriter::DoWriteRepeatedObject( int objectID )
|
||||
{
|
||||
wxXmlNode *pnode;
|
||||
pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object"));
|
||||
pnode->AddProperty(wxString(wxT("href")), wxString::Format( wxT("%d"), objectID ) );
|
||||
pnode->AddAttribute(wxString(wxT("href")), wxString::Format( wxT("%d"), objectID ) );
|
||||
m_data->m_current->AddChild(pnode);
|
||||
}
|
||||
|
||||
@ -279,7 +279,7 @@ int wxObjectXmlReader::ReadComponent(wxXmlNode *node, wxObjectReaderCallback *ca
|
||||
SetObjectClassInfo( objectID, classInfo );
|
||||
|
||||
wxStringToAnyHashMap metadata;
|
||||
wxXmlProperty *xp = node->GetAttributes();
|
||||
wxXmlAttribute *xp = node->GetAttributes();
|
||||
while ( xp )
|
||||
{
|
||||
if ( xp->GetName() != wxString(wxT("class")) &&
|
||||
|
Loading…
Reference in New Issue
Block a user