mirror of
https://git.lyx.org/repos/lyx.git
synced 2024-11-15 07:16:48 +00:00
InsetIndex: add a method hasSubentries.
This commit is contained in:
parent
029d8d5839
commit
5c80671740
@ -769,6 +769,23 @@ std::vector<docstring> InsetIndex::getSeeAlsoesAsText(OutputParams const & runpa
|
||||
}
|
||||
|
||||
|
||||
bool InsetIndex::hasSubentries() const
|
||||
{
|
||||
Paragraph const & par = paragraphs().front();
|
||||
InsetList::const_iterator it = par.insetList().begin();
|
||||
for (; it != par.insetList().end(); ++it) {
|
||||
Inset & inset = *it->inset;
|
||||
if (inset.lyxCode() == INDEXMACRO_CODE) {
|
||||
InsetIndexMacro const & iim =
|
||||
static_cast<InsetIndexMacro const &>(inset);
|
||||
if (iim.params().type == InsetIndexMacroParams::Subindex)
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool InsetIndex::hasSeeRef() const
|
||||
{
|
||||
Paragraph const & par = paragraphs().front();
|
||||
|
@ -106,6 +106,8 @@ private:
|
||||
///
|
||||
std::vector<docstring> getSeeAlsoesAsText(OutputParams const & runparams) const;
|
||||
///
|
||||
bool hasSubentries() const;
|
||||
///
|
||||
bool hasSeeRef() const;
|
||||
///
|
||||
bool hasSortKey() const;
|
||||
|
Loading…
Reference in New Issue
Block a user