mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-23 05:25:26 +00:00
prepare for further work and a parlist thingie
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6823 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
d2d231b3c9
commit
065c0d0b05
@ -969,7 +969,7 @@ Encoding const * BufferView::getEncoding() const
|
||||
|
||||
LyXCursor const & c = t->cursor;
|
||||
LyXFont const font = c.par()->getFont(buffer()->params, c.pos(),
|
||||
outerFont(c.par()));
|
||||
outerFont(c.par(), t->ownerParagraphs()));
|
||||
return font.language()->encoding();
|
||||
}
|
||||
|
||||
|
@ -1,3 +1,20 @@
|
||||
2003-04-16 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* text2.C (getFont): adjust
|
||||
(getLayoutFont): adjust
|
||||
(getLabelFont): adjust
|
||||
|
||||
* paragraph_funcs.C (TeXOnePar): adjust
|
||||
|
||||
* buffer.C (simpleLinuxDocOnePar): adjust
|
||||
(simpleDocBookOnePar): adjust
|
||||
|
||||
* CutAndPaste.C (pasteSelection): adjust
|
||||
|
||||
* BufferView.C (getEncoding): adjust
|
||||
|
||||
* paragraph_funcs.C (outerFont): prepare for a ParagraphList arg.
|
||||
|
||||
2003-04-16 John Levon <levon@movementarian.org>
|
||||
|
||||
* lyxfind.C: use parlist stuff for search/changes
|
||||
@ -8,7 +25,7 @@
|
||||
|
||||
* text2.C (deleteEmptyParagraphMechanism): adjust
|
||||
|
||||
* text2.[Ch] (ownerParagraph): delete func (both of them
|
||||
* text2.[Ch] (ownerParagraph): delete func (both of them
|
||||
|
||||
2003-04-15 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
|
@ -282,7 +282,7 @@ bool CutAndPaste::pasteSelection(Paragraph ** par, Paragraph ** endpar,
|
||||
tmpbuf->erase(i--);
|
||||
}
|
||||
} else {
|
||||
LyXFont f1 = tmpbuf->getFont(current_view->buffer()->params, i, outerFont(tmpbuf));
|
||||
LyXFont f1 = tmpbuf->getFont(current_view->buffer()->params, i, outerFont(tmpbuf, current_view->text->ownerParagraphs()));
|
||||
LyXFont f2 = f1;
|
||||
if (!(*par)->checkInsertChar(f1)) {
|
||||
tmpbuf->erase(i--);
|
||||
|
@ -1433,7 +1433,7 @@ void Buffer::simpleLinuxDocOnePar(ostream & os,
|
||||
PAR_TAG tag_close = NONE;
|
||||
list < PAR_TAG > tag_open;
|
||||
|
||||
LyXFont const font = par->getFont(params, i, outerFont(par));
|
||||
LyXFont const font = par->getFont(params, i, outerFont(par, paragraphs));
|
||||
|
||||
if (font_old.family() != font.family()) {
|
||||
switch (family_type) {
|
||||
@ -1922,7 +1922,7 @@ void Buffer::simpleDocBookOnePar(ostream & os,
|
||||
|
||||
// parsing main loop
|
||||
for (pos_type i = 0; i < par->size(); ++i) {
|
||||
LyXFont font = par->getFont(params, i, outerFont(par));
|
||||
LyXFont font = par->getFont(params, i, outerFont(par, paragraphs));
|
||||
|
||||
// handle <emphasis> tag
|
||||
if (font_old.emph() != font.emph()) {
|
||||
|
@ -1,3 +1,7 @@
|
||||
2003-04-16 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* insetert.C (read): use ParagraphList::iterator.
|
||||
|
||||
2003-04-15 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||
|
||||
* insetquotes.C (latex): comment some code and add warnings.
|
||||
|
@ -158,13 +158,14 @@ void InsetERT::read(Buffer const * buf, LyXLex & lex)
|
||||
LyXFont font(LyXFont::ALL_INHERIT, latex_language);
|
||||
font.setFamily(LyXFont::TYPEWRITER_FAMILY);
|
||||
font.setColor(LColor::latex);
|
||||
Paragraph * par = inset.paragraph();
|
||||
while (par) {
|
||||
pos_type siz = par->size();
|
||||
|
||||
ParagraphList::iterator pit = inset.paragraphs.begin();
|
||||
ParagraphList::iterator pend = inset.paragraphs.end();
|
||||
for (; pit != pend; ++pit) {
|
||||
pos_type siz = pit->size();
|
||||
for (pos_type i = 0; i < siz; ++i) {
|
||||
par->setFont(i, font);
|
||||
pit->setFont(i, font);
|
||||
}
|
||||
par = par->next();
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -471,7 +471,7 @@ TeXOnePar(Buffer const * buf,
|
||||
}
|
||||
|
||||
if (pit->params().lineTop()) {
|
||||
os << "\\lyxline{\\" << pit->getFont(bparams, 0, outerFont(pit)).latexSize() << '}'
|
||||
os << "\\lyxline{\\" << pit->getFont(bparams, 0, outerFont(pit, paragraphs)).latexSize() << '}'
|
||||
<< "\\vspace{-1\\parskip}";
|
||||
further_blank_line = true;
|
||||
}
|
||||
@ -550,7 +550,8 @@ TeXOnePar(Buffer const * buf,
|
||||
break;
|
||||
}
|
||||
|
||||
bool need_par = pit->simpleTeXOnePar(buf, bparams, outerFont(pit),
|
||||
bool need_par = pit->simpleTeXOnePar(buf, bparams,
|
||||
outerFont(pit, paragraphs),
|
||||
os, texrow, moving_arg);
|
||||
|
||||
// Make sure that \\par is done with the font of the last
|
||||
@ -562,7 +563,7 @@ TeXOnePar(Buffer const * buf,
|
||||
// Is this really needed ? (Dekel)
|
||||
// We do not need to use to change the font for the last paragraph
|
||||
// or for a command.
|
||||
LyXFont const outerfont(outerFont(pit));
|
||||
LyXFont const outerfont(outerFont(pit, paragraphs));
|
||||
|
||||
LyXFont const font =
|
||||
(pit->empty()
|
||||
@ -1029,7 +1030,8 @@ int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex)
|
||||
}
|
||||
|
||||
|
||||
LyXFont const outerFont(ParagraphList::iterator pit)
|
||||
LyXFont const outerFont(ParagraphList::iterator pit,
|
||||
ParagraphList const & /*plist*/)
|
||||
{
|
||||
Paragraph::depth_type par_depth = pit->getDepth();
|
||||
LyXFont tmpfont(LyXFont::ALL_INHERIT);
|
||||
|
@ -69,6 +69,7 @@ int readParagraph(Buffer & buf, Paragraph & par, LyXLex & lex);
|
||||
LyXFont const realizeFont(LyXFont const & font,
|
||||
BufferParams const & params);
|
||||
|
||||
LyXFont const outerFont(ParagraphList::iterator pit);
|
||||
LyXFont const outerFont(ParagraphList::iterator pit,
|
||||
ParagraphList const & plist);
|
||||
|
||||
#endif // PARAGRAPH_FUNCS_H
|
||||
|
@ -150,7 +150,7 @@ LyXFont const LyXText::getFont(Buffer const * buf, ParagraphList::iterator pit,
|
||||
pit->inInset()->getDrawFont(tmpfont);
|
||||
|
||||
// Realize with the fonts of lesser depth.
|
||||
tmpfont.realize(outerFont(pit));
|
||||
tmpfont.realize(outerFont(pit, ownerParagraphs()));
|
||||
|
||||
return realizeFont(tmpfont, buf->params);
|
||||
}
|
||||
@ -167,7 +167,7 @@ LyXFont const LyXText::getLayoutFont(Buffer const * buf,
|
||||
|
||||
LyXFont font(layout->font);
|
||||
// Realize with the fonts of lesser depth.
|
||||
font.realize(outerFont(pit));
|
||||
font.realize(outerFont(pit, ownerParagraphs()));
|
||||
|
||||
return realizeFont(font, buf->params);
|
||||
}
|
||||
@ -184,7 +184,7 @@ LyXFont const LyXText::getLabelFont(Buffer const * buf,
|
||||
|
||||
LyXFont font(layout->labelfont);
|
||||
// Realize with the fonts of lesser depth.
|
||||
font.realize(outerFont(pit));
|
||||
font.realize(outerFont(pit, ownerParagraphs()));
|
||||
|
||||
return realizeFont(layout->labelfont, buf->params);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user