From 48ab3bd01ec228932338893b01d1b8fa17134435 Mon Sep 17 00:00:00 2001 From: Abdelrazak Younes Date: Fri, 23 Feb 2007 08:27:03 +0000 Subject: [PATCH] * InsetMathMBox.h: - encapsulate within MATH_MBOX macro. - implement default constructor. git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@17309 a592a061-630c-0410-9148-cb99ea01b6c8 --- src/mathed/InsetMathMBox.C | 7 +++++++ src/mathed/InsetMathMBox.h | 11 ++++++++++- 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/src/mathed/InsetMathMBox.C b/src/mathed/InsetMathMBox.C index 57bcef3369..864e54cf21 100644 --- a/src/mathed/InsetMathMBox.C +++ b/src/mathed/InsetMathMBox.C @@ -34,6 +34,13 @@ using std::auto_ptr; using std::endl; +InsetMathMBox::InsetMathMBox() +{ + text_.paragraphs().clear(); + text_.paragraphs().push_back(Paragraph()); +} + + InsetMathMBox::InsetMathMBox(LyXLayout_ptr const & layout) { text_.paragraphs().clear(); diff --git a/src/mathed/InsetMathMBox.h b/src/mathed/InsetMathMBox.h index 3581efa495..a3ee6fbfd4 100644 --- a/src/mathed/InsetMathMBox.h +++ b/src/mathed/InsetMathMBox.h @@ -9,6 +9,10 @@ * Full author contact details are available in file CREDITS. */ +#define MATH_MBOX + +#ifdef MATH_MBOX + #ifndef MATH_MBOXINSET_H #define MATH_MBOXINSET_H @@ -26,7 +30,9 @@ class BufferView; class InsetMathMBox : public InsetMathDim { public: /// + explicit InsetMathMBox(); explicit InsetMathMBox(LyXLayout_ptr const & layout); + /// this stores metrics information in cache_ bool metrics(MetricsInfo & mi, Dimension & dim) const; /// draw according to cached metrics @@ -61,4 +67,7 @@ private: } // namespace lyx -#endif + +#endif //MATH_MBOXINSET_H + +#endif //MATH_MBOX -- 2.39.2