mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-12-22 13:18:28 +00:00
* src/paragraph_pimpl.[Ch]
(Paragraph::Pimpl::simpleTeXSpecialChars): Get rid of the 'font' argument, since the caller ensures that it is equal to 'running_font'. * src/paragraph.C (Paragraph::simpleTeXOnePar): Adjust to change above git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17437 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
57a68063ad
commit
d5f03d0c6e
@ -1106,7 +1106,7 @@ bool Paragraph::simpleTeXOnePar(Buffer const & buf,
|
||||
rp.local_font = &font;
|
||||
rp.intitle = style->intitle;
|
||||
pimpl_->simpleTeXSpecialChars(buf, bparams, doc_encoding, os,
|
||||
texrow, rp, font, running_font,
|
||||
texrow, rp, running_font,
|
||||
basefont, outerfont, open_font,
|
||||
runningChangeType, *style, i, column, c);
|
||||
}
|
||||
|
@ -482,7 +482,6 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
odocstream & os,
|
||||
TexRow & texrow,
|
||||
OutputParams const & runparams,
|
||||
LyXFont & font,
|
||||
LyXFont & running_font,
|
||||
LyXFont & basefont,
|
||||
LyXFont const & outerfont,
|
||||
@ -527,12 +526,13 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
os, basefont, basefont, bparams);
|
||||
open_font = false;
|
||||
}
|
||||
|
||||
if (running_font.family() == LyXFont::TYPEWRITER_FAMILY)
|
||||
os << '~';
|
||||
|
||||
basefont = owner_->getLayoutFont(bparams, outerfont);
|
||||
running_font = basefont;
|
||||
|
||||
if (font.family() == LyXFont::TYPEWRITER_FAMILY)
|
||||
os << '~';
|
||||
|
||||
if (runparams.moving_arg)
|
||||
os << "\\protect ";
|
||||
|
||||
@ -634,7 +634,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
break;
|
||||
}
|
||||
// Typewriter font also has them
|
||||
if (font.family() == LyXFont::TYPEWRITER_FAMILY) {
|
||||
if (running_font.family() == LyXFont::TYPEWRITER_FAMILY) {
|
||||
os.put(c);
|
||||
break;
|
||||
}
|
||||
@ -657,9 +657,9 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
break;
|
||||
|
||||
case '-': // "--" in Typewriter mode -> "-{}-"
|
||||
if (i <= size() - 2
|
||||
&& getChar(i + 1) == '-'
|
||||
&& font.family() == LyXFont::TYPEWRITER_FAMILY) {
|
||||
if (i <= size() - 2 &&
|
||||
getChar(i + 1) == '-' &&
|
||||
running_font.family() == LyXFont::TYPEWRITER_FAMILY) {
|
||||
os << "-{}";
|
||||
column += 2;
|
||||
} else {
|
||||
@ -711,7 +711,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
// I assume this is hack treating typewriter as verbatim
|
||||
// FIXME UNICODE: This can fail if c cannot be encoded
|
||||
// in the current encoding.
|
||||
if (font.family() == LyXFont::TYPEWRITER_FAMILY) {
|
||||
if (running_font.family() == LyXFont::TYPEWRITER_FAMILY) {
|
||||
if (c != '\0') {
|
||||
os.put(c);
|
||||
}
|
||||
@ -738,7 +738,8 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
|
||||
}
|
||||
|
||||
if (pnr == phrases_nr && c != '\0') {
|
||||
Encoding const & encoding = getEncoding(bparams, doc_encoding, font);
|
||||
Encoding const & encoding =
|
||||
getEncoding(bparams, doc_encoding, running_font);
|
||||
if (i < size() - 1) {
|
||||
char_type next = getChar(i + 1);
|
||||
if (Encodings::isCombiningChar(next)) {
|
||||
|
@ -141,7 +141,7 @@ public:
|
||||
void simpleTeXSpecialChars(Buffer const &, BufferParams const &,
|
||||
Encoding const &, odocstream &,
|
||||
TexRow & texrow, OutputParams const &,
|
||||
LyXFont & font, LyXFont & running_font,
|
||||
LyXFont & running_font,
|
||||
LyXFont & basefont,
|
||||
LyXFont const & outerfont,
|
||||
bool & open_font,
|
||||
|
Loading…
Reference in New Issue
Block a user