X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fsgml.C;h=9104cda839cb7b3f2eb7ca913a951f7e7f3b7dbf;hb=09e01879979643949f1f2c7216023f1f35d5ada2;hp=35b4b018dcad3f774a9cf62179ce7b5f3797b957;hpb=774dabb32347b6dc2c1abbc202960f4f6f366db3;p=lyx.git diff --git a/src/sgml.C b/src/sgml.C index 35b4b018dc..9104cda839 100644 --- a/src/sgml.C +++ b/src/sgml.C @@ -8,29 +8,24 @@ */ #include - + #include "support/LOstream.h" - + #include "paragraph.h" #include "sgml.h" - + using std::pair; using std::make_pair; using std::ostream; using std::endl; - + namespace sgml { pair escapeChar(char c) { string str; - + switch (c) { - case Paragraph::META_HFILL: - break; - case Paragraph::META_NEWLINE: - str = '\n'; - break; case ' ': return make_pair(true, string(" ")); break; @@ -83,14 +78,14 @@ pair escapeChar(char c) return make_pair(false, str); } - + int openTag(ostream & os, Paragraph::depth_type depth, bool mixcont, string const & latexname) { if (!latexname.empty() && latexname != "!-- --") { if (!mixcont) - os << string(" ", depth); - os << "<" << latexname << ">"; + os << string(depth, ' '); + os << '<' << latexname << '>'; } if (!mixcont) @@ -105,8 +100,8 @@ int closeTag(ostream & os, Paragraph::depth_type depth, { if (!latexname.empty() && latexname != "!-- --") { if (!mixcont) - os << endl << string(" ", depth); - os << ""; + os << endl << string(depth, ' '); + os << "'; } if (!mixcont)