*/
bool readDocument(Lexer &);
- ///
- void insertStringAsLines(ParagraphList & plist,
- pit_type &, pos_type &,
- Font const &, docstring const &, bool);
///
DocIterator getParFromID(int id) const;
/// do we have a paragraph with this id?
/// Write document to stream. Returns \c false if unsuccesful.
bool write(std::ostream &) const;
+ /// save emergency file
+ /// \return a status message towards the user.
+ docstring emergencyWrite();
/// Write file. Returns \c false if unsuccesful.
bool writeFile(support::FileName const &) const;
///
void setUnnamed(bool flag = true);
- ///
+ /// Whether or not a filename has been assigned to this buffer
bool isUnnamed() const;
+ /// Whether or not this buffer is internal.
+ ///
+ /// An internal buffer does not contain a real document, but some auxiliary text segment.
+ /// It is not associated with a filename, it is never saved, thus it does not need to be
+ /// automatically saved, nor it needs to trigger any "do you want to save ?" question.
+ bool isInternal() const;
+
/// Mark this buffer as dirty.
void markDirty();
/// return a list of all used branches (also in children)
void getUsedBranches(std::list<docstring> &, bool const from_master = false) const;
- /// rename all branches of \p oldname in the buffer to \p newname.
- void renameBranches(docstring const & oldname, docstring const & newname);
/// sets the buffer_ member for every inset in this buffer.
// FIXME This really shouldn't be needed, but at the moment it's not
ReadStatus readFile(Lexer &, support::FileName const & filename,
bool fromString = false);
+ /** If we have branches that use the file suffix
+ feature, return the file name with suffix appended.
+ */
+ support::FileName exportFileName() const;
+
/// Use the Pimpl idiom to hide the internals.
class Impl;
/// The pointer never changes although *pimpl_'s contents may.