itemdepth = 0;
next_ = 0;
previous_ = 0;
- clear();
-
- makeSameLayout(&lp);
// this is because of the dummy layout of the paragraphs that
// follow footnotes
layout = lp.layout;
// ale970302
- if (lp.bibkey)
+ if (lp.bibkey) {
bibkey = static_cast<InsetBibKey *>
- (lp.bibkey->Clone(*current_view->buffer()));
- else
+ (lp.bibkey->clone(*current_view->buffer()));
+ } else {
bibkey = 0;
+ }
// copy everything behind the break-position to the new paragraph
insetlist = lp.insetlist;
for (InsetList::iterator it = insetlist.begin();
- it != insetlist.end(); ++it)
- it->inset = it->inset->Clone(*current_view->buffer());
+ it != insetlist.end(); ++it) {
+ it->inset = it->inset->clone(*current_view->buffer());
+ }
}
// bibitem ale970302
if (bibkey)
- bibkey->Write(buf, os);
+ bibkey->write(buf, os);
LyXFont font1(LyXFont::ALL_INHERIT, bparams.language);
{
Inset const * inset = getInset(i);
if (inset)
- if (inset->DirectWrite()) {
+ if (inset->directWrite()) {
// international char, let it write
// code directly so it's shorter in
// the file
- inset->Write(buf, os);
+ inset->write(buf, os);
} else {
os << "\n\\begin_inset ";
- inset->Write(buf, os);
+ inset->write(buf, os);
os << "\n\\end_inset \n\n";
column = 0;
}
for (InsetList::const_iterator cit = insetlist.begin();
cit != insetlist.end(); ++cit) {
if ((*cit).inset)
- (*cit).inset->Validate(features);
+ (*cit).inset->validate(features);
}
}
minibuffer_inset = 0;
if (minibuffer_char == Paragraph::META_INSET) {
if (getInset(pos)) {
- minibuffer_inset = getInset(pos)->Clone(buffer);
+ minibuffer_inset = getInset(pos)->clone(buffer);
} else {
minibuffer_inset = 0;
minibuffer_char = ' ';
//lyxerr << "Paragraph::InsertInsetAllowed" << endl;
if (pimpl_->inset_owner)
- return pimpl_->inset_owner->InsertInsetAllowed(inset);
+ return pimpl_->inset_owner->insertInsetAllowed(inset);
return true;
}
void Paragraph::makeSameLayout(Paragraph const * par)
{
layout = par->layout;
- params().makeSame(par->params());
-
- // This can be changed after NEW_INSETS is in effect. (Lgb)
- setLabelWidthString(par->params().labelWidthString());
+ // move to pimpl?
+ params() = par->params();
}
int count = 0;
InsetList::size_type index = 0;
while (index < insetlist.size()) {
- if (insetlist[index].inset && insetlist[index].inset->AutoDelete()) {
+ if (insetlist[index].inset && insetlist[index].inset->autoDelete()) {
erase(insetlist[index].pos);
// Erase() calls to insetlist.erase(&insetlist[index])
// so index shouldn't be increased.
break;
case LATEX_ITEM_ENVIRONMENT:
if (bibkey) {
- bibkey->Latex(buf, os, false, false);
+ bibkey->latex(buf, os, false, false);
} else
os << "\\item ";
break;
if (IsPrintable(c))
s += c;
else if (c == META_INSET &&
- getInset(i)->LyxCode() == Inset::MATH_CODE) {
+ getInset(i)->lyxCode() == Inset::MATH_CODE) {
std::ostringstream ost;
- getInset(i)->Ascii(buffer, ost);
+ getInset(i)->ascii(buffer, ost);
s += subst(ost.str().c_str(),'\n',' ');
}
}
if (IsPrintable(c))
ost << c;
else if (c == META_INSET) {
- getInset(i)->Ascii(buffer, ost);
+ getInset(i)->ascii(buffer, ost);
}
}
for (InsetList::const_iterator cit = insetlist.begin();
cit != insetlist.end(); ++cit) {
if ((*cit).inset) {
- if ((*cit).inset->IsTextInset()) {
+ if ((*cit).inset->isTextInset()) {
static_cast<UpdatableInset *>
((*cit).inset)->deleteLyXText(bv, true);
}
for (InsetList::const_iterator cit = insetlist.begin();
cit != insetlist.end(); ++cit) {
if ((*cit).inset) {
- if ((*cit).inset->IsTextInset()) {
+ if ((*cit).inset->isTextInset()) {
static_cast<UpdatableInset *>
((*cit).inset)->resizeLyXText(bv, true);
}
}
-LyXTextClass::size_type Paragraph::getLayout() const
+LyXTextClass::LayoutList::size_type Paragraph::getLayout() const
{
return layout;
}