]> git.lyx.org Git - lyx.git/blobdiff - src/LaTeXFonts.cpp
Provide proper fallback if a bibliography processor is not found
[lyx.git] / src / LaTeXFonts.cpp
index 9010615fcb4c19bf0307ef12e5c2795b46e0202b..ad65439b942df50f738a225e63a8a79cdc76390f 100644 (file)
@@ -19,6 +19,7 @@
 
 #include "support/convert.h"
 #include "support/debug.h"
+#include "support/docstream.h"
 #include "support/FileName.h"
 #include "support/filetools.h"
 #include "support/gettext.h"
@@ -259,9 +260,8 @@ string const LaTeXFont::getPackageOptions(bool ot1, bool complete, bool sc, bool
            && providesScale(ot1, complete, nomath)) {
                if (!os.str().empty())
                        os << ',';
-               ostringstream value;
-               value << float(scale) / 100;
-               os << subst(to_ascii(scaleoption_), "$$val", value.str());
+               os << subst(to_ascii(scaleoption_), "$$val",
+                           convert<std::string>(float(scale) / 100));
        }
        return os.str();
 }
@@ -304,7 +304,7 @@ string const LaTeXFont::getLaTeXCode(bool dryrun, bool ot1, bool complete, bool
                os << altFont(osffont_).getLaTeXCode(dryrun, ot1, complete, sc, osf, nomath, scale);
 
        if (!preamble_.empty())
-               os << preamble_;
+               os << to_utf8(preamble_);
 
        return os.str();
 }
@@ -373,7 +373,7 @@ bool LaTeXFont::readFont(Lexer & lex)
                        error = true;
                        continue;
 
-               default: 
+               default:
                        break;
                }
                switch (static_cast<LaTeXFontTags>(le)) {
@@ -420,7 +420,7 @@ bool LaTeXFont::readFont(Lexer & lex)
                        lex >> packageoption_;
                        break;
                case LF_PREAMBLE:
-                       preamble_ = lex.getLongString("EndPreamble");
+                       preamble_ = lex.getLongString(from_ascii("EndPreamble"));
                        break;
                case LF_PROVIDES: {
                        lex.eatLine();