]> git.lyx.org Git - lyx.git/commitdiff
Revert r32684, per Andre's suggestion.
authorRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 15:46:39 +0000 (15:46 +0000)
committerRichard Heck <rgheck@comcast.net>
Thu, 31 Dec 2009 15:46:39 +0000 (15:46 +0000)
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@32689 a592a061-630c-0410-9148-cb99ea01b6c8

60 files changed:
src/mathed/InsetMath.cpp
src/mathed/InsetMath.h
src/mathed/InsetMathBig.cpp
src/mathed/InsetMathBig.h
src/mathed/InsetMathBox.cpp
src/mathed/InsetMathBox.h
src/mathed/InsetMathBrace.cpp
src/mathed/InsetMathBrace.h
src/mathed/InsetMathChar.cpp
src/mathed/InsetMathChar.h
src/mathed/InsetMathComment.cpp
src/mathed/InsetMathComment.h
src/mathed/InsetMathDecoration.cpp
src/mathed/InsetMathDecoration.h
src/mathed/InsetMathDelim.cpp
src/mathed/InsetMathDelim.h
src/mathed/InsetMathDiff.cpp
src/mathed/InsetMathDiff.h
src/mathed/InsetMathDots.cpp
src/mathed/InsetMathDots.h
src/mathed/InsetMathEnsureMath.cpp
src/mathed/InsetMathEnsureMath.h
src/mathed/InsetMathExFunc.cpp
src/mathed/InsetMathExFunc.h
src/mathed/InsetMathExInt.cpp
src/mathed/InsetMathExInt.h
src/mathed/InsetMathFrac.cpp
src/mathed/InsetMathFrac.h
src/mathed/InsetMathGrid.cpp
src/mathed/InsetMathGrid.h
src/mathed/InsetMathHull.cpp
src/mathed/InsetMathHull.h
src/mathed/InsetMathKern.cpp
src/mathed/InsetMathKern.h
src/mathed/InsetMathLim.cpp
src/mathed/InsetMathLim.h
src/mathed/InsetMathMatrix.cpp
src/mathed/InsetMathMatrix.h
src/mathed/InsetMathNumber.cpp
src/mathed/InsetMathNumber.h
src/mathed/InsetMathRoot.cpp
src/mathed/InsetMathRoot.h
src/mathed/InsetMathScript.cpp
src/mathed/InsetMathScript.h
src/mathed/InsetMathSpace.cpp
src/mathed/InsetMathSpace.h
src/mathed/InsetMathSpecialChar.cpp
src/mathed/InsetMathSpecialChar.h
src/mathed/InsetMathSqrt.cpp
src/mathed/InsetMathSqrt.h
src/mathed/InsetMathString.cpp
src/mathed/InsetMathString.h
src/mathed/InsetMathSymbol.cpp
src/mathed/InsetMathSymbol.h
src/mathed/InsetMathUnknown.cpp
src/mathed/InsetMathUnknown.h
src/mathed/MathExtern.cpp
src/mathed/MathExtern.h
src/mathed/MathMacro.cpp
src/mathed/MathMacro.h

index a5cd28a2841f3770143f1dd39db85ac70e9c77c8..0a9772c6769c3e7c1a243b6170aba64c49a13644 100644 (file)
@@ -120,13 +120,12 @@ void InsetMath::mathematica(MathematicaStream & os) const
 }
 
 
-docstring InsetMath::mathmlize(MathStream & os) const
+void InsetMath::mathmlize(MathStream & os) const
 {
        os << MTag("mi");
        NormalStream ns(os.os());
        normalize(ns);
        os << ETag("mi");
-       return docstring();
 }
 
 
index 12ea7ab06ce504539e0ed296305b843d6d9117e1..555762c8c7bab3e568b8d9247475e612b1c96ef5 100644 (file)
@@ -187,7 +187,7 @@ public:
        /// write content as something readable by Mathematica
        virtual void mathematica(MathematicaStream &) const;
        /// write content as something resembling MathML
-       virtual docstring mathmlize(MathStream &) const;
+       virtual void mathmlize(MathStream &) const;
        /// write content as something readable by Octave
        virtual void octave(OctaveStream &) const;
 
index 128cade0d6258939a9111d3802233712ffe42a67..463b628dbecfe343186864c5fcebab189452278d 100644 (file)
@@ -102,7 +102,7 @@ void InsetMathBig::normalize(NormalStream & os) const
 }
 
 
-docstring InsetMathBig::mathmlize(MathStream & os) const
+void InsetMathBig::mathmlize(MathStream & os) const
 {
        os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true'>";
        if (delim_ == "(" || delim_ == ")"
@@ -146,7 +146,6 @@ docstring InsetMathBig::mathmlize(MathStream & os) const
        else if (delim_ == "\\Updownarrow")
                os << "&vArr;";
        os << "</mo>";
-       return docstring();;
 }
 
 
index 8049b9460a57716c8e0ff31886fd9ec518ba4503..e6df71fd1ccc420f5f8bcd0a19f43ff478776ca3 100644 (file)
@@ -35,7 +35,7 @@ public:
        ///
        void normalize(NormalStream & os) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void infoize2(odocstream & os) const;
        ///
index 701a0bb6344b75725356870b5bf559c8b1fc224d..d432794fc070980122ec2f7a3436d7a5179b1bf6 100644 (file)
@@ -52,7 +52,7 @@ void InsetMathBox::normalize(NormalStream & os) const
 }
 
 
-docstring InsetMathBox::mathmlize(MathStream & ms) const
+void InsetMathBox::mathmlize(MathStream & ms) const
 {      
        // FIXME This doesn't actually work yet. We need to be able to signal 
        // that we are in text mode and then just call ms << cell(0). So we
@@ -60,7 +60,6 @@ docstring InsetMathBox::mathmlize(MathStream & ms) const
        ms << MTag("mtext");
        ms.os() << cell(0);
        ms << ETag("mtext");
-       return docstring();
 }
 
 
index 03d2da9f9e78bb61946aa759ace6df875feb11af..4ef299401d9b6df2dd4931e6ab8384b8f0cc71fc 100644 (file)
@@ -35,7 +35,7 @@ public:
        ///
        void normalize(NormalStream & ns) const;
        ///
-       docstring mathmlize(MathStream & ms) const;
+       void mathmlize(MathStream & ms) const;
        ///
        void infoize(odocstream & os) const;
        ///
@@ -66,7 +66,7 @@ public:
        /// write normalized content
        void normalize(NormalStream & ns) const;
        ///
-       //docstring mathmlize(MathStream & ms) const;
+       //void mathmlize(MathStream & ms) const;
        ///
        void infoize(odocstream & os) const;
 private:
@@ -89,7 +89,7 @@ public:
        /// write normalized content
        void normalize(NormalStream & ns) const;
        ///
-       //docstring mathmlize(MathStream & ms) const;
+       //void mathmlize(MathStream & ms) const;
        ///
        mode_type currentMode() const { return TEXT_MODE; }
        ///
@@ -116,7 +116,7 @@ public:
        ///
        void write(WriteStream & os) const;
        ///
-       //docstring mathmlize(MathStream & ms) const;
+       //void mathmlize(MathStream & ms) const;
        /// write normalized content
        void normalize(NormalStream & ns) const;
        ///
index 4bf24dfb81e7ad3566e25f339f55da3a57eb2e3a..c1034c9aeeb1f662e48478c7b8fb7e25493b6d2e 100644 (file)
@@ -13,7 +13,6 @@
 #include "InsetMathBrace.h"
 
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 #include "MetricsInfo.h"
@@ -95,12 +94,9 @@ void InsetMathBrace::octave(OctaveStream & os) const
 }
 
 
-docstring InsetMathBrace::mathmlize(MathStream & os) const
+void InsetMathBrace::mathmlize(MathStream & os) const
 {
-       os << MTag("mrow");
-       docstring const rv = lyx::mathmlize(cell(0), os);
-       os << ETag("mrow");
-       return rv;
+       os << MTag("mrow") << cell(0) << ETag("mrow");
 }
 
 
index 6af0ca32b02d3a7b4210018c9932203ee6f2ebe0..e8e3ea955766283a5019ef0e2e5dec1e9c36fefd 100644 (file)
@@ -46,7 +46,7 @@ public:
        ///
        void octave(OctaveStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void infoize(odocstream & os) const;
        ///
index 27093e8504ca1ed241d1602f1f5f5c32ecb94ac9..8e02c6a92cb5e9ab31d46e1cbbf9e0f778e4fe00 100644 (file)
@@ -165,12 +165,12 @@ void InsetMathChar::octave(OctaveStream & os) const
 // mathalpha, then we'll treat it as an identifier, otherwise as an 
 // operator.
 // Worst case: We get bad spacing, or bad italics.
-docstring InsetMathChar::mathmlize(MathStream & ms) const
+void InsetMathChar::mathmlize(MathStream & ms) const
 {
        switch (char_) {
-               case '<': ms << "<mo>&lt;</mo>"; return docstring();
-               case '>': ms << "<mo>&gt;</mo>"; return docstring();
-               case '&': ms << "<mo>&amp;</mo>"; return docstring();
+               case '<': ms << "<mo>&lt;</mo>"; return;
+               case '>': ms << "<mo>&gt;</mo>"; return;
+               case '&': ms << "<mo>&amp;</mo>"; return;
                default: break;
        }
        
@@ -179,7 +179,6 @@ docstring InsetMathChar::mathmlize(MathStream & ms) const
                        ? "mi" : "mo";
        // we don't use MTag and ETag because we do not want the spacing
        ms << "<" << type << ">" << char(char_) << "</" << type << ">"; 
-       return docstring();
 }
 
 
index d1a865fc15a564a91abfe42f8ede980dedd3b89f..6dba328c4e3deac9c4aec64a589ad29c72840447 100644 (file)
@@ -41,7 +41,7 @@ public:
        ///
        void octave(OctaveStream & os) const;
        ///
-       docstring mathmlize(MathStream & ms) const;
+       void mathmlize(MathStream & ms) const;
        /// identifies Charinsets
        InsetMathChar const * asCharInset() const { return this; }
        ///
index 92693a2c7e12e4288c01d226f70d4c657d6abaef..ebfba7a859918e35fc00b064334ebcd47c80a6ac 100644 (file)
@@ -86,10 +86,9 @@ void InsetMathComment::octave(OctaveStream &) const
 {}
 
 
-docstring InsetMathComment::mathmlize(MathStream & os) const
+void InsetMathComment::mathmlize(MathStream & os) const
 {
        os << MTag("comment") << cell(0) << cell(1) << ETag("comment");
-       return docstring();
 }
 
 
index 2ab35c2805b6a4273b093d4cfa01e122e8ac2f96..bb775a74cb13e82fa94455faf68b5e9cc61258aa 100644 (file)
@@ -44,7 +44,7 @@ public:
        ///
        void octave(OctaveStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void infoize(odocstream & os) const;
        ///
index 825b212c9de8970c59640982ade338e02b241a50..629a440abf32cafbab88c5fb5bc9d8b4aa74d4f3 100644 (file)
@@ -14,7 +14,6 @@
 #include "InsetMathDecoration.h"
 
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathParser.h"
 #include "MathSupport.h"
 #include "MathStream.h"
@@ -206,18 +205,16 @@ namespace {
        }
 }
 
-docstring InsetMathDecoration::mathmlize(MathStream & os) const
+void InsetMathDecoration::mathmlize(MathStream & os) const
 {
        Translator const & t = translator();
        Translator::const_iterator cur = t.find(to_utf8(key_->name));
-       LASSERT(cur != t.end(), return docstring());
+       LASSERT(cur != t.end(), return);
        char const * const outag = cur->second.over ? "mover" : "munder";
-       os << MTag(outag) << MTag("mrow");
-       docstring const rv = lyx::mathmlize(cell(0), os);
-       os << ETag("mrow")
+       os << MTag(outag)
+                << MTag("mrow") << cell(0) << ETag("mrow")
                 << from_ascii("<mo stretchy=\"true\">" + cur->second.tag + "</mo>")
                 << ETag(outag);
-       return rv;
 }
 
 
index 7d77b49ae30252e1574d8ae1e7db94f93fd47759..22c9f9bed35379aa4671860ae7cc195e90fe8cfe 100644 (file)
@@ -42,7 +42,7 @@ public:
        ///
        InsetCode lyxCode() const { return MATH_DECORATION_CODE; }
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
 
 private:
        virtual Inset * clone() const;
index 6da49562eb6347e47cc5a88849bd3ffc273f06c5..459866c924ed17fbcd5d66acfc0cca9014a9c866 100644 (file)
@@ -14,7 +14,6 @@
 #include "InsetMathDelim.h"
 
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 #include "MetricsInfo.h"
@@ -162,12 +161,10 @@ void InsetMathDelim::mathematica(MathematicaStream & os) const
 }
 
 
-docstring InsetMathDelim::mathmlize(MathStream & os) const
+void InsetMathDelim::mathmlize(MathStream & os) const
 {
-       os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true'>" << left_ << "</mo>";
-       docstring const rv = lyx::mathmlize(cell(0),os);
-       os << "<mo form='postfix' fence='true' stretchy='true' symmetric='true'>" << right_ << "</mo>";
-       return rv;
+       os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true'>" << left_ << "</mo>"
+               << cell(0) << "<mo form='postfix' fence='true' stretchy='true' symmetric='true'>" << right_ << "</mo>";
 }
 
 
index fb70f249270ead6c51127db35fef2fd8b20206df..67e1db09063db2ea4494fbbd354d710ab9761732 100644 (file)
@@ -56,7 +56,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void octave(OctaveStream &) const;
        ///
index f044ab8f15db1f826f5e660e7f56d5a7230739bc..1e990d7ffb15a4a05a83054335ddcb79bed97304 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "InsetMathDiff.h"
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 
 #include "support/debug.h"
@@ -96,17 +95,15 @@ void InsetMathDiff::mathematica(MathematicaStream & os) const
 }
 
 
-docstring InsetMathDiff::mathmlize(MathStream & os) const
+void InsetMathDiff::mathmlize(MathStream & os) const
 {
        os << "diff(";
-       docstring rv;
        for (idx_type idx = 0; idx < nargs(); ++idx) {
                if (idx != 0)
                        os << ',';
-               rv += lyx::mathmlize(cell(idx), os);
+               os << cell(idx);
        }
        os << ')';
-       return rv;
 }
 
 
index f9f1aba0881d84a7ffef76b63086f0722411dd91..6253168397abb059845f58e296fdbaf5e7a1096f 100644 (file)
@@ -39,7 +39,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void maxima(MaximaStream &) const;
        ///
index d1b18fa9b4e929759e3daaccd0a71eaa57e33af6..8ca2a1e46981c9ed5f4a40f95803b143434360ca 100644 (file)
@@ -85,7 +85,7 @@ void InsetMathDots::validate(LaTeXFeatures & features) const
 }
 
 
-docstring InsetMathDots::mathmlize(MathStream & os) const
+void InsetMathDots::mathmlize(MathStream & os) const
 {
        // which symbols we support is decided by what is listed in
        // lib/symbols as generating a dots inset
@@ -106,7 +106,6 @@ docstring InsetMathDots::mathmlize(MathStream & os) const
        else
                LASSERT(false, ent = "&hellip;");
        os << MTag("mi") << from_ascii(ent) << ETag("mi");
-       return docstring();
 }
 
 } // namespace lyx
index 4ba13351e907eff8b31f7a1418e3f83204e9efd7..4f2428712cfc2ae60838d14fa1eb68f288be2d81 100644 (file)
@@ -35,7 +35,7 @@ public:
        ///
        InsetCode lyxCode() const { return MATH_DOTS_CODE; }
        ///
-       docstring mathmlize(MathStream & os) const;
+       void mathmlize(MathStream & os) const;
 protected:
        /// cache for the thing's height
        mutable int dh_;
index 149bae7d2cb247fbc5fd8871066f3df866d13d11..8f738a8dae7b6e00c112c2436c63ec456312da81 100644 (file)
@@ -13,9 +13,8 @@
 
 #include "InsetMathEnsureMath.h"
 
-#include "MathExtern.h"
-#include "MathData.h"
 #include "MathStream.h"
+#include "MathData.h"
 
 #include <ostream>
 
@@ -68,9 +67,9 @@ void InsetMathEnsureMath::write(WriteStream & os) const
 }
 
 
-docstring InsetMathEnsureMath::mathmlize(MathStream & os) const
+void InsetMathEnsureMath::mathmlize(MathStream & os) const
 {
-       return lyx::mathmlize(cell(0), os);
+       os << cell(0);
 }
 
 
index c8e58bbe97d16297ef17e8c0e47e69f2e80a4b74..ccc136a157c93cea04c95c232ecb9fa988b5be5c 100644 (file)
@@ -36,7 +36,7 @@ public:
        ///
        void write(WriteStream & os) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void infoize(odocstream & os) const;
        ///
index 173436eb612a7b031f1b2f862cab3cac734d297f..25c8dcbaf9b964300c2844f5243699806f9e1aac 100644 (file)
@@ -13,7 +13,6 @@
 #include "InsetMathExFunc.h"
 
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 #include "MetricsInfo.h"
@@ -123,10 +122,10 @@ void InsetMathExFunc::mathematica(MathematicaStream & os) const
 }
 
 
-docstring InsetMathExFunc::mathmlize(MathStream & os) const
+void InsetMathExFunc::mathmlize(MathStream & os) const
 {
        os << "<mi>" << name_ << "</mi><mo>&af;</mo>";
-       return lyx::mathmlize(cell(0), os);
+       os << cell(0);
 }
 
 
index 0517484f388721dcd0136598593a4341b12a8bd8..fb6dda8b360e2e84f7b68cab4bebcc1d98ee47fc 100644 (file)
@@ -43,7 +43,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void octave(OctaveStream &) const;
        ///
index 5277b6cde818253302213b17e17a1fc9f9e3d95f..88970e0e9634dbf54783b7d9f9fb0f8b2a0c2f64 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "InsetMathExInt.h"
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 #include "MathStream.h"
 #include "InsetMathSymbol.h"
@@ -123,7 +122,7 @@ void InsetMathExInt::mathematica(MathematicaStream & os) const
 }
 
 
-docstring InsetMathExInt::mathmlize(MathStream & os) const
+void InsetMathExInt::mathmlize(MathStream & os) const
 {
        // At the moment, we are not extracting sums and the like for MathML.
        // If we should decide to do so later, then we'll need to re-merge
@@ -151,11 +150,9 @@ docstring InsetMathExInt::mathmlize(MathStream & os) const
                os << ETag("msub");
        else if (upper)
                os << ETag("msup");
-       docstring rv = lyx::mathmlize(cell(0), os);
-       os << "<mo> &InvisibleTimes; </mo>"
+       os << cell(0) << "<mo> &InvisibleTimes; </mo>"
           << MTag("mrow") << "<mo> &DifferentialD; </mo>"
           << cell(1) << ETag("mrow");
-       return rv;
 }
 
 
index 55aa1f78f240cb6d0354dd0931ef65ff3450a411..ced825b89074d668e31e1015a2f7baa49f140140 100644 (file)
@@ -52,7 +52,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void write(WriteStream & os) const;
        ///
index 3fbd56d8fdfc1bf552538258d4a4455d2a4af2be..11d24469db1c09b752105035e8a1951186a2fcbb 100644 (file)
@@ -17,7 +17,6 @@
 #include "Cursor.h"
 #include "LaTeXFeatures.h"
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 #include "MetricsInfo.h"
@@ -385,14 +384,12 @@ void InsetMathFrac::octave(OctaveStream & os) const
 }
 
 
-docstring InsetMathFrac::mathmlize(MathStream & os) const
+void InsetMathFrac::mathmlize(MathStream & os) const
 {
-       os << MTag("mfrac") << MTag("mrow");
-       docstring rv = lyx::mathmlize(cell(0), os);
-       os << ETag("mrow") << MTag("mrow");
-       rv += lyx::mathmlize(cell(1), os);
-       os << ETag("mrow") << ETag("mfrac");
-       return rv;
+       os << MTag("mfrac")
+          << MTag("mrow") << cell(0) << ETag("mrow")
+                << MTag("mrow") << cell(1) << ETag("mrow")
+                << ETag("mfrac");
 }
 
 
@@ -536,9 +533,8 @@ void InsetMathBinom::normalize(NormalStream & os) const
 }
 
 
-docstring InsetMathBinom::mathmlize(MathStream & os) const
+void InsetMathBinom::mathmlize(MathStream & os) const
 {
-       // FIXME This all needs fixing
        switch (kind_) {
        case BINOM:
                os << MTag("mbinom") << cell(0) << cell(1) << ETag("mbinom");
@@ -551,7 +547,6 @@ docstring InsetMathBinom::mathmlize(MathStream & os) const
                os << MTag("mdbinom") << cell(0) << cell(1) << ETag("mdbinom");
                break;
        }
-       return docstring();
 }
 
 
index 14af2f8be31cf6973e693903b11e31a1889fd79f..36e7ba363b808cb07320a83195f90bba360c1f1d 100644 (file)
@@ -82,7 +82,7 @@ public:
        ///
        void octave(OctaveStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void validate(LaTeXFeatures & features) const;
 public:
@@ -121,7 +121,7 @@ public:
        ///
        bool extraBraces() const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void validate(LaTeXFeatures & features) const;
        ///
index c4fa2418579ee12da6485ffd30f3f0f93c958c31..432a39a2f26b0be7d58f1a5805d2cea7864c291e 100644 (file)
@@ -14,7 +14,6 @@
 #include "InsetMathGrid.h"
 
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathParser.h"
 #include "MathStream.h"
 #include "MetricsInfo.h"
@@ -968,21 +967,19 @@ void InsetMathGrid::normalize(NormalStream & os) const
 }
 
 
-docstring InsetMathGrid::mathmlize(MathStream & os) const
+void InsetMathGrid::mathmlize(MathStream & os) const
 {
        bool const havetable = nrows() > 1;
        if (havetable)
                os << MTag("mtable");
-       docstring rv;
        for (row_type row = 0; row < nrows(); ++row) {
                os << MTag("mrow");
                for (col_type col = 0; col < ncols(); ++col)
-                       rv += lyx::mathmlize(cell(index(row, col)), os);
+                       os << cell(index(row, col));
                os << ETag("mrow");
        }
        if (havetable)
                os << ETag("mtable");
-       return rv;
 }
 
 
index aaef2aaa21c844a42da4e456d6b667e00a491490..926216ea1cdca3967a63b2c301c7b0172bf97434 100644 (file)
@@ -219,7 +219,7 @@ public:
        ///
        //void maple(MapleStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        //void octave(OctaveStream &) const;
 
index 492e748d7989c7f90e9561b8c7a1e88e964d36cd..57137db2f2d1ea286e6cc2cbd5a498640e36b906 100644 (file)
@@ -1092,9 +1092,9 @@ void InsetMathHull::normalize(NormalStream & os) const
 }
 
 
-docstring InsetMathHull::mathmlize(MathStream & os) const
+void InsetMathHull::mathmlize(MathStream & os) const
 {
-       return InsetMathGrid::mathmlize(os);
+       InsetMathGrid::mathmlize(os);
 }
 
 
@@ -1782,9 +1782,9 @@ docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const &) const
                xs << StartTag("math", 
                        "display=\"block\" xmlns=\"http://www.w3.org/1998/Math/MathML\"", true);
        MathStream ms(xs.os());
-       docstring const rv = InsetMathGrid::mathmlize(ms);
+       InsetMathGrid::mathmlize(ms);
        xs << EndTag("math");
-       return rv;
+       return docstring();
 }
 
 
index a48edd1da5e71ae7298394be09d4388fb42c64e0..db4d2ff89cca83f0e7cd911559c139b0ff06ad80 100644 (file)
@@ -102,7 +102,7 @@ public:
        ///
        void write(WriteStream & os) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void normalize(NormalStream &) const;
        ///
index fddecfe58e27c7cc19b905b8b1c8d674e74149df..7f990f996842ff99068b19794feb5d72186a6695 100644 (file)
@@ -73,10 +73,4 @@ void InsetMathKern::normalize(NormalStream & os) const
 }
 
 
-docstring InsetMathKern::mathmlize(MathStream &) const
-{
-       return docstring();
-}
-
-
 } // namespace lyx
index db701cf158160121a282222da1ef1f112056378b..bd26e4e02118f177e65a8c347738648b7984d2c4 100644 (file)
@@ -39,7 +39,7 @@ public:
        ///
        void normalize(NormalStream & ns) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const { }
        ///
        InsetCode lyxCode() const { return MATH_KERN_CODE; }
 
index 91335f3c3bd329fb101cccb085720e71f443b1c2..a5eae28bb71f4eae1e909c3c7fecd2c452624b46 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "InsetMathLim.h"
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 
 #include "support/debug.h"
@@ -72,16 +71,13 @@ void InsetMathLim::mathematica(MathematicaStream & os) const
 }
 
 
-docstring      InsetMathLim::mathmlize(MathStream & os) const
+void InsetMathLim::mathmlize(MathStream & os) const
 {
        // FIXME XHTML We need a form of MTag that takes attributes.
        os << "<munder>"
           << "<mo form='prefix'>" << "lim" << "</mo>"
-                << "<mrow>" << cell(1) << "<mo>&rarr;</mo>" << cell(2)
-                << "</mrow></munder>" << "<mo>(</mo>";
-       docstring const rv = lyx::mathmlize(cell(0), os);
-       os << "<mo>)</mo>";
-       return rv;
+          << "<mrow>" << cell(1) << "<mo>&rarr;</mo>" << cell(2) << "</mrow></munder>"
+          << "<mo>(</mo>" << cell(0) << "<mo>)</mo>" ; 
 }
 
 
index 5d1f1a4c6ab63b02e9e091e71b03d2b61501547a..11d18dc06e2765e596535e28d718176b3e4c69e3 100644 (file)
@@ -40,7 +40,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void write(WriteStream & os) const;
        ///
index 7b73d3803e43b4e5dd714f43b59dd239b3c7b1b5..d368f217b7b1493485c0ebbc652f5bd487824ae4 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "InsetMathMatrix.h"
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 
 
@@ -90,25 +89,20 @@ void InsetMathMatrix::mathematica(MathematicaStream & os) const
 }
 
 
-docstring InsetMathMatrix::mathmlize(MathStream & os) const
+void InsetMathMatrix::mathmlize(MathStream & os) const
 {
        os << "<mo form='prefix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
           << left_ << "</mo>";
        os << MTag("mtable");
-       docstring rv;
        for (row_type row = 0; row < nrows(); ++row) {
                os << MTag("mtr");
-               for (col_type col = 0; col < ncols(); ++col) {
-                       os << MTag("mtd");
-                       rv += lyx::mathmlize(cell(index(row, col)), os);
-                       os << ETag("mtd");
-               }
+               for (col_type col = 0; col < ncols(); ++col)
+                       os << MTag("mtd") << cell(index(row, col)) << ETag("mtd");
                os << ETag("mtr");
        }
        os << ETag("mtable");
        os << "<mo form='postfix' fence='true' stretchy='true' symmetric='true' lspace='thinmathspace'>"
           << right_ << "</mo>";
-       return rv;
 }
 
 
index e9639811c8dabfd246c7fbd497613874b7340180..a62c8ea44b7bfb5a020e962b9810758b20099950 100644 (file)
@@ -40,7 +40,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void octave(OctaveStream &) const;
        ///
index eb2e85bdc73de6618f4c1915b0b0a7257aefef52..fdacf0c7bccda1df8d70a4d2e1051f6e2b260cd2 100644 (file)
@@ -67,10 +67,9 @@ void InsetMathNumber::octave(OctaveStream & os) const
 }
 
 
-docstring InsetMathNumber::mathmlize(MathStream & os) const
+void InsetMathNumber::mathmlize(MathStream & os) const
 {
        os << "<mn> " << str_ << " </mn>";
-       return docstring();
 }
 
 
index ed9e95ffcb0b25209bf8b04604870bd59a4ef48a..a6ca9dae297f60c19edbd0d21698811da34cdcf9 100644 (file)
@@ -43,7 +43,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void write(WriteStream & os) const;
        ///
index 7ca7706ba0dfbadda57adea73824bd909404e2f4..38c09469c90473840745c441e2b1fe307c47ce6c 100644 (file)
@@ -13,7 +13,6 @@
 
 #include "InsetMathRoot.h"
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 #include "Cursor.h"
 
@@ -113,13 +112,9 @@ void InsetMathRoot::octave(OctaveStream & os) const
 }
 
 
-docstring InsetMathRoot::mathmlize(MathStream & os) const
+void InsetMathRoot::mathmlize(MathStream & os) const
 {
-       os << MTag("mroot");
-       docstring rv = lyx::mathmlize(cell(1), os);
-       rv += lyx::mathmlize(cell(0), os);
-       os << ETag("mroot");
-       return rv;
+       os << MTag("mroot") << cell(1) << cell(0) << ETag("mroot");
 }
 
 
index e05cc807a303f8d85cc37fd3e6acd1d30cdf09fa..cfcac0a7f3189b68bf368cbd8fd6093e3009c7ae 100644 (file)
@@ -36,7 +36,7 @@ public:
        ///
        void normalize(NormalStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void maple(MapleStream &) const;
        ///
index 74420279cb8d5ee23abe7fe3b55ad29129e7f12b..1af0e573459938104334cf93fa251f7cf501e6f3 100644 (file)
@@ -18,7 +18,6 @@
 #include "InsetMathScript.h"
 #include "InsetMathSymbol.h"
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 #include "MathSupport.h"
 
@@ -617,7 +616,7 @@ void InsetMathScript::mathematica(MathematicaStream & os) const
 // It may be worth trying to output munder, mover, and munderover
 // in certain cases, e.g., for display formulas. But then we would
 // need to know if we're in a display formula.
-docstring InsetMathScript::mathmlize(MathStream & os) const
+void InsetMathScript::mathmlize(MathStream & os) const
 {
        bool d = hasDown() && down().size();
        bool u = hasUp() && up().size();
@@ -629,12 +628,9 @@ docstring InsetMathScript::mathmlize(MathStream & os) const
        else if (d)
                os << MTag("msub");
 
-       docstring rv;
-       if (nuc().size()) {
-               os << MTag("mrow");
-               rv = lyx::mathmlize(nuc(), os);
-               os << ETag("mrow");
-       } else
+       if (nuc().size())
+               os << MTag("mrow") << nuc() << ETag("mrow");
+       else
                os << "<mrow />";
 
        if (u && d)
@@ -645,7 +641,6 @@ docstring InsetMathScript::mathmlize(MathStream & os) const
                os << MTag("mrow") << up() << ETag("mrow") << ETag("msup");
        else if (d)
                os << MTag("mrow") << down() << ETag("mrow") << ETag("msub");
-       return rv;
 }
 
 
index 8d704dca9f912b338514699d90927b3469554bdb..569bc79f3531da354073db0b74a23391ec16fe86 100644 (file)
@@ -61,7 +61,7 @@ public:
        /// write content as something readable by Mathematica
        void mathematica(MathematicaStream &) const;
        /// write content as something resembling MathML
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        /// write content as something readable by Octave
        void octave(OctaveStream &) const;
 
index b2a321234df7366418156ade3ebf5af2004b3f90..c771d2595bcd402c2d7521354353bde781cf1943 100644 (file)
@@ -192,11 +192,11 @@ void InsetMathSpace::octave(OctaveStream & os) const
 }
 
 
-docstring InsetMathSpace::mathmlize(MathStream & ms) const
+void InsetMathSpace::mathmlize(MathStream & ms) const
 {
        SpaceInfo const & si = space_info[space_];
        if (si.negative || !si.visible)
-               return docstring();
+               return;
        string l;
        if (si.custom)
                l = length_.asHTMLString();
@@ -210,7 +210,6 @@ docstring InsetMathSpace::mathmlize(MathStream & ms) const
        if (!l.empty())
                ms << " width=\"" << from_ascii(l) << "\"";
        ms << " />";
-       return docstring();
 }
 
        
index 442fe2e799c2f15ea239fd24b68b6e165dbeb616..3e60b41c12e8409a043b279f50ed75f606afd1f0 100644 (file)
@@ -52,7 +52,7 @@ public:
        ///
        void octave(OctaveStream &) const;
        ///
-       docstring mathmlize(MathStream & ms) const;
+       void mathmlize(MathStream & ms) const;
        ///
        void write(WriteStream & os) const;
        /// generate something that will be understood by the Dialogs.
index b32c2e2302785ef4933ea05869292970d8e1e3bc..2c600d0c2b38791bf7c0852c368fb06630a5a38a 100644 (file)
@@ -147,7 +147,7 @@ void InsetMathSpecialChar::octave(OctaveStream & os) const
 }
 
 
-docstring InsetMathSpecialChar::mathmlize(MathStream & ms) const
+void InsetMathSpecialChar::mathmlize(MathStream & ms) const
 {
        switch (char_) {
        case '&':
@@ -157,7 +157,6 @@ docstring InsetMathSpecialChar::mathmlize(MathStream & ms) const
                ms.os().put(char_);
                break;
        }
-       return docstring();
 }
 
 
index 5dcc0128010071a64563718055faa1d4507863e8..c672b504f688045bce4ba1acabf181f25f7ad756 100644 (file)
@@ -45,7 +45,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream & ms) const;
+       void mathmlize(MathStream & ms) const;
        /// identifies SpecialChar insets
        InsetMathSpecialChar const * asSpecialCharInset() const { return this; }
        ///
index dc154f8f6b6573dde96f5477372c267a349da9b7..f738e2c17bc516db242b681850146839f7050244 100644 (file)
@@ -12,7 +12,6 @@
 
 #include "InsetMathSqrt.h"
 #include "MathData.h"
-#include "MathExtern.h"
 #include "MathStream.h"
 #include "TextPainter.h"
 #include "frontends/Painter.h"
@@ -108,12 +107,9 @@ void InsetMathSqrt::octave(OctaveStream & os) const
 }
 
 
-docstring InsetMathSqrt::mathmlize(MathStream & os) const
+void InsetMathSqrt::mathmlize(MathStream & os) const
 {
-       os << MTag("msqrt");
-       docstring const rv = lyx::mathmlize(cell(0), os);
-       os << ETag("msqrt");
-       return rv;
+       os << MTag("msqrt") << cell(0) << ETag("msqrt");
 }
 
 
index 2cdc0e5a37caad46d9a260b03a0c2cff2dd1e7b2..485f66a574d856016365d63128e1b2dbf3747839 100644 (file)
@@ -44,7 +44,7 @@ public:
        ///
        void octave(OctaveStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        InsetCode lyxCode() const { return MATH_SQRT_CODE; }
 
index 28069ca6adbd17ddb92f7f503bd0429c2a096811..ac951a1838203e0137a2cdc32c4ea3a37bda24b0 100644 (file)
@@ -89,6 +89,13 @@ void InsetMathString::octave(OctaveStream & os) const
 }
 
 
+void InsetMathString::mathmlize(MathStream & /*os*/) const
+{
+       // useless, no doubt, but we should not be here
+       LASSERT(false, /* */);
+}
+
+
 void InsetMathString::write(WriteStream & os) const
 {
        if (!os.latex() || os.lockedMode()) {
index 95b2937c1ca34892dc377bd38777f16713692e4b..9f94a7457fe986f056a7054fe1f159e5ceded9c4 100644 (file)
@@ -47,6 +47,8 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
+       void mathmlize(MathStream &) const;
+       ///
        void write(WriteStream & os) const;
        ///
        InsetCode lyxCode() const { return MATH_STRING_CODE; }
index d09d40b02c901a21c92adf58ea48b5c1cfc4b947..a4a761171fbfd88239be554bbee952041a09f8a6 100644 (file)
@@ -184,7 +184,7 @@ char const * MathMLtype(docstring const & s)
 }
 
 
-docstring InsetMathSymbol::mathmlize(MathStream & os) const
+void InsetMathSymbol::mathmlize(MathStream & os) const
 {
        // FIXME To get this working properly, we need to do add the 
        // XML entity definitions to lib/symbols. And probably do more
@@ -197,7 +197,6 @@ docstring InsetMathSymbol::mathmlize(MathStream & os) const
        else
                os << sym_->xmlname;
        os << " </" << type << '>';
-       return docstring();
 }
 
 
index a9b96fc4b55490ab59e987f47c87f1455d5174fb..5382f72e85712f3fe7ed510465eefdd683070165 100644 (file)
@@ -61,7 +61,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void octave(OctaveStream &) const;
        ///
index ae6f8ce005eaed85851bfcb2477defbf5b0beefd..2cd11c2a8666ed1f537ab58ac6e026fcbe3b6552 100644 (file)
@@ -86,10 +86,9 @@ void InsetMathUnknown::mathematica(MathematicaStream & os) const
 }
 
 
-docstring InsetMathUnknown::mathmlize(MathStream & os) const
+void InsetMathUnknown::mathmlize(MathStream & os) const
 {
        os << MTag("mi") << name_ << ETag("mi");
-       return docstring();
 }
 
 
index 9493ecfc2827e1b5a0c826b3742a1d4e6caa3980..b43bcfd6721a010e594b4dfba2d3ee8645f8495d 100644 (file)
@@ -50,7 +50,7 @@ public:
        ///
        void mathematica(MathematicaStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void octave(OctaveStream &) const;
        ///
index ee7ceebe4f29ffd40bb2bf3a92dc54131d03405f..f9b9f42af2d9a1af304fc4c0e07fbef13adf3903 100644 (file)
@@ -1413,22 +1413,20 @@ void mathematica(MathData const & dat, MathematicaStream & os)
 }
 
 
-docstring mathmlize(MathData const & dat, MathStream & os)
+void mathmlize(MathData const & dat, MathStream & os)
 {
        MathData ar = dat;
        extractStructure(ar, MATHML);
-       docstring retval;
        if (ar.size() == 0)
                os << "<mrow/>";
        else if (ar.size() == 1)
-               retval = ar.front()->mathmlize(os);
+               os << ar.front();
        else {
                os << MTag("mrow");
                for (MathData::const_iterator it = ar.begin(); it != ar.end(); ++it)
-                       retval += (*it)->mathmlize(os);
+                       (*it)->mathmlize(os);
                os << ETag("mrow");
        }
-       return retval;
 }
 
 // convert this inset somehow to a number
index d367b1e901e33ba2331dcd27a2f60b6a94191708..199295ae960511a633e0e2440feae16922b55609 100644 (file)
@@ -30,7 +30,7 @@ void normalize(MathData const &, NormalStream &);
 void maple(MathData const &, MapleStream &);
 void maxima(MathData const &, MaximaStream &);
 void mathematica(MathData const &, MathematicaStream &);
-docstring mathmlize(MathData const &, MathStream &);
+void mathmlize(MathData const &, MathStream &);
 void octave(MathData const &, OctaveStream &);
 
 bool extractNumber(MathData const & ar, int & i);
index dd7ccf3e713ee4ae3eb749c9242d4f987d56ea79..5564600d06487f06ed46261486e9ed608e80eaa3 100644 (file)
@@ -73,10 +73,7 @@ public:
        }
        // FIXME Other external things need similar treatment.
        ///
-       docstring mathmlize(MathStream & ms) const {
-               ms << mathMacro_.cell(idx_);
-               return docstring();
-       }
+       void mathmlize(MathStream & ms) const { ms << mathMacro_.cell(idx_); }
        ///
        void draw(PainterInfo & pi, int x, int y) const {
                if (mathMacro_.editMetrics(pi.base.bv)) {
@@ -743,10 +740,9 @@ void MathMacro::maple(MapleStream & os) const
 }
 
 
-docstring MathMacro::mathmlize(MathStream & os) const
+void MathMacro::mathmlize(MathStream & os) const
 {
        os << expanded_.cell(0);
-       return docstring();
 }
 
 
index bb9ed723cafae160d949077e248d8829e27246de..b431a9a9a516c9344117d618cab328cd3ee6ae72 100644 (file)
@@ -71,7 +71,7 @@ public:
        ///
        void maple(MapleStream &) const;
        ///
-       docstring mathmlize(MathStream &) const;
+       void mathmlize(MathStream &) const;
        ///
        void octave(OctaveStream &) const;
        ///