]> git.lyx.org Git - lyx.git/blobdiff - src/Font.cpp
This is the first of a series of commits that will make InsetLayout a real class.
[lyx.git] / src / Font.cpp
index 03997b2c6f9b5298502bcc7c5def2efd0113e6f5..39b78be01d5f11fae28a56ef2b516c1866b9f8f3 100644 (file)
@@ -31,6 +31,8 @@
 #include "support/gettext.h"
 #include "support/lstrings.h"
 
+#include <cstring>
+
 using namespace std;
 using namespace lyx::support;
 
@@ -450,8 +452,7 @@ int Font::latexWriteStartChanges(odocstream & os, BufferParams const & bparams,
 
        if (language()->encoding()->package() == Encoding::CJK) {
                pair<bool, int> const c = switchEncoding(os, bparams,
-                               runparams, *(runparams.encoding),
-                               *(language()->encoding()));
+                               runparams, *(language()->encoding()));
                if (c.first) {
                        open_encoding_ = true;
                        count += c.second;
@@ -621,8 +622,7 @@ int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
                // to do correct environment nesting
                Encoding const * const ascii = encodings.getFromLyXName("ascii");
                pair<bool, int> const c = switchEncoding(os, bparams,
-                               runparams, *(runparams.encoding),
-                               *ascii);
+                               runparams, *ascii);
                BOOST_ASSERT(c.first);
                count += c.second;
                runparams.encoding = ascii;
@@ -639,7 +639,7 @@ int Font::latexWriteEndChanges(odocstream & os, BufferParams const & bparams,
 }
 
 
-std::string Font::toString(bool const toggle) const
+string Font::toString(bool const toggle) const
 {
        string lang = "ignore";
        if (language())
@@ -780,7 +780,7 @@ ostream & operator<<(ostream & os, FontState fms)
 }
 
 
-ostream & operator<<(std::ostream & os, FontInfo const & f)
+ostream & operator<<(ostream & os, FontInfo const & f)
 {
        return os << "font:"
                << " family " << f.family()
@@ -797,7 +797,7 @@ ostream & operator<<(std::ostream & os, FontInfo const & f)
 }
 
 
-std::ostream & operator<<(std::ostream & os, Font const & font)
+ostream & operator<<(ostream & os, Font const & font)
 {
        return os << font.bits_
                << " lang: " << (font.lang_ ? font.lang_->lang() : 0);