Functions | |
| pair< bool, string > | escapeChar (char c) |
| Escape the given character if necessary to an SGML entity. More... | |
| int | openTag (ostream &os, Paragraph::depth_type depth, bool mixcont, string const &latexname) |
| FIXME. More... | |
| int | closeTag (ostream &os, Paragraph::depth_type depth, bool mixcont, string const &latexname) |
| FIXME. More... | |
|
||||||||||||||||||||
|
FIXME.
Definition at line 98 of file sgml.C. Referenced by InsetText::docbook, Buffer::makeDocBookFile, and Buffer::makeLinuxDocFile.
00100 {
00101 if (!latexname.empty() && latexname != "!-- --") {
00102 if (!mixcont)
00103 os << endl << string(depth, ' ');
00104 os << "</" << latexname << '>';
00105 }
00106
00107 if (!mixcont)
00108 os << endl;
00109
00110 return !mixcont;
00111 }
|
|
|
Escape the given character if necessary to an SGML entity. Returns true if it was a whitespace character. Definition at line 24 of file sgml.C. Referenced by Buffer::simpleDocBookOnePar, and Buffer::simpleLinuxDocOnePar.
00025 {
00026 string str;
00027
00028 switch (c) {
00029 case ' ':
00030 return make_pair(true, string(" "));
00031 break;
00032 case '\0': // Ignore :-)
00033 str.erase();
00034 break;
00035 case '&':
00036 str = "&";
00037 break;
00038 case '<':
00039 str = "<";
00040 break;
00041 case '>':
00042 str = ">";
00043 break;
00044 case '$':
00045 str = "$";
00046 break;
00047 case '#':
00048 str = "#";
00049 break;
00050 case '%':
00051 str = "%";
00052 break;
00053 case '[':
00054 str = "[";
00055 break;
00056 case ']':
00057 str = "]";
00058 break;
00059 case '{':
00060 str = "{";
00061 break;
00062 case '}':
00063 str = "}";
00064 break;
00065 case '~':
00066 str = "˜";
00067 break;
00068 case '"':
00069 str = """;
00070 break;
00071 case '\\':
00072 str = "\";
00073 break;
00074 default:
00075 str = c;
00076 break;
00077 }
00078 return make_pair(false, str);
00079 }
|
|
||||||||||||||||||||
|
FIXME.
Definition at line 82 of file sgml.C. Referenced by InsetText::docbook, Buffer::makeDocBookFile, and Buffer::makeLinuxDocFile.
00084 {
00085 if (!latexname.empty() && latexname != "!-- --") {
00086 if (!mixcont)
00087 os << string(depth, ' ');
00088 os << '<' << latexname << '>';
00089 }
00090
00091 if (!mixcont)
00092 os << endl;
00093
00094 return !mixcont;
00095 }
|
1.2.14 written by Dimitri van Heesch,
© 1997-2002