]> git.lyx.org Git - features.git/blobdiff - src/paragraph.C
new code for max depth; time to recompile your tree :)
[features.git] / src / paragraph.C
index 3f29163e4a8802b4dc08b9db33762b8dc4469ea5..b82a9d06175cb3b889b52a4cc9fb2d7756b196ab 100644 (file)
@@ -1054,6 +1054,18 @@ Paragraph::depth_type Paragraph::getDepth() const
 }
 
 
+Paragraph::depth_type Paragraph::getMaxDepthAfter(Buffer const * buffer) const
+{
+       const bool isenv = textclasslist.Style(buffer->params.textclass,
+                                              getLayout()).isEnvironment();
+
+       if (isenv)
+               return params().depth() + 1;
+       else
+               return params().depth();
+
+}
+
 char Paragraph::getAlign() const
 {
        return params().align();