]> git.lyx.org Git - lyx.git/blobdiff - src/lastfiles.C
I reactivate the code to resize the InsetText on a resize event of the main
[lyx.git] / src / lastfiles.C
index 088a1d73e03e44929d857463307ff94a1d34321d..477b13f8c6e001ab7944a5b8c7ebbe058e36ef71 100644 (file)
 #pragma implementation
 #endif
 
+#include "lastfiles.h"
+#include "debug.h"
+
+#include "support/FileInfo.h"
+
 #include <fstream>
 #include <algorithm>
+#include <iterator>
 
-#include "support/FileInfo.h"
-#include "lastfiles.h"
-#include "debug.h"
 
+using std::ifstream;
+using std::ofstream;
 using std::getline;
 using std::endl;
+using std::find;
+using std::copy;
+using std::ostream_iterator;
 
 
 LastFiles::LastFiles(string const & filename, bool st, unsigned int num)
@@ -51,7 +59,7 @@ void LastFiles::readFile(string const & filename)
 {
        // we will not complain if we can't find filename nor will
        // we issue a warning. (Lgb)
-       std::ifstream ifs(filename.c_str());
+       ifstream ifs(filename.c_str());
        string tmp;
        FileInfo fileInfo;
 
@@ -68,10 +76,10 @@ void LastFiles::readFile(string const & filename)
 
 void LastFiles::writeFile(string const & filename) const
 {
-       std::ofstream ofs(filename.c_str());
+       ofstream ofs(filename.c_str());
        if (ofs) {
-               std::copy(files.begin(), files.end(),
-                         std::ostream_iterator<string>(ofs, "\n"));
+               copy(files.begin(), files.end(),
+                    ostream_iterator<string>(ofs, "\n"));
        } else
                lyxerr << "LyX: Warning: unable to save LastFiles: "
                       << filename << endl;
@@ -81,7 +89,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 = std::find(files.begin(), files.end(), file);
+       Files::iterator it = find(files.begin(), files.end(), file);
        if (it != files.end())
                files.erase(it);
        files.push_front(file);