#include "support/filetools.h"
#include "support/os.h"
-#include <boost/filesystem/operations.hpp>
-
#include <sstream>
-namespace fs = boost::filesystem;
-
namespace lyx {
using support::FileName;
// Reads a textclass structure from file.
bool TextClass::read(FileName const & filename, ReadType rt)
{
- if (!support::isFileReadable(filename)) {
+ if (!filename.isFileReadable()) {
lyxerr << "Cannot read layout file `" << filename << "'."
<< endl;
return true;
IL_LYXTYPE,
IL_MULTIPAR,
IL_PREAMBLE,
+ IL_VERBATIM,
IL_END
};
{ "latextype", IL_LATEXTYPE },
{ "lyxtype", IL_LYXTYPE },
{ "multipar", IL_MULTIPAR },
- { "preamble", IL_PREAMBLE }
+ { "preamble", IL_PREAMBLE },
+ { "verbatim", IL_VERBATIM }
};
lexrc.pushTable(elementTags, IL_END);
Color::color bgcolor(Color::background);
string preamble;
bool multipar(false);
+ bool verbatim(false);
bool getout = false;
while (!getout && lexrc.isOK()) {
lexrc.next();
multipar = lexrc.getBool();
break;
+ case IL_VERBATIM:
+ lexrc.next();
+ verbatim = lexrc.getBool();
+ break;
case IL_FONT:
font.lyxRead(lexrc);
font.realize(defaultfont());
il.latexname = latexname;
il.latexparam = latexparam;
il.multipar = multipar;
+ il.verbatim = verbatim;
il.font = font;
il.labelfont = labelfont;
il.bgcolor = bgcolor;
FileName layout_file;
if (!path.empty())
layout_file = FileName(addName(path, name_ + ".layout"));
- if (layout_file.empty() || !fs::exists(layout_file.toFilesystemEncoding()))
+ if (layout_file.empty() || !layout_file.exists())
layout_file = libFileSearch("layouts", name_, "layout");
loaded_ = const_cast<TextClass*>(this)->read(layout_file) == 0;