]> git.lyx.org Git - lyx.git/blobdiff - src/insets/InsetInclude.cpp
Revert "Do not crash is release mode if we stumble across an unrealized font."
[lyx.git] / src / insets / InsetInclude.cpp
index 20e077976dece98b262ae481230c628367da1bd6..47c9a613436cb262818da8d226178b8c81b408c4 100644 (file)
@@ -36,6 +36,7 @@
 #include "output_plaintext.h"
 #include "output_xhtml.h"
 #include "OutputParams.h"
+#include "texstream.h"
 #include "TextClass.h"
 #include "TocBackend.h"
 
@@ -688,9 +689,9 @@ void InsetInclude::latex(otexstream & os, OutputParams const & runparams) const
                // and language.
                Encoding const * const oldEnc = runparams.encoding;
                Language const * const oldLang = runparams.master_language;
-               // If the master has full unicode flavor (XeTeX, LuaTeX),
+               // If the master uses non-TeX fonts (XeTeX, LuaTeX),
                // the children must be encoded in plain utf8!
-               runparams.encoding = runparams.isFullUnicode() ?
+               runparams.encoding = masterBuffer->params().useNonTeXFonts ?
                        encodings.fromLyXName("utf8-plain")
                        : &tmp->params().encoding();
                runparams.master_language = buffer().params().language;
@@ -1067,7 +1068,7 @@ void InsetInclude::fileChanged() const
                return;
 
        preview_->removePreview(*buffer);
-       add_preview(*preview_.get(), *this, *buffer);
+       add_preview(*preview_, *this, *buffer);
        preview_->startLoading(*buffer);
 }
 
@@ -1085,9 +1086,8 @@ bool preview_wanted(InsetCommandParams const & params, Buffer const & buffer)
 
 docstring latexString(InsetInclude const & inset)
 {
-       TexRow texrow;
        odocstringstream ods;
-       otexstream os(ods, texrow);
+       otexstream os(ods, false);
        // We don't need to set runparams.encoding since this will be done
        // by latex() anyway.
        OutputParams runparams(0);