From afed118a7b159d6ecdd8442909b9f8de59d08689 Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Fri, 9 Sep 2005 11:04:53 +0000 Subject: [PATCH] fix bug 2014 (lyxline font size) git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@10431 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/ChangeLog | 5 +++++ src/insets/ChangeLog | 5 +++++ src/insets/insetline.C | 11 ++--------- src/insets/insetquotes.C | 2 +- src/outputparams.C | 2 +- src/outputparams.h | 10 +++++----- src/paragraph.C | 2 +- 7 files changed, 20 insertions(+), 17 deletions(-) diff --git a/src/ChangeLog b/src/ChangeLog index bb392f1879..f54846e231 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,8 @@ +2005-09-07 Georg Baum + + * outputparams.[Ch]: store local_font instead of local_language + * paragraph.C (simpleTeXOnePar): adapt to the change above + 2005-09-08 Martin Vermeer * buffer_funcs.C: diff --git a/src/insets/ChangeLog b/src/insets/ChangeLog index fe005765c8..9f2ebcfdae 100644 --- a/src/insets/ChangeLog +++ b/src/insets/ChangeLog @@ -1,3 +1,8 @@ +2005-09-07 Georg Baum + + * insetline.C (latex): write the size argument of \lyxline again + * insetquotes.C (latex): adapt to OutputParams changes + 2005-08-09 Jürgen Spitzmüller * insettabular.C (tabularFeatures): don't force alignment to BLOCK diff --git a/src/insets/insetline.C b/src/insets/insetline.C index a2e5d13843..5f02e2cc7e 100644 --- a/src/insets/insetline.C +++ b/src/insets/insetline.C @@ -53,16 +53,9 @@ void InsetLine::draw(PainterInfo & pi, int x, int y) const int InsetLine::latex(Buffer const &, ostream & os, - OutputParams const &) const + OutputParams const & runparams) const { - os << "\\lyxline{}"; - -/* was: - os << "\\lyxline{\\" - << pit->getFont(bparams, 0, outerFont(pit, paragraphs)).latexSize() - << "}\\vspace{-1\\parskip}"; -*/ - + os << "\\lyxline{\\" << runparams.local_font->latexSize() << '}'; return 0; } diff --git a/src/insets/insetquotes.C b/src/insets/insetquotes.C index 4cd7bd5bf4..a5f1611690 100644 --- a/src/insets/insetquotes.C +++ b/src/insets/insetquotes.C @@ -270,7 +270,7 @@ int InsetQuotes::latex(Buffer const &, ostream & os, string qstr; if (language_ == FrenchQ && times_ == DoubleQ - && prefixIs(runparams.local_language->code(), "fr")) { + && prefixIs(runparams.local_font->language()->code(), "fr")) { if (side_ == LeftQ) qstr = "\\og "; //the spaces are important here else diff --git a/src/outputparams.C b/src/outputparams.C index 25fd6b664a..817f6d9591 100644 --- a/src/outputparams.C +++ b/src/outputparams.C @@ -16,7 +16,7 @@ OutputParams::OutputParams() : flavor(LATEX), nice(false), moving_arg(false), - free_spacing(false), use_babel(false), + local_font(0), free_spacing(false), use_babel(false), linelen(0), depth(0), exportdata(new ExportData) {} diff --git a/src/outputparams.h b/src/outputparams.h index d3974fd325..c5307ff75e 100644 --- a/src/outputparams.h +++ b/src/outputparams.h @@ -19,7 +19,7 @@ class ExportData; -class Language; +class LyXFont; class OutputParams { @@ -48,19 +48,19 @@ public: /** moving_arg == true means that the environment in which the inset is typeset is a moving argument. The inset should take care about - fragile commands by preceding the latex with \protect. + fragile commands by preceding the latex with \\protect. */ bool moving_arg; /** intitle == true means that the environment in which the - inset is typeset is part of a title (before a \maketitle). + inset is typeset is part of a title (before a \\maketitle). Footnotes in such environments have moving arguments. */ bool intitle; - /** the language at the point where the inset is + /** the font at the point where the inset is */ - Language const * local_language; + LyXFont const * local_font; /** Document language babel name */ diff --git a/src/paragraph.C b/src/paragraph.C index 12d91ccb62..795047c923 100644 --- a/src/paragraph.C +++ b/src/paragraph.C @@ -1013,7 +1013,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf, if (output || running_change != Change::DELETED) { OutputParams rp = runparams; rp.free_spacing = style->free_spacing; - rp.local_language = font.language(); + rp.local_font = &font; rp.intitle = style->intitle; pimpl_->simpleTeXSpecialChars(buf, bparams, os, texrow, rp,