]> git.lyx.org Git - lyx.git/commitdiff
Fix MathML output of wide characters.
authorRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 17:31:13 +0000 (17:31 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 17:31:13 +0000 (17:31 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32699 a592a061-630c-0410-9148-cb99ea01b6c8

src/mathed/InsetMathChar.cpp
src/mathed/MathStream.cpp
src/mathed/MathStream.h

index 8e02c6a92cb5e9ab31d46e1cbbf9e0f778e4fe00..7949c230991a1ea4de5310d8fefeca36103984cd 100644 (file)
@@ -175,10 +175,10 @@ void InsetMathChar::mathmlize(MathStream & ms) const
        }
        
        char const * type = 
        }
        
        char const * type = 
-               (isalpha(char_) || Encodings::isMathAlpha(char_))       
+               (isalpha(char_) || Encodings::isMathAlpha(char_))
                        ? "mi" : "mo";
        // we don't use MTag and ETag because we do not want the spacing
                        ? "mi" : "mo";
        // we don't use MTag and ETag because we do not want the spacing
-       ms << "<" << type << ">" << char(char_) << "</" << type << ">"; 
+       ms << "<" << type << ">" << char_type(char_) << "</" << type << ">";    
 }
 
 
 }
 
 
index 9ce8f9051ac24e302016130aaac563193810d510..ac511dd917fe12c4eae5b99cd13b4c489b2c7540 100644 (file)
@@ -250,6 +250,32 @@ MathStream::MathStream(odocstream & os)
 {}
 
 
 {}
 
 
+void MathStream::cr()
+{
+       os() << '\n';
+       for (int i = 0; i < tab(); ++i)
+               os() << ' ';
+}
+
+
+void MathStream::defer(docstring const & s)
+{
+       deferred_ << s;
+}
+
+
+void MathStream::defer(string const & s)
+{
+       deferred_ << from_utf8(s);
+}
+
+
+docstring MathStream::deferred() const
+{ 
+       return deferred_.str();
+}
+
+
 MathStream & operator<<(MathStream & ms, MathAtom const & at)
 {
        at->mathmlize(ms);
 MathStream & operator<<(MathStream & ms, MathAtom const & at)
 {
        at->mathmlize(ms);
@@ -278,6 +304,13 @@ MathStream & operator<<(MathStream & ms, char c)
 }
 
 
 }
 
 
+MathStream & operator<<(MathStream & ms, char_type c)
+{
+       ms.os() << c;
+       return ms;
+}
+
+
 MathStream & operator<<(MathStream & ms, MTag const & t)
 {
        ++ms.tab();
 MathStream & operator<<(MathStream & ms, MTag const & t)
 {
        ++ms.tab();
@@ -297,32 +330,6 @@ MathStream & operator<<(MathStream & ms, ETag const & t)
 }
 
 
 }
 
 
-void MathStream::cr()
-{
-       os() << '\n';
-       for (int i = 0; i < tab(); ++i)
-               os() << ' ';
-}
-
-
-void MathStream::defer(docstring const & s)
-{
-       deferred_ << s;
-}
-
-
-void MathStream::defer(string const & s)
-{
-       deferred_ << from_utf8(s);
-}
-
-
-docstring MathStream::deferred() const
-{ 
-       return deferred_.str();
-}
-
-
 MathStream & operator<<(MathStream & ms, docstring const & s)
 {
        ms.os() << s;
 MathStream & operator<<(MathStream & ms, docstring const & s)
 {
        ms.os() << s;
index 51fbdd367e28bdc2e2e808cc9566831218ae979c..c2eb3d232642d29540538187525c9439019923b4 100644 (file)
@@ -286,6 +286,8 @@ MathStream & operator<<(MathStream &, char const *);
 ///
 MathStream & operator<<(MathStream &, char);
 ///
 ///
 MathStream & operator<<(MathStream &, char);
 ///
+MathStream & operator<<(MathStream &, char_type);
+///
 MathStream & operator<<(MathStream &, MTag const &);
 ///
 MathStream & operator<<(MathStream &, ETag const &);
 MathStream & operator<<(MathStream &, MTag const &);
 ///
 MathStream & operator<<(MathStream &, ETag const &);