]> git.lyx.org Git - lyx.git/blobdiff - src/lastfiles.C
Fix working of the spellchecker dialog with ispell when there are no
[lyx.git] / src / lastfiles.C
index 144066da602703189d58b99e771b51d691785add..5076e40a7f78259442de1dada48bad9be011a995 100644 (file)
@@ -4,7 +4,7 @@
  *           LyX, The Document Processor
  *      
  *           Copyright 1995 Matthias Ettrich
- *           Copyright 1995-2000 The LyX Team.
+ *           Copyright 1995-2001 The LyX Team.
  *
  * ====================================================== */
 
 
 #include <fstream>
 #include <algorithm>
-using std::ifstream;
-using std::ofstream;
-using std::copy;
-using std::ostream_iterator;
-
-using std::find;
 
 #include "support/FileInfo.h"
 #include "lastfiles.h"
 #include "debug.h"
 
+using std::getline;
+using std::endl;
+
+
 LastFiles::LastFiles(string const & filename, bool st, unsigned int num)
        : dostat(st)
 {
@@ -53,7 +51,7 @@ void LastFiles::readFile(string const & filename)
 {
        // we will not complain if we can't find filename nor will
        // we issue a warning. (Lgb)
-       ifstream ifs(filename.c_str());
+       std::ifstream ifs(filename.c_str());
        string tmp;
        FileInfo fileInfo;
 
@@ -70,10 +68,10 @@ void LastFiles::readFile(string const & filename)
 
 void LastFiles::writeFile(string const & filename) const
 {
-       ofstream ofs(filename.c_str());
+       std::ofstream ofs(filename.c_str());
        if (ofs) {
-               copy(files.begin(), files.end(),
-                    ostream_iterator<string>(ofs, "\n"));
+               std::copy(files.begin(), files.end(),
+                         std::ostream_iterator<string>(ofs, "\n"));
        } else
                lyxerr << "LyX: Warning: unable to save LastFiles: "
                       << filename << endl;
@@ -83,7 +81,7 @@ void LastFiles::writeFile(string const & filename) const
 void LastFiles::newFile(string const & file)
 {
        // If file already exist, delete it and reinsert at front.
-       Files::iterator it = find(files.begin(), files.end(), file);
+       Files::iterator it = std::find(files.begin(), files.end(), file);
        if (it != files.end())
                files.erase(it);
        files.push_front(file);
@@ -92,7 +90,7 @@ void LastFiles::newFile(string const & file)
 }
 
 
-string LastFiles::operator[](unsigned int i) const
+string const LastFiles::operator[](unsigned int i) const
 {
        if (i < files.size())
                return files[i];