]> git.lyx.org Git - lyx.git/blobdiff - src/InsetList.C
the spellcheck cleanup
[lyx.git] / src / InsetList.C
index b1efab3835b4eb25edc65566dcb6a9a737793d40..ef21a07310844db2f847a41a67fd987bca28c7eb 100644 (file)
 #include <config.h>
 
 #include "InsetList.h"
-#include "BufferView.h"
+
 #include "buffer.h"
+#include "bufferparams.h"
+#include "BufferView.h"
 #include "debug.h"
 
 #include "insets/insetbranch.h"
@@ -180,11 +182,9 @@ void InsetList::deleteInsetsLyXText(BufferView * bv)
        List::iterator it = list.begin();
        List::iterator end = list.end();
        for (; it != end; ++it) {
-               if (it->inset) {
-                       if (it->inset->isTextInset()) {
-                               static_cast<UpdatableInset*>
-                                       (it->inset)->deleteLyXText(bv, true);
-                       }
+               if (it->inset && it->inset->isTextInset()) {
+                       static_cast<UpdatableInset*>
+                               (it->inset)->deleteLyXText(bv, true);
                }
        }
 }
@@ -192,13 +192,13 @@ void InsetList::deleteInsetsLyXText(BufferView * bv)
 
 void InsetList::insetsOpenCloseBranch(BufferView * bv)
 {
-       BufferParams bp = bv->buffer()->params;
+       BufferParams bp = bv->buffer()->params();
        List::iterator it = list.begin();
        List::iterator end = list.end();
        for (; it != end; ++it) {
                if (it->inset && it->inset->lyxCode() == InsetOld::BRANCH_CODE) {
                        InsetBranch * inset = static_cast<InsetBranch *>(it->inset);
-                       if (bp.branchlist.selected(inset->params().branch)) {
+                       if (bp.branchlist().selected(inset->params().branch)) {
                                inset->open(bv);
                        } else {
                                inset->close(bv);