enumdepth = 0;
itemdepth = 0;
bibkey = 0; // ale970302
- clear();
+ params().clear();
}
previous_->next_ = this;
// end
- bibkey = 0; // ale970302
-
- clear();
+ bibkey = 0; // ale970302
+ params().clear();
}
}
// First write the layout
+ string lay = layout();
+ if (lay.empty()) {
+ lay = textclasslist[bparams.textclass].defaultLayoutName();
+ }
+
os << "\n\\layout " << layout() << "\n";
// Maybe some vertical spaces.
// end of minibuffer
-
-void Paragraph::clear()
-{
- params().clear();
-
- layout_.erase();
-
- bibkey = 0;
-}
-
-
void Paragraph::erase(pos_type pos)
{
pimpl_->erase(pos);
{
// create a new paragraph
Paragraph * tmp = new Paragraph(this);
- tmp->layout(layout());
+ tmp->layout(textclasslist[bparams.textclass].defaultLayoutName());
// remember to set the inset_owner
tmp->setInsetOwner(inInset());
tmp->params().pagebreakTop(params().pagebreakTop());
tmp->params().spaceTop(params().spaceTop());
tmp->bibkey = bibkey;
- clear();
+
+ bibkey = 0;
+ params().clear();
+ layout(textclasslist[bparams.textclass].defaultLayoutName());
+
// layout stays the same with latex-environments
if (flag) {
layout(tmp->layout());
void Paragraph::layout(string const & new_layout)
{
+ lyx::Assert(!new_layout.empty());
+
layout_ = new_layout;
}