mirror of
https://git.lyx.org/repos/lyx.git
synced 2025-01-11 11:08:41 +00:00
parlist-12-a.diff
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@6809 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
eb572b6314
commit
1dd8947242
@ -1,8 +1,21 @@
|
|||||||
|
2003-04-15 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
|
* paragraph_pimpl.C (simpleTeXSpecialChars): take a outerfont arg,
|
||||||
|
adjust
|
||||||
|
|
||||||
|
* paragraph_funcs.C (TeXOnePar): adjust
|
||||||
|
|
||||||
|
* paragraph.C (getLabelFont): add outerfont arg, adjust
|
||||||
|
(getLayoutFont): ditto
|
||||||
|
(simpleTeXOnePar): adjust
|
||||||
|
|
||||||
|
* paragraph_pimpl.C (realizeFont): delete func
|
||||||
|
|
||||||
2003-04-14 Alfredo Braunstein <abraunst@libero.it>
|
2003-04-14 Alfredo Braunstein <abraunst@libero.it>
|
||||||
|
|
||||||
* text2.C (beforeFullRowInset): added a bad getchar check, removed
|
* text2.C (beforeFullRowInset): added a bad getchar check, removed
|
||||||
row argument, constify cur argument.
|
row argument, constify cur argument.
|
||||||
|
|
||||||
2003-04-15 Lars Gullik Bjønnes <larsbj@gullik.net>
|
2003-04-15 Lars Gullik Bjønnes <larsbj@gullik.net>
|
||||||
|
|
||||||
* text2.C (getFont): adjust
|
* text2.C (getFont): adjust
|
||||||
|
@ -457,25 +457,29 @@ LyXFont const Paragraph::getFont(BufferParams const & bparams, pos_type pos,
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LyXFont const Paragraph::getLabelFont(BufferParams const & bparams) const
|
LyXFont const Paragraph::getLabelFont(BufferParams const & bparams,
|
||||||
|
LyXFont const & outerfont) const
|
||||||
{
|
{
|
||||||
LyXLayout_ptr const & lout = layout();
|
LyXLayout_ptr const & lout = layout();
|
||||||
|
|
||||||
LyXFont tmpfont = lout->labelfont;
|
LyXFont tmpfont = lout->labelfont;
|
||||||
tmpfont.setLanguage(getParLanguage(bparams));
|
tmpfont.setLanguage(getParLanguage(bparams));
|
||||||
|
tmpfont.realize(outerfont);
|
||||||
|
|
||||||
return pimpl_->realizeFont(tmpfont, bparams);
|
return realizeFont(tmpfont, bparams, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LyXFont const Paragraph::getLayoutFont(BufferParams const & bparams) const
|
LyXFont const Paragraph::getLayoutFont(BufferParams const & bparams,
|
||||||
|
LyXFont const & outerfont) const
|
||||||
{
|
{
|
||||||
LyXLayout_ptr const & lout = layout();
|
LyXLayout_ptr const & lout = layout();
|
||||||
|
|
||||||
LyXFont tmpfont = lout->font;
|
LyXFont tmpfont = lout->font;
|
||||||
tmpfont.setLanguage(getParLanguage(bparams));
|
tmpfont.setLanguage(getParLanguage(bparams));
|
||||||
|
tmpfont.realize(outerfont);
|
||||||
|
|
||||||
return pimpl_->realizeFont(tmpfont, bparams);
|
return realizeFont(tmpfont, bparams, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -961,9 +965,9 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
|
|||||||
if (body_pos > 0) {
|
if (body_pos > 0) {
|
||||||
os << '[';
|
os << '[';
|
||||||
++column;
|
++column;
|
||||||
basefont = getLabelFont(bparams);
|
basefont = getLabelFont(bparams, outerfont);
|
||||||
} else {
|
} else {
|
||||||
basefont = getLayoutFont(bparams);
|
basefont = getLayoutFont(bparams, outerfont);
|
||||||
}
|
}
|
||||||
|
|
||||||
moving_arg |= style->needprotect;
|
moving_arg |= style->needprotect;
|
||||||
@ -997,7 +1001,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
|
|||||||
column += running_font.latexWriteEndChanges(os, basefont, basefont);
|
column += running_font.latexWriteEndChanges(os, basefont, basefont);
|
||||||
open_font = false;
|
open_font = false;
|
||||||
}
|
}
|
||||||
basefont = getLayoutFont(bparams);
|
basefont = getLayoutFont(bparams, outerfont);
|
||||||
running_font = basefont;
|
running_font = basefont;
|
||||||
os << ']';
|
os << ']';
|
||||||
++column;
|
++column;
|
||||||
@ -1070,7 +1074,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const * buf,
|
|||||||
pimpl_->simpleTeXSpecialChars(buf, bparams,
|
pimpl_->simpleTeXSpecialChars(buf, bparams,
|
||||||
os, texrow, moving_arg,
|
os, texrow, moving_arg,
|
||||||
font, running_font,
|
font, running_font,
|
||||||
basefont, open_font,
|
basefont, outerfont, open_font,
|
||||||
running_change,
|
running_change,
|
||||||
*style, i, column, c);
|
*style, i, column, c);
|
||||||
}
|
}
|
||||||
|
@ -242,8 +242,10 @@ public:
|
|||||||
*/
|
*/
|
||||||
LyXFont const getFont(BufferParams const &, lyx::pos_type pos,
|
LyXFont const getFont(BufferParams const &, lyx::pos_type pos,
|
||||||
LyXFont const & outerfont) const;
|
LyXFont const & outerfont) const;
|
||||||
LyXFont const getLayoutFont(BufferParams const &) const;
|
LyXFont const getLayoutFont(BufferParams const &,
|
||||||
LyXFont const getLabelFont(BufferParams const &) const;
|
LyXFont const & outerfont) const;
|
||||||
|
LyXFont const getLabelFont(BufferParams const &,
|
||||||
|
LyXFont const & outerfont) const;
|
||||||
///
|
///
|
||||||
value_type getChar(lyx::pos_type pos) const;
|
value_type getChar(lyx::pos_type pos) const;
|
||||||
///
|
///
|
||||||
|
@ -562,9 +562,12 @@ TeXOnePar(Buffer const * buf,
|
|||||||
// Is this really needed ? (Dekel)
|
// Is this really needed ? (Dekel)
|
||||||
// We do not need to use to change the font for the last paragraph
|
// We do not need to use to change the font for the last paragraph
|
||||||
// or for a command.
|
// or for a command.
|
||||||
|
LyXFont const outerfont(outerFont(pit));
|
||||||
|
|
||||||
LyXFont const font =
|
LyXFont const font =
|
||||||
(pit->empty()
|
(pit->empty()
|
||||||
? pit->getLayoutFont(bparams) : pit->getFont(bparams, pit->size() - 1, outerFont(pit)));
|
? pit->getLayoutFont(bparams, outerfont)
|
||||||
|
: pit->getFont(bparams, pit->size() - 1, outerfont));
|
||||||
|
|
||||||
bool is_command = style->isCommand();
|
bool is_command = style->isCommand();
|
||||||
|
|
||||||
|
@ -498,6 +498,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const * buf,
|
|||||||
LyXFont & font,
|
LyXFont & font,
|
||||||
LyXFont & running_font,
|
LyXFont & running_font,
|
||||||
LyXFont & basefont,
|
LyXFont & basefont,
|
||||||
|
LyXFont const & outerfont,
|
||||||
bool & open_font,
|
bool & open_font,
|
||||||
Change::Type & running_change,
|
Change::Type & running_change,
|
||||||
LyXLayout const & style,
|
LyXLayout const & style,
|
||||||
@ -538,7 +539,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const * buf,
|
|||||||
column += running_font.latexWriteEndChanges(os, basefont, basefont);
|
column += running_font.latexWriteEndChanges(os, basefont, basefont);
|
||||||
open_font = false;
|
open_font = false;
|
||||||
}
|
}
|
||||||
basefont = owner_->getLayoutFont(bparams);
|
basefont = owner_->getLayoutFont(bparams, outerfont);
|
||||||
running_font = basefont;
|
running_font = basefont;
|
||||||
|
|
||||||
if (font.family() == LyXFont::TYPEWRITER_FAMILY)
|
if (font.family() == LyXFont::TYPEWRITER_FAMILY)
|
||||||
@ -585,7 +586,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const * buf,
|
|||||||
basefont,
|
basefont,
|
||||||
basefont);
|
basefont);
|
||||||
open_font = false;
|
open_font = false;
|
||||||
basefont = owner_->getLayoutFont(bparams);
|
basefont = owner_->getLayoutFont(bparams, outerfont);
|
||||||
running_font = basefont;
|
running_font = basefont;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -852,26 +853,3 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
LyXFont const Paragraph::Pimpl::realizeFont(LyXFont const & font,
|
|
||||||
BufferParams const & bparams) const
|
|
||||||
{
|
|
||||||
LyXFont tmpfont(font);
|
|
||||||
|
|
||||||
// check for environment font information
|
|
||||||
depth_type par_depth = owner_->getDepth();
|
|
||||||
Paragraph * par = owner_;
|
|
||||||
LyXTextClass const & tclass = bparams.getLyXTextClass();
|
|
||||||
|
|
||||||
while (par && par->getDepth() && !tmpfont.resolved()) {
|
|
||||||
par = outerHook(par);
|
|
||||||
if (par) {
|
|
||||||
tmpfont.realize(par->layout()->font);
|
|
||||||
par_depth = par->getDepth();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
tmpfont.realize(tclass.defaultfont());
|
|
||||||
return tmpfont;
|
|
||||||
}
|
|
||||||
|
@ -84,9 +84,6 @@ struct Paragraph::Pimpl {
|
|||||||
/// erase the given range
|
/// erase the given range
|
||||||
bool erase(lyx::pos_type start, lyx::pos_type end);
|
bool erase(lyx::pos_type start, lyx::pos_type end);
|
||||||
///
|
///
|
||||||
LyXFont const realizeFont(LyXFont const & font,
|
|
||||||
BufferParams const & bparams) const;
|
|
||||||
///
|
|
||||||
Inset * inset_owner;
|
Inset * inset_owner;
|
||||||
|
|
||||||
/** A font entry covers a range of positions. Notice that the
|
/** A font entry covers a range of positions. Notice that the
|
||||||
@ -158,7 +155,9 @@ struct Paragraph::Pimpl {
|
|||||||
std::ostream &, TexRow & texrow,
|
std::ostream &, TexRow & texrow,
|
||||||
bool moving_arg,
|
bool moving_arg,
|
||||||
LyXFont & font, LyXFont & running_font,
|
LyXFont & font, LyXFont & running_font,
|
||||||
LyXFont & basefont, bool & open_font,
|
LyXFont & basefont,
|
||||||
|
LyXFont const & outerfont,
|
||||||
|
bool & open_font,
|
||||||
Change::Type & running_change,
|
Change::Type & running_change,
|
||||||
LyXLayout const & style,
|
LyXLayout const & style,
|
||||||
lyx::pos_type & i,
|
lyx::pos_type & i,
|
||||||
|
Loading…
Reference in New Issue
Block a user