wx/xml: Implement line-ending modes for xml saves

* Add 'wxTextFileType m_fileType' to hold the type
 * Add 'wxString m_eol' to hold the end of lines string

 * Add SetFileType() and GetFileType() to set and get the type
 * Add GetEOL() to get the end of lines wxString

 * Backwards compatibility preserved by using wxTextFileType_Unix

Change-Id: I3e8547b377e2c4060a3a2d97c299a08ea2c0a376
Signed-off-by: Adrian DC <radian.dc@gmail.com>
This commit is contained in:
Adrian DC
2017-05-29 16:08:48 +02:00
parent 2afd8bfcaf
commit 11e5413558
3 changed files with 49 additions and 10 deletions

View File

@@ -786,6 +786,16 @@ public:
*/
const wxXmlDoctype& GetDoctype() const;
/**
Returns the output line ending format used for documents.
*/
wxTextFileType GetFileType() const;
/**
Returns the output line ending string used for documents.
*/
wxString GetEOL() const;
/**
Returns the document node of the document.
@@ -882,6 +892,11 @@ public:
*/
void SetDoctype(const wxXmlDoctype& doctype);
/**
Sets the output line ending formats when the document is saved.
*/
void SetFileType(wxTextFileType fileType);
/**
Sets the root element node of this document.