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
This commit is contained in:
Vincent van Ravesteijn 2010-10-26 13:27:06 +00:00
parent 6ba6d4120d
commit 8d10d82392
2 changed files with 11 additions and 11 deletions

View File

@ -3604,7 +3604,7 @@ vector<string> 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;

View File

@ -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