]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
* sk.po
[lyx.git] / src / Paragraph.cpp
index 7778e4019a6a490c30bf2a88183d29f7c6a2f7e5..9f3fb5ec982f4b71e6a4dc6533a05c8081cb4663 100644 (file)
@@ -1091,7 +1091,7 @@ void Paragraph::Private::latexInset(BufferParams const & bparams,
        // ArabTeX, though, cannot handle this special behavior, it seems.
        bool arabtex = basefont.language()->lang() == "arabic_arabtex"
                || running_font.language()->lang() == "arabic_arabtex";
-       if (open_font && inset->noFontChange()) {
+       if (open_font && !inset->inheritFont()) {
                bool closeLanguage = arabtex
                        || basefont.isRightToLeft() == running_font.isRightToLeft();
                unsigned int count = running_font.latexWriteEndChanges(os,
@@ -1156,10 +1156,12 @@ void Paragraph::Private::latexSpecialChar(otexstream & os,
        char_type const c = text_[i];
 
        if (style.pass_thru || runparams.pass_thru) {
-               if (c != '\0')
-                       // FIXME UNICODE: This can fail if c cannot
-                       // be encoded in the current encoding.
+               if (c != '\0') {
+                       Encoding const * const enc = runparams.encoding;
+                       if (enc && enc->latexChar(c, true).empty())
+                               throw EncodingException(c);
                        os.put(c);
+               }
                return;
        }