]> git.lyx.org Git - lyx.git/blobdiff - src/Buffer.h
Do not overwrite read-only files. We now move the file to the backup directory and...
[lyx.git] / src / Buffer.h
index 68f8b883171bc36a9051fe365d013cfffee81271..b91f36ffe67e35e2382e0bd9f0e27562e67fb06b 100644 (file)
@@ -202,14 +202,14 @@ public:
        bool readString(std::string const &);
        /// Reloads the LyX file
        ReadStatus reload();
-//FIXME: The following two functions should be private
+//FIXME: The following function should be private
 //private:
        /// read the header, returns number of unknown tokens
        int readHeader(Lexer & lex);
-       /// save timestamp and checksum of the given file.
-       void saveCheckSum() const;
 
 private:
+       /// save timestamp and checksum of the given file.
+       void saveCheckSum() const;      
        /// read a new file
        ReadStatus readFile(support::FileName const & fn);
        /// Reads a file without header.
@@ -241,14 +241,10 @@ public:
        /// \return a status message towards the user.
        docstring emergencyWrite();
 
-//FIXME:The following three functions should be private
+//FIXME:The following function should be private
 //private:
        ///
        void removeAutosaveFile() const;
-       ///
-       void moveAutosaveFile(support::FileName const & old) const;
-       /// Get the filename of the autosave file associated with the Buffer
-       support::FileName getAutosaveFileName() const;
        
 private:
        /// Try to load an autosave file associated to \c fn.
@@ -257,6 +253,10 @@ private:
        ReadStatus loadEmergency();
        /// Get the filename of the emergency file associated with the Buffer
        support::FileName getEmergencyFileName() const;
+       /// Get the filename of the autosave file associated with the Buffer
+       support::FileName getAutosaveFileName() const;
+       ///
+       void moveAutosaveFile(support::FileName const & old) const;
        //@}
 
 public:
@@ -365,9 +365,6 @@ public:
        /// Get the name and type of the log.
        std::string logName(LogType * type = 0) const;
 
-       /// Change name of buffer. Updates "read-only" flag.
-       void setFileName(std::string const & newfile);
-
        /// Set document's parent Buffer.
        void setParent(Buffer const *);
        Buffer const * parent() const;
@@ -657,6 +654,8 @@ public:
        void checkChildBuffers();
 
 private:
+       /// Change name of buffer. Updates "read-only" flag.
+       void setFileName(support::FileName const & fname);
        ///
        std::vector<std::string> backends() const;
        ///