]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_xymatrixinset.C
Fix to bug 2362: Deleting superscript also deletes subscript.
[lyx.git] / src / mathed / math_xymatrixinset.C
index 46da10ee9675f42a62855086fb21a6e121b5acc0..581dab36eecdf38db12fe2ea1b2c94f0adc7eb14 100644 (file)
@@ -1,19 +1,31 @@
-#include <config.h>
+/**
+ * \file math_xymatrixinset.C
+ * This file is part of LyX, the document processor.
+ * Licence details can be found in the file COPYING.
+ *
+ * \author André Pönitz
+ *
+ * Full author contact details are available in file CREDITS.
+ */
 
+#include <config.h>
 
 #include "math_xymatrixinset.h"
 #include "math_mathmlstream.h"
 #include "math_streamstr.h"
 
+#include "LaTeXFeatures.h"
+#include "support/std_ostream.h"
+
 
 MathXYMatrixInset::MathXYMatrixInset()
        : MathGridInset(1, 1)
 {}
 
 
-MathInset * MathXYMatrixInset::clone() const
+std::auto_ptr<InsetBase> MathXYMatrixInset::doClone() const
 {
-       return new MathXYMatrixInset(*this);
+       return std::auto_ptr<InsetBase>(new MathXYMatrixInset(*this));
 }
 
 
@@ -29,12 +41,11 @@ int MathXYMatrixInset::rowsep() const
 }
 
 
-void MathXYMatrixInset::metrics(MetricsInfo & st) const
+void MathXYMatrixInset::metrics(MetricsInfo & mi, Dimension & dim) const
 {
-       MetricsInfo mi = st;
        if (mi.base.style == LM_ST_DISPLAY)
                mi.base.style = LM_ST_TEXT;
-       MathGridInset::metrics(mi);
+       MathGridInset::metrics(mi, dim);
 }
 
 
@@ -46,6 +57,13 @@ void MathXYMatrixInset::write(WriteStream & os) const
 }
 
 
+void MathXYMatrixInset::infoize(std::ostream & os) const
+{
+       os << "xymatrix ";
+       MathGridInset::infoize(os);
+}
+
+
 void MathXYMatrixInset::normalize(NormalStream & os) const
 {
        os << "[xymatrix ";