]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathDelim.cpp
Allow automatic text direction in Painter::text()
[lyx.git] / src / mathed / InsetMathDelim.cpp
index 0653e88b8c4f8e05631a83b30b8f1f2acab120a5..8e8b6e295bad9672f493a258cf16e206fa77a5ed 100644 (file)
@@ -25,6 +25,8 @@
 
 #include "frontends/FontMetrics.h"
 
+#include <algorithm>
+
 using namespace std;
 
 namespace lyx {
@@ -43,13 +45,13 @@ static docstring convertDelimToLatexName(docstring const & name)
 
 InsetMathDelim::InsetMathDelim(Buffer * buf, docstring const & l,
                docstring const & r)
-       : InsetMathNest(buf, 1), left_(l), right_(r)
+       : InsetMathNest(buf, 1), left_(l), right_(r), dw_(0)
 {}
 
 
 InsetMathDelim::InsetMathDelim(Buffer * buf, docstring const & l, docstring const & r,
        MathData const & ar)
-       : InsetMathNest(buf, 1), left_(l), right_(r)
+       : InsetMathNest(buf, 1), left_(l), right_(r), dw_(0)
 {
        cell(0) = ar;
 }
@@ -71,16 +73,16 @@ void InsetMathDelim::validate(LaTeXFeatures & features) const
        MathWordList::const_iterator it = words.find(left_);
        if (it != words.end())
        {
-               docstring const req = it->second.requires;
+               string const req = it->second.requires;
                if (!req.empty())
-                       features.require(to_ascii(req));
+                       features.require(req);
        }
        it = words.find(right_);
        if (it != words.end())
        {
-               docstring const req = it->second.requires;
+               string const req = it->second.requires;
                if (!req.empty())
-                       features.require(to_ascii(req));
+                       features.require(req);
        }
 }