}
+docstring InsetCollapsable::getCaptionText(OutputParams const & runparams) const
+{
+ if (paragraphs().empty())
+ return docstring();
+
+ InsetCaption const * ins = getCaptionInset();
+ if (ins == 0)
+ return docstring();
+
+ odocstringstream ods;
+ ins->getCaptionText(ods, runparams);
+ return ods.str();
+}
+
+
+docstring InsetCollapsable::getCaptionHTML(OutputParams const & runparams) const
+{
+ if (paragraphs().empty())
+ return docstring();
+
+ InsetCaption const * ins = getCaptionInset();
+ if (ins == 0)
+ return docstring();
+
+ odocstringstream ods;
+ docstring def = ins->getCaptionHTML(ods, runparams);
+ if (!def.empty())
+ ods << def << '\n';
+ return ods.str();
+}
+
+
InsetLayout::InsetDecoration InsetCollapsable::decoration() const
{
if (!layout_)
///
InsetCaption const * getCaptionInset() const;
///
+ docstring getCaptionText(OutputParams const &) const;
+ ///
+ docstring getCaptionHTML(OutputParams const &) const;
+ ///
mutable CollapseStatus status_;
private:
/// cache for the layout_. Make sure it is in sync with the document class!
}
-docstring InsetFloat::getCaptionText(OutputParams const & runparams) const
-{
- if (paragraphs().empty())
- return docstring();
-
- InsetCaption const * ins = getCaptionInset();
- if (ins == 0)
- return docstring();
-
- odocstringstream ods;
- ins->getCaptionText(ods, runparams);
- return ods.str();
-}
-
-
-docstring InsetFloat::getCaptionHTML(OutputParams const & runparams) const
-{
- if (paragraphs().empty())
- return docstring();
-
- InsetCaption const * ins = getCaptionInset();
- if (ins == 0)
- return docstring();
-
- odocstringstream ods;
- docstring def = ins->getCaptionHTML(ods, runparams);
- if (!def.empty())
- ods << def << '\n';
- return ods.str();
-}
-
-
void InsetFloat::string2params(string const & in, InsetFloatParams & params)
{
params = InsetFloatParams();
///
docstring getCaption(OutputParams const &) const;
///
- docstring getCaptionText(OutputParams const &) const;
- ///
- docstring getCaptionHTML(OutputParams const &) const;
- ///
InsetFloatParams params_;
///
docstring name_;