]> git.lyx.org Git - lyx.git/blobdiff - src/bufferparams.C
Fix deleting of paragraphs after undo (fix #236).
[lyx.git] / src / bufferparams.C
index 0a6466b1583caeec1c2673308eae51c58e1aba52..179d26604b29ace0e2819023742dd6d73a333c36 100644 (file)
@@ -9,10 +9,9 @@
  * ====================================================== */
 
 #include <config.h>
-#include <cstdlib>
 
 #ifdef __GNUG__
-#pragma implementation "bufferparams.h"
+#pragma implementation
 #endif
 
 #include "bufferparams.h"
 #include "layout.h"
 #include "vspace.h"
 #include "debug.h"
-#include "support/lyxlib.h"
-#include "support/lstrings.h"
 #include "lyxrc.h"
 #include "language.h"
+#include "lyxtextclasslist.h"
+
+#include "support/lyxlib.h"
+#include "support/lstrings.h"
+
+#include <cstdlib>
 
 using std::ostream;
 using std::endl;
@@ -72,7 +75,7 @@ void BufferParams::writeFile(ostream & os) const
        // Prints out the buffer info into the .lyx file given by file
 
        // the textclass
-       os << "\\textclass " << textclasslist.NameOfClass(textclass) << '\n';
+       os << "\\textclass " << textclasslist[textclass].name() << '\n';
        
        // then the the preamble
        if (!preamble.empty()) {
@@ -168,9 +171,9 @@ void BufferParams::writeFile(ostream & os) const
                        }
                        else {
                                os << "\\bulletLaTeX " << i
-                                  << "\n\t"
+                                  << "\n\t\""
                                   << user_defined_bullets[i].getText()
-                                  << "\n\\end_bullet\n";
+                                  << "\"\n\\end_bullet\n";
                        }
                }
        }
@@ -206,7 +209,7 @@ void BufferParams::setPaperStuff()
 
 void BufferParams::useClassDefaults()
 {
-       LyXTextClass const & tclass = textclasslist.TextClass(textclass);
+       LyXTextClass const & tclass = textclasslist[textclass];
 
        sides = tclass.sides();
        columns = tclass.columns();
@@ -219,7 +222,7 @@ void BufferParams::useClassDefaults()
 
 bool BufferParams::hasClassDefaults() const
 {
-       LyXTextClass const & tclass = textclasslist.TextClass(textclass);
+       LyXTextClass const & tclass = textclasslist[textclass];
        
        return (sides == tclass.sides()
                && columns == tclass.columns()