]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_inset.C
enable direct input of #1...#9; some whitespace changes
[lyx.git] / src / mathed / math_inset.C
index 37000b258379e5ce5670c1b78a4d8802cc19bc3f..7b1b8cfba162b1dcdcf732f8e718d3f4ac20d679 100644 (file)
 #include "debug.h"
 
 
-MathInset::MathInset()
-{}
-
-
-MathInset::~MathInset()
-{}
-
-
 int MathInset::height() const
 {
        return ascent() + descent();
@@ -44,7 +36,7 @@ int MathInset::height() const
 
 std::ostream & operator<<(std::ostream & os, MathInset const & inset)
 {
-       WriteStream wi(0, os, false);
+       WriteStream wi(os, false);
        inset.write(wi);
        return os;
 }
@@ -86,6 +78,15 @@ MathArray const & MathInset::cell(idx_type) const
 }
 
 
+MathInset::idx_type MathInset::index(row_type row, col_type col) const
+{
+       if (row != 0)
+               lyxerr << "illegal row: " << row << "\n";
+       if (col != 0)
+               lyxerr << "illegal col: " << col << "\n";
+       return 0;
+}
+
 void MathInset::substitute(MathMacro const &)
 {}
 
@@ -114,13 +115,13 @@ bool MathInset::idxLeft(idx_type &, pos_type &) const
 }
 
 
-bool MathInset::idxUp(idx_type &, pos_type &) const
+bool MathInset::idxUp(idx_type &) const
 {
        return false;
 }
 
 
-bool MathInset::idxDown(idx_type &, pos_type &) const
+bool MathInset::idxDown(idx_type &) const
 {
        return false;
 }
@@ -164,7 +165,7 @@ void MathInset::idxDeleteRange(idx_type, idx_type)
 void MathInset::normalize(NormalStream & os) const
 {
        os << "[unknown ";
-       WriteStream wi(0, os.os_, false);
+       WriteStream wi(os.os(), false);
        write(wi);
        os << "] ";
 }
@@ -173,19 +174,12 @@ void MathInset::normalize(NormalStream & os) const
 void MathInset::dump() const
 {
        lyxerr << "---------------------------------------------\n";
-       WriteStream wi(0, lyxerr, false);
+       WriteStream wi(lyxerr, false);
        write(wi);
        lyxerr << "\n---------------------------------------------\n";
 }
 
 
-bool MathInset::covers(int, int) const
-{
-       lyxerr << "MathInset::covers() called directly!\n";
-       return false;
-}
-
-
 void MathInset::validate(LaTeXFeatures &) const
 {}
 
@@ -220,20 +214,20 @@ void MathInset::write(WriteStream &) const
 
 void MathInset::octavize(OctaveStream & os) const
 {
-       NormalStream ns(os.os_);
+       NormalStream ns(os.os());
        normalize(ns);
 }
 
 
 void MathInset::maplize(MapleStream & os) const
 {
-       NormalStream ns(os.os_);
+       NormalStream ns(os.os());
        normalize(ns);
 }
 
 
 void MathInset::mathmlize(MathMLStream & os) const
 {
-       NormalStream ns(os.os_);
+       NormalStream ns(os.os());
        normalize(ns);
 }