Fix bug 2481

* src/mathed/math_fracinset.[Ch]
	(MathFracInset::extraBraces): new, return true for \atop
	* src/mathed/math_binominset.[Ch]
	(MathBinomInset::extraBraces): new, return true for \choose


git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@14470 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
Georg Baum 2006-07-16 17:19:05 +00:00
parent 24319e60b9
commit 921f1144cc
4 changed files with 16 additions and 0 deletions

View File

@ -68,6 +68,12 @@ void MathBinomInset::draw(PainterInfo & pi, int x, int y) const
}
bool MathBinomInset::extraBraces() const
{
return choose_;
}
void MathBinomInset::write(WriteStream & os) const
{
if (choose_)

View File

@ -28,6 +28,8 @@ public:
void metrics(MetricsInfo & mi, Dimension & dim) const;
///
void draw(PainterInfo &, int x, int y) const;
///
bool extraBraces() const;
private:
virtual std::auto_ptr<InsetBase> doClone() const;
///

View File

@ -141,6 +141,12 @@ string MathFracInset::name() const
}
bool MathFracInset::extraBraces() const
{
return kind_ == ATOP;
}
void MathFracInset::maple(MapleStream & os) const
{
os << '(' << cell(0) << ")/(" << cell(1) << ')';

View File

@ -42,6 +42,8 @@ public:
MathFracInset const * asFracInset() const;
///
std::string name() const;
///
bool extraBraces() const;
///
void write(WriteStream & os) const;