]> git.lyx.org Git - lyx.git/blobdiff - src/bufferparams.C
Fix working of the spellchecker dialog with ispell when there are no
[lyx.git] / src / bufferparams.C
index 9524c5c82ed2364f7aaff7b16a7cd1a4bd2b4a8a..958800c69ec873d923ddb8a339e1603339fff646 100644 (file)
@@ -177,7 +177,8 @@ void BufferParams::writeFile(ostream & os) const
 }
 
 
-void BufferParams::useClassDefaults() {
+void BufferParams::useClassDefaults()
+{
        LyXTextClass const & tclass = textclasslist.TextClass(textclass);
 
        sides = tclass.sides();
@@ -189,9 +190,22 @@ void BufferParams::useClassDefaults() {
 }
 
 
+bool BufferParams::hasClassDefaults() const
+{
+       LyXTextClass const & tclass = textclasslist.TextClass(textclass);
+       
+       return (sides == tclass.sides()
+               && columns == tclass.columns()
+               && pagestyle == tclass.pagestyle()
+               && options == tclass.options()
+               && secnumdepth == tclass.secnumdepth()
+               && tocdepth == tclass.tocdepth());
+}
+
+
 void BufferParams::readPreamble(LyXLex & lex)
 {
-       if (lex.GetString() != "\\begin_preamble")
+       if (lex.getString() != "\\begin_preamble")
                lyxerr << "Error (BufferParams::readPreamble):"
                        "consistency check failed." << endl;
 
@@ -203,7 +217,7 @@ void BufferParams::readLanguage(LyXLex & lex)
 {
        if (!lex.next()) return;
        
-       string const tmptok = lex.GetString();
+       string const tmptok = lex.getString();
 
        // check if tmptok is part of tex_babel in tex-defs.h
        language = languages.getLanguage(tmptok);
@@ -221,7 +235,7 @@ void BufferParams::readGraphicsDriver(LyXLex & lex)
 {
        if (!lex.next()) return;
        
-       string const tmptok = lex.GetString();
+       string const tmptok = lex.getString();
        // check if tmptok is part of tex_graphics in tex_defs.h
        int n = 0;
        while (true) {