X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2FParagraph.cpp;h=e46faab4b922848e6487ea7077d4ab64f138aa4b;hb=97e5041a4abfec0820b8c8662577e83ce0e6c3cd;hp=61ca78ae1364bca4afcdfad468aa1f5990ad2858;hpb=6a8219c190315a63426e6798290cc3a04dbc0f09;p=lyx.git diff --git a/src/Paragraph.cpp b/src/Paragraph.cpp index 61ca78ae13..e46faab4b9 100644 --- a/src/Paragraph.cpp +++ b/src/Paragraph.cpp @@ -1178,7 +1178,7 @@ void Paragraph::write(ostream & os, BufferParams const & bparams, break; // Write font changes - Font font2 = getFontSettings(bparams, i); + Font const & font2 = getFontSettings(bparams, i); if (font2 != font1) { font2.lyxWriteChanges(font1, os); column = 0; @@ -1413,13 +1413,14 @@ Font const Paragraph::getFont(BufferParams const & bparams, pos_type pos, Font font = getFontSettings(bparams, pos); pos_type const body_pos = beginOfBody(); + FontInfo & fi = font.fontInfo(); if (pos < body_pos) - font.fontInfo().realize(d->layout_->labelfont); + fi.realize(d->layout_->labelfont); else - font.fontInfo().realize(d->layout_->font); + fi.realize(d->layout_->font); - font.fontInfo().realize(outerfont.fontInfo()); - font.fontInfo().realize(bparams.getFont().fontInfo()); + fi.realize(outerfont.fontInfo()); + fi.realize(bparams.getFont().fontInfo()); return font; }