]> git.lyx.org Git - lyx.git/blobdiff - src/bufferlist.C
ws changes only
[lyx.git] / src / bufferlist.C
index bde19e7383e3c5b0832155eca584e466f4623e4a..d1b215bf86f454e9f377b8279ad238139ff97360 100644 (file)
@@ -12,7 +12,9 @@
 
 #include "bufferlist.h"
 
+#include "author.h"
 #include "buffer.h"
+#include "bufferparams.h"
 #include "debug.h"
 #include "gettext.h"
 #include "lastfiles.h"
 #include "frontends/Alert.h"
 
 #include "support/filetools.h"
-#include "support/LAssert.h"
 #include "support/lyxfunctional.h"
 
 #include <boost/bind.hpp>
 
-using namespace lyx::support;
+using lyx::support::AddName;
+using lyx::support::bformat;
+using lyx::support::GetEnvPath;
+using lyx::support::MakeAbsPath;
+using lyx::support::MakeDisplayPath;
+using lyx::support::OnlyFilename;
+using lyx::support::removeAutosaveFile;
 
-using std::vector;
-using std::find;
 using std::endl;
+using std::find;
 using std::find_if;
 using std::for_each;
-using std::mem_fun;
+using std::string;
+using std::vector;
 
 
 BufferList::BufferList()
@@ -108,7 +115,7 @@ bool BufferList::quitWriteAll()
 
 void BufferList::release(Buffer * buf)
 {
-       Assert(buf);
+       BOOST_ASSERT(buf);
        BufferStorage::iterator it = find(bstore.begin(), bstore.end(), buf);
        if (it != bstore.end()) {
                // Make sure that we don't store a LyXText in
@@ -125,7 +132,7 @@ void BufferList::release(Buffer * buf)
 Buffer * BufferList::newBuffer(string const & s, bool ronly)
 {
        Buffer * tmpbuf = new Buffer(s, ronly);
-       tmpbuf->params.useClassDefaults();
+       tmpbuf->params().useClassDefaults();
        lyxerr[Debug::INFO] << "Assigning to buffer "
                            << bstore.size() << endl;
        bstore.push_back(tmpbuf);
@@ -147,10 +154,10 @@ void BufferList::closeAll()
 
 bool BufferList::close(Buffer * buf, bool ask)
 {
-       Assert(buf);
+       BOOST_ASSERT(buf);
 
        // FIXME: is the quitting check still necessary ?
-       if (!ask || buf->isClean() || quitting || buf->paragraphs.empty()) {
+       if (!ask || buf->isClean() || quitting || buf->paragraphs().empty()) {
                release(buf);
                return true;
        }
@@ -306,8 +313,7 @@ bool BufferList::exists(string const & s) const
 
 bool BufferList::isLoaded(Buffer const * b) const
 {
-       Assert(b);
-       
+       BOOST_ASSERT(b);
        BufferStorage::const_iterator cit =
                find(bstore.begin(), bstore.end(), b);
        return cit != bstore.end();
@@ -328,6 +334,6 @@ void BufferList::setCurrentAuthor(string const & name, string const & email)
        BufferStorage::iterator it = bstore.begin();
        BufferStorage::iterator end = bstore.end();
        for (; it != end; ++it) {
-               (*it)->authors().record(0, Author(name, email));
+               (*it)->params().authors().record(0, Author(name, email));
        }
 }