]> git.lyx.org Git - lyx.git/blobdiff - src/buffer_funcs.cpp
Output end of math environments at the beginning of a new line,
[lyx.git] / src / buffer_funcs.cpp
index 6b582b68024e82315136b0c70c9df817f6fd143f..468a2589eefd9e2cc4c3b88ebf77a46fb8f6a9a8 100644 (file)
@@ -75,7 +75,7 @@ Buffer * checkAndLoadLyXFile(FileName const & filename, bool const acceptDirty)
                if (!Alert::prompt(_("Reload saved document?"),
                          text, 0, 1,  _("&Reload"), _("&Keep Changes"))) {
                        // reload the document
-                       if (!checkBuffer->reload())
+                       if (checkBuffer->reload() != Buffer::ReadSuccess)
                                return 0;
                }
                return checkBuffer;
@@ -94,7 +94,7 @@ Buffer * checkAndLoadLyXFile(FileName const & filename, bool const acceptDirty)
                        // Buffer creation is not possible.
                        return 0;
                }
-               if (!b->loadLyXFile(filename)) {
+               if (b->loadLyXFile() != Buffer::ReadSuccess) {
                        // do not save an emergency file when releasing the buffer
                        b->markClean();
                        theBufferList().release(b);
@@ -132,7 +132,7 @@ Buffer * newFile(string const & filename, string const & templatename,
                tname = makeAbsPath(templatename);
 
        if (!tname.empty()) {
-               if (!b->readFile(tname)) {
+               if (b->loadThisLyXFile(tname) != Buffer::ReadSuccess) {
                        docstring const file = makeDisplayPath(tname.absFileName(), 50);
                        docstring const text  = bformat(
                                _("The specified document template\n%1$s\ncould not be read."),
@@ -268,7 +268,7 @@ Buffer * loadIfNeeded(FileName const & fname)
                        // Buffer creation is not possible.
                        return 0;
 
-               if (!buffer->loadLyXFile(fname)) {
+               if (buffer->loadLyXFile() != Buffer::ReadSuccess) {
                        //close the buffer we just opened
                        theBufferList().release(buffer);
                        return 0;