mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-25 19:07:45 +00:00
Proper implementatiom of isInToc()
git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@35846 a592a061-630c-0410-9148-cb99ea01b6c8
This commit is contained in:
parent
2e42a7b645
commit
8693ae474b
@ -2725,13 +2725,9 @@ docstring Paragraph::simpleLyXHTMLOnePar(Buffer const & buf,
|
||||
|
||||
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);
|
||||
}
|
||||
|
@ -234,12 +234,19 @@ bool Inset::allowEmpty() const
|
||||
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();
|
||||
|
@ -226,6 +226,8 @@ public:
|
||||
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;
|
||||
|
@ -63,8 +63,6 @@ public:
|
||||
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
|
||||
//@{
|
||||
|
@ -54,11 +54,12 @@ public:
|
||||
/// 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);
|
||||
|
@ -216,6 +216,8 @@ public:
|
||||
/// superscript kerning
|
||||
virtual int kerning(BufferView const *) const { return 0; }
|
||||
///
|
||||
bool isInToc() const { return true; }
|
||||
///
|
||||
InsetCode lyxCode() const { return MATH_CODE; }
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user