]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
installer: further preparation
[lyx.git] / src / Paragraph.cpp
index c1e208f84fdabec621b7590e847e6d240301c345..7fd271c41d619eaf42c6c23d460b5d18e2ad7650 100644 (file)
@@ -767,7 +767,7 @@ void Paragraph::Private::insertChar(pos_type pos, char_type c,
 
 
 bool Paragraph::insertInset(pos_type pos, Inset * inset,
-                                  Change const & change)
+                                  Font const & font, Change const & change)
 {
        LASSERT(inset, return false);
        LASSERT(pos >= 0 && pos <= size(), return false);
@@ -785,6 +785,7 @@ bool Paragraph::insertInset(pos_type pos, Inset * inset,
 
        // Some insets require run of spell checker
        requestSpellCheck(pos);
+       setFont(pos, font);
        return true;
 }
 
@@ -1782,16 +1783,6 @@ void Paragraph::insertChar(pos_type pos, char_type c,
 }
 
 
-bool Paragraph::insertInset(pos_type pos, Inset * inset,
-                           Font const & font, Change const & change)
-{
-       bool const success = insertInset(pos, inset, change);
-       // Set the font/language of the inset...
-       setFont(pos, font);
-       return success;
-}
-
-
 void Paragraph::resetFonts(Font const & font)
 {
        d->fontlist_.clear();
@@ -3606,7 +3597,8 @@ int Paragraph::fixBiblio(Buffer const & buffer)
                inset = new InsetBibitem(const_cast<Buffer *>(&buffer),
                                         InsetCommandParams(BIBITEM_CODE));
 
-       insertInset(0, inset, Change(track_changes ? Change::INSERTED 
+       Font font(inherit_font, buffer.params().language);
+       insertInset(0, inset, font, Change(track_changes ? Change::INSERTED 
                                                   : Change::UNCHANGED));
 
        return 1;