]> git.lyx.org Git - lyx.git/blobdiff - src/sgml.C
split LyXText::rowlist_ into individual Paragraph::rows_ chunks
[lyx.git] / src / sgml.C
index 35b4b018dcad3f774a9cf62179ce7b5f3797b957..9104cda839cb7b3f2eb7ca913a951f7e7f3b7dbf 100644 (file)
@@ -8,29 +8,24 @@
  */
 
 #include <config.h>
+
 #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<bool, string> 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<bool, string> 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 << "</" << latexname << ">";
+                       os << endl << string(depth, ' ');
+               os << "</" << latexname << '>';
        }
 
        if (!mixcont)