]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/MathAutoCorrect.cpp
Do some caching of window title and related UI
[lyx.git] / src / mathed / MathAutoCorrect.cpp
index caa81cff9bc945aec9f16c22569d6e0c8b8bba88..3e1405b3dc6b97f2647447e1993903aca4e7be7c 100644 (file)
@@ -3,7 +3,7 @@
  * This file is part of LyX, the document processor.
  * Licence details can be found in the file COPYING.
  *
- * \author André Pönitz
+ * \author André Pönitz
  *
  * Full author contact details are available in file CREDITS.
  */
 #include "InsetMath.h"
 #include "MathSupport.h"
 #include "MathParser.h"
-#include "debug.h"
 
+#include "support/debug.h"
+#include "support/FileName.h"
 #include "support/filetools.h" //  LibFileSearch
 #include "support/docstream.h"
 
 #include <fstream>
 #include <sstream>
 
+using namespace std;
 
 namespace lyx {
 
 using support::libFileSearch;
 
-using std::string;
-using std::ifstream;
-using std::endl;
-using std::vector;
-
 namespace {
 
 class Correction {
@@ -97,6 +94,7 @@ bool Correction::correct(MathAtom & at, char_type c) const
 }
 
 
+#if 0
 idocstream & operator>>(idocstream & is, Correction & corr)
 {
        corr.read(is);
@@ -109,7 +107,7 @@ odocstream & operator<<(odocstream & os, Correction & corr)
        corr.write(os);
        return os;
 }
-
+#endif
 
 
 
@@ -152,7 +150,7 @@ void initAutoCorrect()
        string line;
        ifstream is(file.toFilesystemEncoding().c_str());
        while (getline(is, line)) {
-               if (line.size() == 0 || line[0] == '#') {
+               if (line.empty() || line[0] == '#') {
                        //LYXERR(Debug::MATHED, "ignoring line '" << line << '\'');
                        continue;
                }
@@ -173,7 +171,7 @@ void initAutoCorrect()
 } // namespace anon
 
 
-bool math_autocorrect(MathAtom & at, char c)
+bool math_autocorrect(MathAtom & at, char_type c)
 {
        static bool initialized = false;