Inset const * inset = getInset(i);
if (inset) {
- InsetCommand const * ic = inset->asInsetCommand();
- InsetLayout const & il = inset->getLayout();
- InsetMath const * im = inset->asInsetMath();
- if (!runparams.for_toc
- || im || il.isInToc() || (ic && ic->isInToc())) {
+ if (!runparams.for_toc || inset->isInToc()) {
OutputParams np = runparams;
- if (!il.htmlisblock())
+ if (!inset->getLayout().htmlisblock())
np.html_in_par = true;
retval += inset->xhtml(xs, np);
}
return getLayout().isKeepEmpty();
}
+
bool Inset::forceLTR() const
{
return getLayout().forceLTR();
}
+bool Inset::isInToc() const
+{
+ return getLayout().isInToc();
+}
+
+
docstring Inset::toolTip(BufferView const &, int, int) const
{
return docstring();
virtual bool allowEmpty() const;
/// Force inset into LTR environment if surroundings are RTL
virtual bool forceLTR() const;
+ /// whether to include this inset in the strings generated for the TOC
+ virtual bool isInToc() const;
/// Where should we go when we press the up or down cursor key?
virtual bool idxUpDown(Cursor & cur, bool up) const;
void setParam(std::string const & name, docstring const & value);
/// FIXME Remove
docstring const getFirstNonOptParam() const { return p_.getFirstNonOptParam(); }
- /// whether to include this inset in the strings generated for the TOC
- virtual bool isInToc() const { return false; }
/// \name Methods inherited from Inset class
//@{
/// Force inset into LTR environment if surroundings are RTL
bool forceLTR() const { return true; }
///
- virtual bool isInToc() const { return true; }
+ bool isInToc() const { return true; }
///
docstring contextMenu(BufferView const & bv, int x, int y) const;
///
docstring toolTip(BufferView const & bv, int x, int y) const;
+
private:
///
void doDispatch(Cursor & cur, FuncRequest & cmd);
/// superscript kerning
virtual int kerning(BufferView const *) const { return 0; }
///
+ bool isInToc() const { return true; }
+ ///
InsetCode lyxCode() const { return MATH_CODE; }
};