From 921f1144ccfaf0f118475e2c6b8da41768df00fc Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 16 Jul 2006 17:19:05 +0000 Subject: [PATCH] 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 --- src/mathed/math_binominset.C | 6 ++++++ src/mathed/math_binominset.h | 2 ++ src/mathed/math_fracinset.C | 6 ++++++ src/mathed/math_fracinset.h | 2 ++ 4 files changed, 16 insertions(+) diff --git a/src/mathed/math_binominset.C b/src/mathed/math_binominset.C index 7e89c8f3f3..c2718bb049 100644 --- a/src/mathed/math_binominset.C +++ b/src/mathed/math_binominset.C @@ -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_) diff --git a/src/mathed/math_binominset.h b/src/mathed/math_binominset.h index 08a8985765..28a2bbadf8 100644 --- a/src/mathed/math_binominset.h +++ b/src/mathed/math_binominset.h @@ -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 doClone() const; /// diff --git a/src/mathed/math_fracinset.C b/src/mathed/math_fracinset.C index a84fff3f5a..2ba15ab462 100644 --- a/src/mathed/math_fracinset.C +++ b/src/mathed/math_fracinset.C @@ -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) << ')'; diff --git a/src/mathed/math_fracinset.h b/src/mathed/math_fracinset.h index 00c05753a0..1abb102f8f 100644 --- a/src/mathed/math_fracinset.h +++ b/src/mathed/math_fracinset.h @@ -42,6 +42,8 @@ public: MathFracInset const * asFracInset() const; /// std::string name() const; + /// + bool extraBraces() const; /// void write(WriteStream & os) const; -- 2.39.2