]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_pimpl.C
Scons: update_po target, part one: language_l10n.pot
[lyx.git] / src / paragraph_pimpl.C
index 900837a49a80d2c26e790ef0de5d81f4f2f965e5..6ce12872b6b47985d09b8e7a26f3a5367caad288 100644 (file)
@@ -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,
@@ -524,15 +523,16 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
                        } else {
                                if (open_font) {
                                        column += running_font.latexWriteEndChanges(
-                                               os, basefont, basefont, bparams);
+                                               os, basefont, basefont);
                                        open_font = false;
                                }
-                               basefont = owner_->getLayoutFont(bparams, outerfont);
-                               running_font = basefont;
 
-                               if (font.family() == LyXFont::TYPEWRITER_FAMILY)
+                               if (running_font.family() == LyXFont::TYPEWRITER_FAMILY)
                                        os << '~';
 
+                               basefont = owner_->getLayoutFont(bparams, outerfont);
+                               running_font = basefont;
+
                                if (runparams.moving_arg)
                                        os << "\\protect ";
 
@@ -578,7 +578,7 @@ void Paragraph::Pimpl::simpleTeXSpecialChars(Buffer const & buf,
                // some insets cannot be inside a font change command
                if (open_font && inset->noFontChange()) {
                        column += running_font.latexWriteEndChanges(
-                                       os, basefont, basefont, bparams);
+                                       os, basefont, basefont);
                        open_font = false;
                        basefont = owner_->getLayoutFont(bparams, outerfont);
                        running_font = basefont;
@@ -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)) {