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;
// Buffer creation is not possible.
return 0;
}
- if (!b->loadLyXFile(filename)) {
+ if (b->loadLyXFile(filename) != Buffer::ReadSuccess) {
// do not save an emergency file when releasing the buffer
b->markClean();
theBufferList().release(b);
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."),
// Buffer creation is not possible.
return 0;
- if (!buffer->loadLyXFile(fname)) {
+ if (buffer->loadLyXFile(fname) != Buffer::ReadSuccess) {
//close the buffer we just opened
theBufferList().release(buffer);
return 0;