]> git.lyx.org Git - features.git/blobdiff - src/bufferlist.C
make ParagraphList::push_back take a reference instead of a pointer.
[features.git] / src / bufferlist.C
index a32bafd2a4386f7dd0ce34e257f8b5a4e4b4c65e..25faf205fbc3bb15d5cfe814f01ceb1d8fd9aec7 100644 (file)
@@ -13,6 +13,7 @@
 #include "bufferlist.h"
 #include "lyx_main.h"
 #include "lastfiles.h"
+#include "buffer.h"
 #include "debug.h"
 #include "lyxrc.h"
 #include "lyxtext.h"
@@ -235,7 +236,7 @@ void BufferList::updateIncludedTeXfiles(string const & mastertmpdir,
                        writefile += '/';
                        writefile += (*it)->getLatexName();
                        (*it)->makeLaTeXFile(writefile, mastertmpdir,
-                                            runparams, false, true);
+                                            runparams, true);
                        (*it)->markDepClean(mastertmpdir);
                }
        }
@@ -361,7 +362,7 @@ Buffer * BufferList::readFile(string const & s, bool ronly)
                        if (fileInfoA.getModificationTime()
                            > fileInfo2.getModificationTime()) {
                                string const file = MakeDisplayPath(s, 20);
-                               string text = bformat(_("The backup of the document %1$s is newer.\n\n" 
+                               string text = bformat(_("The backup of the document %1$s is newer.\n\n"
                                        "Load the backup instead?"), file);
                                int const ret = Alert::prompt(_("Load backup?"),
                                        text, 0, 1, _("&Load backup"), _("Load &original"));
@@ -441,11 +442,11 @@ Buffer * BufferList::newFile(string const & name, string tname, bool isNamed)
                                "could not be read."), file);
                        Alert::error(_("Could not read template"), text);
                        // no template, start with empty buffer
-                       b->paragraphs.push_back(new Paragraph);
+                       b->paragraphs.push_back(Paragraph());
                        b->paragraphs.begin()->layout(b->params.getLyXTextClass().defaultLayout());
                }
        } else {  // start with empty buffer
-               b->paragraphs.push_back(new Paragraph);
+               b->paragraphs.push_back(Paragraph());
                b->paragraphs.begin()->layout(b->params.getLyXTextClass().defaultLayout());
        }