]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathScript.C
cursor is no more damaging the background. L-shaped cursor is broken right now....
[lyx.git] / src / mathed / InsetMathScript.C
index b55962fb218c01e045c342fb0d921dc115a3fc92..d6a8eda75a7e8b2570e5322fae22fe393bb216a2 100644 (file)
@@ -12,7 +12,7 @@
 
 #include "InsetMathScript.h"
 #include "MathData.h"
-#include "MathMLStream.h"
+#include "MathStream.h"
 #include "MathSupport.h"
 #include "InsetMathSymbol.h"
 #include "dispatchresult.h"
@@ -23,7 +23,8 @@
 
 #include <boost/assert.hpp>
 
-using lyx::char_type;
+
+namespace lyx {
 
 using std::string;
 using std::max;
@@ -246,7 +247,7 @@ void InsetMathScript::draw(PainterInfo & pi, int x, int y) const
        if (nuc().size())
                nuc().draw(pi, x + dxx(), y);
        else {
-               nuc().setXY(x + dxx(), y);
+               nuc().setXY(*pi.base.bv, x + dxx(), y);
                if (editing(pi.base.bv))
                         pi.draw(x + dxx(), y, char_type('.'));
        }
@@ -297,10 +298,10 @@ bool InsetMathScript::hasLimits() const
 
        if (nuc().back()->asSymbolInset()) {
                // \intop is an alias for \int\limits, \ointop == \oint\limits
-               if (nuc().back()->asSymbolInset()->name().find("intop") != string::npos)
+               if (nuc().back()->asSymbolInset()->name().find(from_ascii("intop")) != string::npos)
                        return true;
                // per default \int has limits beside the \int even in displayed formulas
-               if (nuc().back()->asSymbolInset()->name().find("int") != string::npos)
+               if (nuc().back()->asSymbolInset()->name().find(from_ascii("int")) != string::npos)
                        return false;
        }
 
@@ -509,7 +510,7 @@ void InsetMathScript::mathematica(MathematicaStream & os) const
 }
 
 
-void InsetMathScript::mathmlize(MathMLStream & os) const
+void InsetMathScript::mathmlize(MathStream & os) const
 {
        bool d = hasDown() && down().size();
        bool u = hasUp() && up().size();
@@ -546,13 +547,13 @@ void InsetMathScript::octave(OctaveStream & os) const
 }
 
 
-void InsetMathScript::infoize(std::ostream & os) const
+void InsetMathScript::infoize(odocstream & os) const
 {
        os << "Scripts";
 }
 
 
-void InsetMathScript::infoize2(std::ostream & os) const
+void InsetMathScript::infoize2(odocstream & os) const
 {
        if (limits_)
                os << (limits_ == 1 ? ", Displayed limits" : ", Inlined limits");
@@ -622,3 +623,6 @@ void InsetMathScript::doDispatch(LCursor & cur, FuncRequest & cmd)
 
        InsetMathNest::doDispatch(cur, cmd);
 }
+
+
+} // namespace lyx