diff options
author | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
---|---|---|
committer | Daniel Wilhelm <daniel@wili.li> | 2014-04-18 17:10:11 +0200 |
commit | c0cdb2ad99a1e2a6ade5ce76c91177a79258e669 (patch) | |
tree | 4701a015385d9a6a5a4ba99a8f1f5d400fff26b1 /shared/xml_base.cpp | |
parent | 3.13 (diff) | |
download | FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.gz FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.tar.bz2 FreeFileSync-c0cdb2ad99a1e2a6ade5ce76c91177a79258e669.zip |
3.14
Diffstat (limited to 'shared/xml_base.cpp')
-rw-r--r-- | shared/xml_base.cpp | 36 |
1 files changed, 19 insertions, 17 deletions
diff --git a/shared/xml_base.cpp b/shared/xml_base.cpp index 99d4d3ca..c3d04364 100644 --- a/shared/xml_base.cpp +++ b/shared/xml_base.cpp @@ -19,16 +19,16 @@ std::string getTypeName(xmlAccess::XmlType type) { switch (type) { - case xmlAccess::XML_GUI_CONFIG: - return "GUI"; - case xmlAccess::XML_BATCH_CONFIG: - return "BATCH"; - case xmlAccess::XML_GLOBAL_SETTINGS: - return "GLOBAL"; - case xmlAccess::XML_REAL_CONFIG: - return "REAL"; - case xmlAccess::XML_OTHER: - break; + case xmlAccess::XML_GUI_CONFIG: + return "GUI"; + case xmlAccess::XML_BATCH_CONFIG: + return "BATCH"; + case xmlAccess::XML_GLOBAL_SETTINGS: + return "GLOBAL"; + case xmlAccess::XML_REAL_CONFIG: + return "REAL"; + case xmlAccess::XML_OTHER: + break; } assert(false); return "OTHER"; @@ -44,13 +44,13 @@ void normalize(std::vector<char>& stream) for (std::vector<char>::const_iterator i = stream.begin(); i != stream.end(); ++i) switch (*i) { - case 0xD: - tmp.push_back(0xA); - if (i + 1 != stream.end() && *(i + 1) == 0xA) - ++i; - break; - default: - tmp.push_back(*i); + case 0xD: + tmp.push_back(0xA); + if (i + 1 != stream.end() && *(i + 1) == 0xA) + ++i; + break; + default: + tmp.push_back(*i); } stream.swap(tmp); @@ -131,6 +131,8 @@ xmlAccess::XmlType xmlAccess::getXmlType(const wxString& filename) //throw() void xmlAccess::loadXmlDocument(const wxString& filename, const xmlAccess::XmlType type, TiXmlDocument& document) //throw XmlError() { + TiXmlBase::SetCondenseWhiteSpace(false); //do not condense whitespace characters + ::loadRawXmlDocument(filename, document); //throw XmlError() TiXmlElement* root = document.RootElement(); |