}
+bool InsetBranch::producesOutput() const
+{
+ return isBranchSelected(false) != params_.inverted;
+}
+
+
void InsetBranch::latex(otexstream & os, OutputParams const & runparams) const
{
- if (isBranchActive())
+ if (producesOutput())
InsetText::latex(os, runparams);
}
int InsetBranch::plaintext(odocstringstream & os,
OutputParams const & runparams, size_t max_length) const
{
- if (!isBranchActive())
+ if (!producesOutput())
return 0;
int len = InsetText::plaintext(os, runparams, max_length);
int InsetBranch::docbook(odocstream & os,
OutputParams const & runparams) const
{
- return isBranchActive() ? InsetText::docbook(os, runparams) : 0;
+ return producesOutput() ? InsetText::docbook(os, runparams) : 0;
}
docstring InsetBranch::xhtml(XHTMLStream & xs, OutputParams const & rp) const
{
- if (isBranchActive()) {
+ if (producesOutput()) {
OutputParams newrp = rp;
newrp.par_begin = 0;
newrp.par_end = text().paragraphs().size();
void InsetBranch::toString(odocstream & os) const
{
- if (isBranchActive())
+ if (producesOutput())
InsetCollapsable::toString(os);
}
void InsetBranch::forOutliner(docstring & os, size_t const maxlen,
bool const shorten) const
{
- if (isBranchActive())
+ if (producesOutput())
InsetCollapsable::forOutliner(os, maxlen, shorten);
}
void InsetBranch::validate(LaTeXFeatures & features) const
{
- if (isBranchActive())
+ if (producesOutput())
InsetCollapsable::validate(features);
}
bool InsetBranch::isMacroScope() const
{
// Its own scope if not selected by buffer
- return !isBranchActive();
+ return !producesOutput();
}
toc->push_back(TocItem(pit, 0, str, output_active));
// Proceed with the rest of the inset.
- bool const doing_output = output_active && isBranchActive();
+ bool const doing_output = output_active && producesOutput();
InsetCollapsable::addToToc(cpit, doing_output, utype);
}
\c buffer. \p child only checks within child documents.
*/
bool isBranchSelected(bool const child = false) const;
- ///
- bool isBranchActive(bool const child = false) const
- // XOR
- { return isBranchSelected(child) != params_.inverted; }
/*!
* Is the content of this inset part of the output document?
*
- * Note that Branch insets are only considered part of the
- * document when they are selected.
+ * Note that Branch insets are considered part of the
+ * document when they are selected XOR inverted.
*/
- bool producesOutput() const { return isBranchSelected(); }
+ bool producesOutput() const;
///
bool getStatus(Cursor &, FuncRequest const &, FuncStatus &) const;
///