]> git.lyx.org Git - lyx.git/blobdiff - src/toc.cpp
This patch revert part of the code changed in revision 18825. This is needed because...
[lyx.git] / src / toc.cpp
index e1e263115e2625a32e21a6bb0c21bd6a9d47471b..1cb974941e42a176663eae66205aef67cde9b673 100644 (file)
@@ -17,7 +17,7 @@
 #include "Buffer.h"
 #include "BufferParams.h"
 #include "FuncRequest.h"
-#include "LyXText.h"
+#include "Text.h"
 #include "LyXAction.h"
 #include "Paragraph.h"
 #include "ParIterator.h"
@@ -41,10 +41,10 @@ void outline(OutlineOp mode,  Cursor & cur)
        ParagraphList::iterator finish = start;
        ParagraphList::iterator end = pars.end();
 
-       LyXTextClass::const_iterator lit =
-               buf->params().getLyXTextClass().begin();
-       LyXTextClass::const_iterator const lend =
-               buf->params().getLyXTextClass().end();
+       TextClass::const_iterator lit =
+               buf->params().getTextClass().begin();
+       TextClass::const_iterator const lend =
+               buf->params().getTextClass().end();
 
        int const thistoclevel = start->layout()->toclevel;
        int toclevel;
@@ -56,7 +56,7 @@ void outline(OutlineOp mode,  Cursor & cur)
                        // Seek the one (on same level) below
                        for (; finish != end; ++finish) {
                                toclevel = finish->layout()->toclevel;
-                               if (toclevel != LyXLayout::NOT_IN_TOC
+                               if (toclevel != Layout::NOT_IN_TOC
                                    && toclevel <= thistoclevel) {
                                        break;
                                }
@@ -70,10 +70,10 @@ void outline(OutlineOp mode,  Cursor & cur)
                                --dest;
                                toclevel = dest->layout()->toclevel;
                        } while(dest != bgn
-                               && (toclevel == LyXLayout::NOT_IN_TOC
+                               && (toclevel == Layout::NOT_IN_TOC
                                    || toclevel > thistoclevel));
                        // Not found; do nothing
-                       if (toclevel == LyXLayout::NOT_IN_TOC
+                       if (toclevel == Layout::NOT_IN_TOC
                            || toclevel > thistoclevel)
                                break;
                        pit_type const newpit = std::distance(bgn, dest);
@@ -88,12 +88,12 @@ void outline(OutlineOp mode,  Cursor & cur)
                }
                case Down: {
                        // Go down out of current header:
-                       if (finish != end)
+                       if (finish != end)
                                ++finish;
                        // Find next same-level header:
                        for (; finish != end; ++finish) {
                                toclevel = finish->layout()->toclevel;
-                               if (toclevel != LyXLayout::NOT_IN_TOC
+                               if (toclevel != Layout::NOT_IN_TOC
                                    && toclevel <= thistoclevel) {
                                        break;
                                }
@@ -107,7 +107,7 @@ void outline(OutlineOp mode,  Cursor & cur)
                        // Go further down to find header to insert in front of:
                        for (; dest != end; ++dest) {
                                toclevel = dest->layout()->toclevel;
-                               if (toclevel != LyXLayout::NOT_IN_TOC
+                               if (toclevel != Layout::NOT_IN_TOC
                                    && toclevel <= thistoclevel) {
                                        break;
                                }