X-Git-Url: https://git.lyx.org/gitweb/?a=blobdiff_plain;f=src%2Fmathed%2FInsetMathTabular.cpp;h=083b0e5ef52d99b4d6bd59886ed5f0ed53edea4a;hb=872c71ffa61e52918a12c847ef7f87b10741d75a;hp=636c2c29f126885d76a706dedf98ae52c5bdea87;hpb=5e0121cf5854a2a0039e6cb4970aeddb18bd4b23;p=lyx.git diff --git a/src/mathed/InsetMathTabular.cpp b/src/mathed/InsetMathTabular.cpp index 636c2c29f1..083b0e5ef5 100644 --- a/src/mathed/InsetMathTabular.cpp +++ b/src/mathed/InsetMathTabular.cpp @@ -3,7 +3,7 @@ * This file is part of LyX, the document processor. * Licence details can be found in the file COPYING. * - * \author André Pönitz + * \author André Pönitz * * Full author contact details are available in file CREDITS. */ @@ -20,17 +20,17 @@ #include - namespace lyx { -InsetMathTabular::InsetMathTabular(docstring const & name, int m, int n) - : InsetMathGrid(m, n), name_(name) +InsetMathTabular::InsetMathTabular(Buffer * buf, docstring const & name, int m, + int n) + : InsetMathGrid(buf, m, n), name_(name) {} -InsetMathTabular::InsetMathTabular(docstring const & name, int m, int n, - char valign, docstring const & halign) - : InsetMathGrid(m, n, valign, halign), name_(name) +InsetMathTabular::InsetMathTabular(Buffer * buf, docstring const & name, int m, + int n, char valign, docstring const & halign) + : InsetMathGrid(buf, m, n, valign, halign), name_(name) {} @@ -66,6 +66,8 @@ void InsetMathTabular::draw(PainterInfo & pi, int x, int y) const void InsetMathTabular::write(WriteStream & os) const { + ModeSpecifier specifier(os, TEXT_MODE); + if (os.fragile()) os << "\\protect"; os << "\\begin{" << name_ << '}';