]> git.lyx.org Git - features.git/commitdiff
Buffer: Rename function names:
authorVincent van Ravesteijn <vfr@lyx.org>
Tue, 26 Oct 2010 13:27:06 +0000 (13:27 +0000)
committerVincent van Ravesteijn <vfr@lyx.org>
Tue, 26 Oct 2010 13:27:06 +0000 (13:27 +0000)
- 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
src/Buffer.h

index 877329b4aff184e490b4f5a032ef962d37188c64..ad14807e10f4bc30a11d27b554f94eab00274dd4 100644 (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;
 
index deb66ee4975b056724c7f0ec947c60eff7c4e199..ec20f33f2d165fa19c4ed83c187209af72a62987 100644 (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