]> git.lyx.org Git - lyx.git/blobdiff - src/lyxtextclasslist.C
cleanup after svn hang-up, #undef CursorShape. Should be compilable ganin now.
[lyx.git] / src / lyxtextclasslist.C
index d0be70ff77546d8ab12b068dd67189481526bfa3..8c23fd2dc22450608c7659bb73cac146d043412e 100644 (file)
@@ -104,7 +104,7 @@ bool LyXTextClassList::read()
 
        if (real_file.empty()) {
                lyxerr << "LyXTextClassList::Read: unable to find "
-                       "textclass file  `" << makeDisplayPath(real_file, 1000)
+                       "textclass file  `" << lyx::to_utf8(makeDisplayPath(real_file, 1000))
                       << "'. Exiting." << endl;
                return false;
                // This causes LyX to end... Not a desirable behaviour. Lgb
@@ -122,7 +122,7 @@ bool LyXTextClassList::read()
 
        if (!lex.isOK()) {
                lyxerr << "LyXTextClassList::Read: unable to open "
-                       "textclass file  `" << makeDisplayPath(real_file, 1000)
+                       "textclass file  `" << lyx::to_utf8(makeDisplayPath(real_file, 1000))
                       << "'\nCheck your installation. LyX can't continue."
                       << endl;
                return false;
@@ -186,9 +186,9 @@ LyXTextClassList::addTextClass(std::string const & textclass, std::string const
                //
                // This is a C++ version of function processLayoutFile in configure.py,
                // which uses the following regex
-               //     \Declare(LaTeX|DocBook|LinuxDoc)Class\s*(\[([^,]*)(,.*)*\])*\s*{(.*)}
+               //     \Declare(LaTeX|DocBook)Class\s*(\[([^,]*)(,.*)*\])*\s*{(.*)}
                ifstream ifs(layout_file.c_str());
-               static regex const reg("^#\\s*\\\\Declare(LaTeX|DocBook|LinuxDoc)Class\\s*"
+               static regex const reg("^#\\s*\\\\Declare(LaTeX|DocBook)Class\\s*"
                        "(?:\\[([^,]*)(?:,.*)*\\])*\\s*\\{(.*)\\}\\s*");
                string line;
                while (getline(ifs, line)) {
@@ -217,15 +217,16 @@ LyXTextClassList textclasslist;
 
 
 // Reads the style files
-void LyXSetStyle()
+bool LyXSetStyle()
 {
        lyxerr[Debug::TCLASS] << "LyXSetStyle: parsing configuration..." << endl;
 
        if (!textclasslist.read()) {
                lyxerr[Debug::TCLASS] << "LyXSetStyle: an error occured "
                        "during parsing.\n             Exiting." << endl;
-               exit(1);
+               return false;
        }
 
        lyxerr[Debug::TCLASS] << "LyXSetStyle: configuration parsed." << endl;
+       return true;
 }