From 8d10d82392aab330c2460d468dfa86ddd863c3c0 Mon Sep 17 00:00:00 2001 From: Vincent van Ravesteijn Date: Tue, 26 Oct 2010 13:27:06 +0000 Subject: [PATCH] Buffer: Rename function names: - rename readFromVC to extractFromVC because this function actually doesn't read anything as compared to readEmergency, readAutosave and so on. - rename readEmergency and readAutosave to loadEmergency and loadAutosave just like loadLyXFile and loadThisLyXFile. Only in loadThisLyXFile we switch to the actually reading of a file. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35854 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/Buffer.cpp | 12 ++++++------ src/Buffer.h | 10 +++++----- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Buffer.cpp b/src/Buffer.cpp index 877329b4af..ad14807e10 100644 --- a/src/Buffer.cpp +++ b/src/Buffer.cpp @@ -3604,7 +3604,7 @@ vector Buffer::backends() const } -Buffer::ReadStatus Buffer::readFromVC(FileName const & fn) +Buffer::ReadStatus Buffer::extractFromVC(FileName const & fn) { bool const found = LyXVC::file_not_found_hook(fn); if (!found) @@ -3615,7 +3615,7 @@ Buffer::ReadStatus Buffer::readFromVC(FileName const & fn) } -Buffer::ReadStatus Buffer::readEmergency(FileName const & fn) +Buffer::ReadStatus Buffer::loadEmergency(FileName const & fn) { FileName const emergencyFile = getEmergencyFileNameFor(fn); if (!emergencyFile.exists() @@ -3672,7 +3672,7 @@ Buffer::ReadStatus Buffer::readEmergency(FileName const & fn) } -Buffer::ReadStatus Buffer::readAutosave(FileName const & fn) +Buffer::ReadStatus Buffer::loadAutosave(FileName const & fn) { // Now check if autosave file is newer. FileName const autosaveFile = getAutosaveFileNameFor(fn); @@ -3712,16 +3712,16 @@ Buffer::ReadStatus Buffer::readAutosave(FileName const & fn) Buffer::ReadStatus Buffer::loadLyXFile(FileName const & fn) { if (!fn.isReadableFile()) { - ReadStatus const ret_rvc = readFromVC(fn); + ReadStatus const ret_rvc = extractFromVC(fn); if (ret_rvc != ReadSuccess) return ret_rvc; } - ReadStatus const ret_re = readEmergency(fn); + ReadStatus const ret_re = loadEmergency(fn); if (ret_re == ReadSuccess || ret_re == ReadCancel) return ret_re; - ReadStatus const ret_ra = readAutosave(fn); + ReadStatus const ret_ra = loadAutosave(fn); if (ret_ra == ReadSuccess || ret_ra == ReadCancel) return ret_ra; diff --git a/src/Buffer.h b/src/Buffer.h index deb66ee497..ec20f33f2d 100644 --- a/src/Buffer.h +++ b/src/Buffer.h @@ -216,7 +216,7 @@ private: /// before reading if the file cannot be found. This is only /// implemented for RCS. /// \sa LyXVC::file_not_found_hook - ReadStatus readFromVC(support::FileName const & fn); + ReadStatus extractFromVC(support::FileName const & fn); /// Reads the first tag of a LyX File and /// returns the file format number. ReadStatus parseLyXFormat(Lexer & lex, support::FileName const & fn, @@ -247,14 +247,14 @@ public: support::FileName getAutosaveFileName() const; private: - /// Try to read an autosave file associated to \c fn. - ReadStatus readAutosave(support::FileName const & fn); + /// Try to load an autosave file associated to \c fn. + ReadStatus loadAutosave(support::FileName const & fn); /// Get the filename of the autosave file associated with \c fn support::FileName getAutosaveFileNameFor(support::FileName const & fn) const; - /// Try to read an emergency file associated to \c fn. - ReadStatus readEmergency(support::FileName const & fn); + /// Try to load an emergency file associated to \c fn. + ReadStatus loadEmergency(support::FileName const & fn); /// Get the filename of the emergency file associated with the Buffer support::FileName getEmergencyFileName() const; /// Get the filename of the emergency file associated with \c fn -- 2.39.2