isfontcolor = false;
// light gray is the default font color for greyed-out notes
notefontcolor = lyx::rgbFromHexName("#cccccc");
+ boxbgcolor = lyx::rgbFromHexName("#ff0000");
compressed = lyxrc.save_compressed;
for (int iter = 0; iter < 4; ++iter) {
user_defined_bullet(iter) = ITEMIZE_DEFAULTS[iter];
string color = lex.getString();
notefontcolor = lyx::rgbFromHexName(color);
// set the font color within LyX
- // FIXME: the color is correctly set but later overwritten by the default
lcolor.setColor(Color_greyedouttext, color);
+ } else if (token == "\\boxbgcolor") {
+ lex.eatLine();
+ string color = lex.getString();
+ boxbgcolor = lyx::rgbFromHexName(color);
+ // set the font color within LyX
+ lcolor.setColor(Color_shadedbg, color);
} else if (token == "\\paperwidth") {
lex >> paperwidth;
} else if (token == "\\paperheight") {
os << "\\fontcolor " << lyx::X11hexname(fontcolor) << '\n';
if (notefontcolor != lyx::rgbFromHexName("#cccccc"))
os << "\\notefontcolor " << lyx::X11hexname(notefontcolor) << '\n';
+ if (boxbgcolor != lyx::rgbFromHexName("#ff0000"))
+ os << "\\boxbgcolor " << lyx::X11hexname(boxbgcolor) << '\n';
BranchList::const_iterator it = branchlist().begin();
BranchList::const_iterator end = branchlist().end();
LayoutFileList & bcl = LayoutFileList::get();
if (!bcl.haveClass(classname)) {
docstring s =
- bformat(_("The document class %1$s could not be found. "
- "A default textclass with default layouts will be used. "
- "LyX might not be able to produce output unless a correct "
- "textclass is selected from the document settings dialog."),
+ bformat(_("The layout file:\n"
+ "%1$s\n"
+ "could not be found. A default textclass with default\n"
+ "layouts will be used. LyX will not be able to produce\n"
+ "correct output."),
from_utf8(classname));
frontend::Alert::error(_("Document class not found"), s);
bcl.addEmptyClass(classname);
bool const success = bcl[classname].load();
if (!success) {
docstring s =
- bformat(_("The document class %1$s could not be loaded."),
+ bformat(_("Due to some error in it, the layout file:\n"
+ "%1$s\n"
+ "could not be loaded. A default textclass with default\n"
+ "layouts will be used. LyX will not be able to produce\n"
+ "correct output."),
from_utf8(classname));
frontend::Alert::error(_("Could not load class"), s);
- return false;
+ bcl.addEmptyClass(classname);
}
pimpl_->baseClass_ = classname;
}
}
+
bool BufferParams::moduleCanBeAdded(string const & modName) const
{
return layoutModules_.moduleCanBeAdded(modName, baseClass());