]> git.lyx.org Git - lyx.git/blobdiff - src/sgml.C
make dispatch_result_t ctor of DispatchResult explicit
[lyx.git] / src / sgml.C
index a8ff48dad040b17a9e658bc063f251b08428dc38..cb6292f1ec28c47d49124d0d3a19cb674e090841 100644 (file)
 
 #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 {
 
@@ -112,4 +115,21 @@ int closeTag(ostream & os, Paragraph::depth_type depth,
        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