/**
* \file sgml.C
- * Copyright 2002 the LyX Team
- * Read the file COPYING
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
*
* \author José Matos
- * \author John Levon <levon@movementarian.org>
+ * \author John Levon
+ *
+ * Full author contact details are available in file CREDITS.
*/
#include <config.h>
-#include "support/LOstream.h"
+#include "support/std_ostream.h"
#include "paragraph.h"
#include "sgml.h"
-using std::pair;
+using std::endl;
using std::make_pair;
+
using std::ostream;
-using std::endl;
+using std::pair;
+using std::string;
+
namespace sgml {
string str;
switch (c) {
- case Paragraph::META_HFILL:
- break;
- case Paragraph::META_NEWLINE:
- str = '\n';
- break;
case ' ':
return make_pair(true, string(" "));
break;
{
if (!latexname.empty() && latexname != "!-- --") {
if (!mixcont)
- os << string(" ", depth);
- os << "<" << latexname << ">";
+ os << string(depth, ' ');
+ os << '<' << latexname << '>';
}
if (!mixcont)
{
if (!latexname.empty() && latexname != "!-- --") {
if (!mixcont)
- os << endl << string(" ", depth);
- os << "</" << latexname << ">";
+ os << endl << string(depth, ' ');
+ os << "</" << latexname << '>';
}
if (!mixcont)
return !mixcont;
}
+
+unsigned int closeEnvTags(ostream & ofs, bool mixcont,
+ string const & environment_inner_depth,
+ lyx::depth_type total_depth)
+{
+ unsigned int lines;
+ if (environment_inner_depth != "!-- --") {
+ string item_name= "listitem";
+ lines += closeTag(ofs, total_depth, mixcont, item_name);
+ if (environment_inner_depth == "varlistentry")
+ lines += closeTag(ofs, total_depth, mixcont,
+ environment_inner_depth);
+ }
+ return lines;
+}
+
+
} // namespace sgml