Change xml properties to attributes in xtixml.cpp

Probably a follow-up fix for commit from 10 years ago: 288b610

This fixes compilation with `--enable-extended_rtti` configure flag.

Also removed all trailing spaces in this file.
This commit is contained in:
pavelxdd
2017-11-25 09:13:11 +03:00
parent 4156634b24
commit 885b97282a

View File

@@ -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")) &&