+2002-03-06 Lars Gullik Bjønnes <larsbj@birdstep.com>
+
+ * paragraph.C (writeFile): if layout is empty write out
+ defaultLayoutName().
+
+ * buffer.C (parseSingleLyXformat2Token): if we have a buggy .lyx
+ file without named layout we set layout to defaultLayoutName().
+
2002-03-06 Juergen Vigna <jug@sad.it>
* CutAndPaste.C (copySelection): set layout for new paragraph.
insertErtContents(par, pos);
#endif
lex.eatLine();
- string const layoutname = lex.getString();
+ string layoutname = lex.getString();
+
LyXTextClass const & tclass = textclasslist[params.textclass];
+
+ if (layoutname.empty()) {
+ layoutname = tclass.defaultLayoutName();
+ }
+
bool hasLayout = tclass.hasLayout(layoutname);
if (!hasLayout) {
lyxerr << "Layout '" << layoutname << "' does not"
need_update = FULL;
switch (st) {
case Inlined:
+#warning Another gross hack. (Lgb)
if (bv)
inset.setUpdateStatus(bv, InsetText::INIT);
break;
}
-string const InsetERT::selectNextWordToSpellcheck(BufferView * bv,float &) const
+string const InsetERT::selectNextWordToSpellcheck(BufferView * bv,
+ float &) const
{
bv->unlockInset(const_cast<InsetERT *>(this));
return string();
}
+
void InsetERT::getDrawFont(LyXFont & font) const
{
#ifndef INHERIT_LANG
}
// First write the layout
+ string lay = layout();
+ if (lay.empty()) {
+ lay = textclasslist[bparams.textclass].defaultLayoutName();
+ }
+
os << "\n\\layout " << layout() << "\n";
// Maybe some vertical spaces.