]> git.lyx.org Git - lyx.git/blobdiff - src/BufferView.C
last Friday's text*.C -> text_func shuffle
[lyx.git] / src / BufferView.C
index 7b8a4cfa33a8e5cacf7ba0301b4e22ff404566e7..5f34fa5885a692ce0df9df8c0f44399295a840be 100644 (file)
@@ -3,7 +3,7 @@
  * Copyright 1995-2002 the LyX Team
  * Read the file COPYING
  *
- * \author unknown
+ * \author Lars Gullik Bjønnes
  * \author John Levon <moz@compsoc.man.ac.uk>
  */
 
@@ -36,7 +36,6 @@
 #include "frontends/screen.h"
 
 #include "insets/insetcommand.h" // ChangeRefs
-#include "insets/inseterror.h"
 #include "insets/updatableinset.h"
 
 #include "support/FileInfo.h"
@@ -50,6 +49,7 @@
 extern BufferList bufferlist;
 
 using lyx::pos_type;
+using namespace lyx::support;
 
 using std::pair;
 using std::endl;
@@ -104,11 +104,17 @@ void BufferView::buffer(Buffer * b)
 }
 
 
+bool BufferView::loadLyXFile(string const & fn, bool tl)
+{
+       return pimpl_->loadLyXFile(fn, tl);
+}
+
+
 void BufferView::reload()
 {
        string const fn = buffer()->fileName();
        if (bufferlist.close(buffer(), false))
-               buffer(bufferlist.loadLyXFile(fn));
+               loadLyXFile(fn);
 }
 
 
@@ -331,30 +337,12 @@ bool BufferView::insertLyXFile(string const & filen)
 }
 
 
-void BufferView::resetErrorList()
-{
-       pimpl_->errorlist_.clear();
-}
-
-
-void BufferView::setErrorList(ErrorList const & el)
-{
-       pimpl_->errorlist_ = el;
-}
-
-
-void BufferView::addError(ErrorItem const & ei)
-{
-       pimpl_->errorlist_.push_back(ei);
-
-}
-
-
 void BufferView::showErrorList(string const & action) const
 {
        if (getErrorList().size()) {
                string const title = bformat(_("LyX: %1$s errors (%2$s)"), action, buffer()->fileName());
                owner()->getDialogs().show("errorlist", title);
+               pimpl_->errorlist_.clear();
        }
 }
 
@@ -649,7 +637,7 @@ bool BufferView::ChangeInsets(Inset::Code code,
                                text->setCursorIntern(it.pit(), 0);
                                text->redoParagraphs(text->cursor,
                                                     boost::next(text->cursor.par()));
-                               text->fullRebreak();
+                               text->partialRebreak();
                        }
                }
        }