]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_pimpl.C
explain why ownsClipbiard() does not work on Windows and OS X
[lyx.git] / src / paragraph_pimpl.C
index 900837a49a80d2c26e790ef0de5d81f4f2f965e5..55126353775f5feb1a434b0c82e7b3a7058ad5ba 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)) {
@@ -785,11 +786,11 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
        FontList::const_iterator fend = fontlist.end();
        for (; fcit != fend; ++fcit) {
                if (fcit->font().noun() == LyXFont::ON) {
-                       lyxerr[Debug::LATEX] << "font.noun: "
+                       LYXERR(Debug::LATEX) << "font.noun: "
                                             << fcit->font().noun()
                                             << endl;
                        features.require("noun");
-                       lyxerr[Debug::LATEX] << "Noun enabled. Font: "
+                       LYXERR(Debug::LATEX) << "Noun enabled. Font: "
                                             << to_utf8(fcit->font().stateText(0))
                                             << endl;
                }
@@ -804,7 +805,7 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
                        break;
                default:
                        features.require("color");
-                       lyxerr[Debug::LATEX] << "Color enabled. Font: "
+                       LYXERR(Debug::LATEX) << "Color enabled. Font: "
                                             << to_utf8(fcit->font().stateText(0))
                                             << endl;
                }
@@ -815,7 +816,7 @@ void Paragraph::Pimpl::validate(LaTeXFeatures & features,
                    language != latex_language)
                {
                        features.useLanguage(language);
-                       lyxerr[Debug::LATEX] << "Found language "
+                       LYXERR(Debug::LATEX) << "Found language "
                                             << language->babel() << endl;
                }
        }