Dear Martin, dear Michael,

I am trying to cleanup LyXText::redoParagraph() (in text.C) to do only metrics. The bibitem part doesn't seem to belong to that and svn blame say that you are the author of that part. So could you please tell me if it is really necessary to have this code here. If no, where could it be transfered?

Thanks in advance,
Abdel.

PS: here is the problematic code:

// Add bibitem insets if necessary
if (par.layout()->labeltype == LABEL_BIBLIO) {
        bool hasbibitem(false);
        if (!par.insetlist.empty()
                // Insist on it being in pos 0
                && par.getChar(0) == Paragraph::META_INSET) {
                InsetBase * inset = par.insetlist.begin()->inset;
                if (inset->lyxCode() == InsetBase::BIBITEM_CODE)
                        hasbibitem = true;
        }
        if (!hasbibitem) {
                InsetBibitem * inset(new
                        InsetBibitem(InsetCommandParams("bibitem")));
                par.insertInset(0, static_cast<InsetBase *>(inset),
                                Change(buffer.params().trackChanges ?
                                       Change::INSERTED : Change::UNCHANGED));
                bv.cursor().posRight();
        }
}


Reply via email to