]> git.lyx.org Git - lyx.git/blobdiff - src/mathed/InsetMathHull.cpp
Rename some LFUN names to match their text name
[lyx.git] / src / mathed / InsetMathHull.cpp
index 7002a9b01ebc9b10f21e1dfd3f6fe605541d1fac..956b6b9bca220271066bf090aff0e89a32191827 100644 (file)
@@ -412,7 +412,9 @@ ColorCode InsetMathHull::standardColor() const
 
 bool InsetMathHull::previewState(BufferView * bv) const
 {
-       if (!editing(bv) && RenderPreview::status() == LyXRC::PREVIEW_ON) {
+       if (!editing(bv) && RenderPreview::status() == LyXRC::PREVIEW_ON
+               && type_ != hullRegexp)
+       {
                graphics::PreviewImage const * pimage =
                        preview_->getPreviewImage(bv->buffer());
                return pimage && pimage->image();
@@ -663,7 +665,7 @@ bool InsetMathHull::notifyCursorLeaves(Cursor const & old, Cursor & cur)
 
 docstring InsetMathHull::label(row_type row) const
 {
-       LASSERT(row < nrows(), /**/);
+       LASSERT(row < nrows(), return docstring());
        if (InsetLabel * il = label_[row])
                return il->screenLabel();
        return docstring();
@@ -1020,7 +1022,7 @@ void InsetMathHull::glueall(HullType type)
 
 void InsetMathHull::splitTo2Cols()
 {
-       LASSERT(ncols() == 1, /**/);
+       LASSERT(ncols() == 1, return);
        InsetMathGrid::addCol(1);
        for (row_type row = 0; row < nrows(); ++row) {
                idx_type const i = 2 * row;
@@ -1033,7 +1035,7 @@ void InsetMathHull::splitTo2Cols()
 
 void InsetMathHull::splitTo3Cols()
 {
-       LASSERT(ncols() < 3, /**/);
+       LASSERT(ncols() < 3, return);
        if (ncols() < 2)
                splitTo2Cols();
        InsetMathGrid::addCol(2);
@@ -1263,9 +1265,9 @@ void InsetMathHull::infoize(odocstream & os) const
 
 void InsetMathHull::check() const
 {
-       LASSERT(numbered_.size() == nrows(), /**/);
-       LASSERT(numbers_.size() == nrows(), /**/);
-       LASSERT(label_.size() == nrows(), /**/);
+       LATTEST(numbered_.size() == nrows());
+       LATTEST(numbers_.size() == nrows());
+       LATTEST(label_.size() == nrows());
 }
 
 
@@ -1432,7 +1434,7 @@ void InsetMathHull::doDispatch(Cursor & cur, FuncRequest & cmd)
                break;
        }
 
-       case LFUN_LABEL_COPY_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REFERENCE: {
                row_type row;
                if (cmd.argument().empty() && &cur.inset() == this)
                        // if there is no argument and we're inside math, we retrieve
@@ -1628,7 +1630,7 @@ bool InsetMathHull::getStatus(Cursor & cur, FuncRequest const & cmd,
                status.setEnabled(type_ != hullSimple);
                return true;
 
-       case LFUN_LABEL_COPY_AS_REF: {
+       case LFUN_LABEL_COPY_AS_REFERENCE: {
                bool enabled = false;
                row_type row;
                if (cmd.argument().empty() && &cur.inset() == this) {
@@ -2205,7 +2207,7 @@ docstring InsetMathHull::xhtml(XHTMLStream & xs, OutputParams const & op) const
                        string const tag = (getType() == hullSimple) ? "span" : "div";
                        xs << html::CR()
                           << html::StartTag(tag)
-                                << html::CompTag("img", "src=\"" + filename + "\"")
+                                << html::CompTag("img", "src=\"" + filename + "\" alt=\"Mathematical Equation\"")
                                 << html::EndTag(tag)
                                 << html::CR();
                        success = true;