#include <config.h>
-#include "LaTeXFeatures.h"
#include "math_decorationinset.h"
#include "math_data.h"
#include "math_support.h"
#include "math_mathmlstream.h"
#include "math_streamstr.h"
+#include "LaTeXFeatures.h"
#include "debug.h"
#include "support/std_ostream.h"
-using std::auto_ptr;
-
MathDecorationInset::MathDecorationInset(latexkeys const * key)
: MathNestInset(1), key_(key)
}
-auto_ptr<InsetBase> MathDecorationInset::doClone() const
+std::auto_ptr<InsetBase> MathDecorationInset::doClone() const
{
- return auto_ptr<InsetBase>(new MathDecorationInset(*this));
+ return std::auto_ptr<InsetBase>(new MathDecorationInset(*this));
}
bool MathDecorationInset::ams() const
{
- return
+ return
key_->name == "overleftrightarrow" ||
key_->name == "underleftarrow" ||
key_->name == "underrightarrow" ||
mathed_draw_deco(pi, x + 1 + (cell(0).width() - dw_) / 2,
y + dy_, dw_, dh_, key_->name);
drawMarkers(pi, x, y);
-}
-
-
-void MathDecorationInset::validate(LaTeXFeatures & features) const
-{
- if (ams())
- features.require("amsmath");
+ setPosCache(pi, x, y);
}
{
os << "Deco: " << key_->name;
}
+
+
+void MathDecorationInset::validate(LaTeXFeatures & features) const
+{
+ if (ams())
+ features.require("amsmath");
+ MathNestInset::validate(features);
+}