]> git.lyx.org Git - features.git/blobdiff - src/insets/InsetFloat.cpp
Move getCaptionInset() to InsetCollapsable, so it can be used in InsetListings.
[features.git] / src / insets / InsetFloat.cpp
index 271090f1614778b41983d678d8214c6b59a22fb6..4cec685bd02ee73920cdcdbe9f72eac5e751eacd 100644 (file)
@@ -25,7 +25,6 @@
 #include "FloatList.h"
 #include "FuncRequest.h"
 #include "FuncStatus.h"
-#include "InsetList.h"
 #include "LaTeXFeatures.h"
 #include "Lexer.h"
 #include "OutputParams.h"
@@ -469,24 +468,6 @@ void InsetFloat::setNewLabel(BufferParams const & bp)
 }
 
 
-InsetCaption const * InsetFloat::getCaptionInset() const
-{
-       ParagraphList::const_iterator pit = paragraphs().begin();
-       for (; pit != paragraphs().end(); ++pit) {
-               InsetList::const_iterator it = pit->insetList().begin();
-               for (; it != pit->insetList().end(); ++it) {
-                       Inset & inset = *it->inset;
-                       if (inset.lyxCode() == CAPTION_CODE) {
-                               InsetCaption const * ins =
-                                       static_cast<InsetCaption const *>(it->inset);
-                               return ins;
-                       }
-               }
-       }
-       return 0;
-}
-
-
 docstring InsetFloat::getCaption(OutputParams const & runparams) const
 {
        if (paragraphs().empty())