fixed wxXmlDocument::Save() to interpret the indentstep argument correctly
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62255 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -156,6 +156,11 @@ Changes in behaviour not resulting in compilation errors, please read this!
|
|||||||
|
|
||||||
- wxTextCtrl::LoadFile no longer sends a text update event.
|
- wxTextCtrl::LoadFile no longer sends a text update event.
|
||||||
|
|
||||||
|
- wxXmlDocument::Save()'s indentstep argument's interpretation was fixed
|
||||||
|
to match the documentation: it now really is the number of spaces in
|
||||||
|
indentation instead of being its double. Its default value was changed
|
||||||
|
accordingly, to 2.
|
||||||
|
|
||||||
|
|
||||||
Changes in behaviour which may result in compilation errors
|
Changes in behaviour which may result in compilation errors
|
||||||
-----------------------------------------------------------
|
-----------------------------------------------------------
|
||||||
|
@@ -265,8 +265,8 @@ public:
|
|||||||
const wxString& encoding = wxT("UTF-8"), int flags = wxXMLDOC_NONE);
|
const wxString& encoding = wxT("UTF-8"), int flags = wxXMLDOC_NONE);
|
||||||
|
|
||||||
// Saves document as .xml file.
|
// Saves document as .xml file.
|
||||||
virtual bool Save(const wxString& filename, int indentstep = 1) const;
|
virtual bool Save(const wxString& filename, int indentstep = 2) const;
|
||||||
virtual bool Save(wxOutputStream& stream, int indentstep = 1) const;
|
virtual bool Save(wxOutputStream& stream, int indentstep = 2) const;
|
||||||
|
|
||||||
bool IsOk() const { return m_root != NULL; }
|
bool IsOk() const { return m_root != NULL; }
|
||||||
|
|
||||||
|
@@ -597,13 +597,13 @@ public:
|
|||||||
If @a indentstep is @c wxXML_NO_INDENTATION, then, automatic indentation
|
If @a indentstep is @c wxXML_NO_INDENTATION, then, automatic indentation
|
||||||
is turned off.
|
is turned off.
|
||||||
*/
|
*/
|
||||||
virtual bool Save(const wxString& filename, int indentstep = 1) const;
|
virtual bool Save(const wxString& filename, int indentstep = 2) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Saves XML tree in the given output stream.
|
Saves XML tree in the given output stream.
|
||||||
See Save(const wxString&, int) for a description of @a indentstep.
|
See Save(const wxString&, int) for a description of @a indentstep.
|
||||||
*/
|
*/
|
||||||
virtual bool Save(wxOutputStream& stream, int indentstep = 1) const;
|
virtual bool Save(wxOutputStream& stream, int indentstep = 2) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Sets the enconding of the document.
|
Sets the enconding of the document.
|
||||||
|
@@ -885,7 +885,7 @@ bool OutputIndentation(wxOutputStream& stream,
|
|||||||
wxMBConv *convFile)
|
wxMBConv *convFile)
|
||||||
{
|
{
|
||||||
wxString str(wxS("\n"));
|
wxString str(wxS("\n"));
|
||||||
str += wxString(2*indent, wxS(' '));
|
str += wxString(indent, wxS(' '));
|
||||||
return OutputString(stream, str, convMem, convFile);
|
return OutputString(stream, str, convMem, convFile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user