]> git.lyx.org Git - lyx.git/commitdiff
Fix bug 2481
authorGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 16 Jul 2006 17:19:05 +0000 (17:19 +0000)
committerGeorg Baum <Georg.Baum@post.rwth-aachen.de>
Sun, 16 Jul 2006 17:19:05 +0000 (17:19 +0000)
* 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
src/mathed/math_binominset.h
src/mathed/math_fracinset.C
src/mathed/math_fracinset.h

index 7e89c8f3f3a2c3f886eae54607c2cbe0d6bdd0ff..c2718bb049726d0afe2ad7a98e0118cb8c30333e 100644 (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_)
index 08a8985765661edd8bb3328ddb4f29796bfbfcaa..28a2bbadf8f72997a53905e3d7d8555e5dbf14eb 100644 (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;
        ///
index a84fff3f5a7fe9fbd691f916992ca46030b8f3bc..2ba15ab46282200371bb2206f7519db53eb01e91 100644 (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) << ')';
index 00c05753a0e75931fc4a64ec3979fd89f3cf58c1..1abb102f8f950d129c4b9912081a8d99b64a53d7 100644 (file)
@@ -42,6 +42,8 @@ public:
        MathFracInset const * asFracInset() const;
        ///
        std::string name() const;
+       ///
+       bool extraBraces() const;
 
        ///
        void write(WriteStream & os) const;