]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/math_charinset.C
forward search in math insets. ugly. seems to work. don't ask why.
[lyx.git] / src / mathed / math_charinset.C
index a19d79aef66dd63655b9ef8e3be71328e497fa29..0a9370637dcf46bc3c97a0be282fa268bdcc4dbf 100644 (file)
@@ -1,3 +1,5 @@
+#include <config.h>
+
 #ifdef __GNUG__
 #pragma implementation
 #endif
@@ -96,9 +98,9 @@ void MathCharInset::writeRaw(std::ostream & os) const
 
 void MathCharInset::write(WriteStream & os) const
 {
-       writeHeader(os.os);
-       writeRaw(os.os);
-       writeTrailer(os.os);
+       writeHeader(os.os());
+       writeRaw(os.os());
+       writeTrailer(os.os());
 }
 
 
@@ -118,3 +120,10 @@ void MathCharInset::handleFont(MathTextCodes t)
 {
        code_ = (code_ == t) ? LM_TC_VAR : t;
 }
+
+
+bool MathCharInset::match(MathInset * p) const
+{
+       MathCharInset const * q = p->asCharInset();
+       return q && char_ == q->char_ && code_ == q->code_;
+}