/// return values for read()
enum ReturnValues {
OK,
+ OK_OLDFORMAT,
ERROR,
FORMAT_MISMATCH
};
/// Performs the read of the layout file.
/// \return true on success.
+ // FIXME Should return ReturnValues....
bool read(support::FileName const & filename, ReadType rt = BASECLASS);
///
- bool read(std::string const & str, ReadType rt = BASECLASS);
+ ReturnValues read(std::string const & str, ReadType rt = MODULE);
///
ReturnValues read(Lexer & lex, ReadType rt = BASECLASS);
/// validates the layout information passed in str
- static bool validate(std::string const & str);
+ static ReturnValues validate(std::string const & str);
+ ///
+ static std::string convert(std::string const & str);
///////////////////////////////////////////////////////////////////
// loading
/// a plain inset layout for use as a default
static InsetLayout const & plainInsetLayout() { return plain_insetlayout_; }
/// add a new layout \c name if it does not exist in layoutlist_
- void addLayoutIfNeeded(docstring const & name) const;
+ /// \return whether we had to add one.
+ bool addLayoutIfNeeded(docstring const & name) const;
///////////////////////////////////////////////////////////////////
// accessors