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();
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();
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;
void InsetMathHull::splitTo3Cols()
{
- LASSERT(ncols() < 3, /**/);
+ LASSERT(ncols() < 3, return);
if (ncols() < 2)
splitTo2Cols();
InsetMathGrid::addCol(2);
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());
}
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
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) {
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;