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:
@@ -98,7 +98,7 @@ void wxObjectXmlWriter::DoBeginWriteTopLevelEntry( const wxString &name )
|
|||||||
{
|
{
|
||||||
wxXmlNode *pnode;
|
wxXmlNode *pnode;
|
||||||
pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("entry"));
|
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->m_current->AddChild(pnode);
|
||||||
m_data->Push( pnode );
|
m_data->Push( pnode );
|
||||||
}
|
}
|
||||||
@@ -114,13 +114,13 @@ void wxObjectXmlWriter::DoBeginWriteObject(const wxObject *WXUNUSED(object),
|
|||||||
{
|
{
|
||||||
wxXmlNode *pnode;
|
wxXmlNode *pnode;
|
||||||
pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object"));
|
pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object"));
|
||||||
pnode->AddProperty(wxT("class"), wxString(classInfo->GetClassName()));
|
pnode->AddAttribute(wxT("class"), wxString(classInfo->GetClassName()));
|
||||||
pnode->AddProperty(wxT("id"), wxString::Format( wxT("%d"), objectID ) );
|
pnode->AddAttribute(wxT("id"), wxString::Format( wxT("%d"), objectID ) );
|
||||||
|
|
||||||
wxStringToAnyHashMap::const_iterator it, en;
|
wxStringToAnyHashMap::const_iterator it, en;
|
||||||
for( it = metadata.begin(), en = metadata.end(); it != en; ++it )
|
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);
|
m_data->m_current->AddChild(pnode);
|
||||||
@@ -156,7 +156,7 @@ void wxObjectXmlWriter::DoBeginWriteProperty(const wxPropertyInfo *pi )
|
|||||||
{
|
{
|
||||||
wxXmlNode *pnode;
|
wxXmlNode *pnode;
|
||||||
pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("prop") );
|
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->m_current->AddChild(pnode);
|
||||||
m_data->Push( pnode );
|
m_data->Push( pnode );
|
||||||
}
|
}
|
||||||
@@ -170,7 +170,7 @@ void wxObjectXmlWriter::DoWriteRepeatedObject( int objectID )
|
|||||||
{
|
{
|
||||||
wxXmlNode *pnode;
|
wxXmlNode *pnode;
|
||||||
pnode = new wxXmlNode(wxXML_ELEMENT_NODE, wxT("object"));
|
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);
|
m_data->m_current->AddChild(pnode);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -279,7 +279,7 @@ int wxObjectXmlReader::ReadComponent(wxXmlNode *node, wxObjectReaderCallback *ca
|
|||||||
SetObjectClassInfo( objectID, classInfo );
|
SetObjectClassInfo( objectID, classInfo );
|
||||||
|
|
||||||
wxStringToAnyHashMap metadata;
|
wxStringToAnyHashMap metadata;
|
||||||
wxXmlProperty *xp = node->GetAttributes();
|
wxXmlAttribute *xp = node->GetAttributes();
|
||||||
while ( xp )
|
while ( xp )
|
||||||
{
|
{
|
||||||
if ( xp->GetName() != wxString(wxT("class")) &&
|
if ( xp->GetName() != wxString(wxT("class")) &&
|
||||||
|
Reference in New Issue
Block a user