]> git.lyx.org Git - features.git/commitdiff
Move these, too, so they can be used in InsetListings, and maybe
authorRichard Heck <rgheck@comcast.net>
Fri, 19 Jun 2009 13:16:27 +0000 (13:16 +0000)
committerRichard Heck <rgheck@comcast.net>
Fri, 19 Jun 2009 13:16:27 +0000 (13:16 +0000)
even elsewhere.

git-svn-id: svn://svn.lyx.org/lyx/lyx-devel/trunk@30184 a592a061-630c-0410-9148-cb99ea01b6c8

src/insets/InsetCollapsable.cpp
src/insets/InsetCollapsable.h
src/insets/InsetFloat.cpp
src/insets/InsetFloat.h

index ef9fba98c201c0d543f36ec051767ef0ce3bce2b..b12cb7025d7678057dc64ba52bca2503027091cc 100644 (file)
@@ -802,6 +802,38 @@ InsetCaption const * InsetCollapsable::getCaptionInset() const
 }
 
 
+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_)
index a6213296bac8782c8ea0752ae1cf78451e83d72b..730e4c6e37b9305f15f2ea1fa55f313ef420b272 100644 (file)
@@ -183,6 +183,10 @@ protected:
        ///
        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!
index 4cec685bd02ee73920cdcdbe9f72eac5e751eacd..194e4f769a7beeb5e6e039ba9df6d6aff2fb4f2e 100644 (file)
@@ -486,38 +486,6 @@ docstring InsetFloat::getCaption(OutputParams const & runparams) const
 }
 
 
-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();
index 31ed0270845b9e53f3cf2af6f7b2f29861d8ee1c..a5ea2ef64f85f7c2a8df0ed6fd1a163a0801032e 100644 (file)
@@ -111,10 +111,6 @@ private:
        ///
        docstring getCaption(OutputParams const &) const;
        ///
-       docstring getCaptionText(OutputParams const &) const;
-       ///
-       docstring getCaptionHTML(OutputParams const &) const;
-       ///
        InsetFloatParams params_;
        ///
        docstring name_;