rgh...@lyx.org wrote:
Author: rgheck Date: Fri Jun 19 15:50:19 2009 New Revision: 30186 URL: http://www.lyx.org/trac/changeset/30186
+InsetCaption const * InsetText::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;
Hum, this won't work as expected if there's more than one caption. I sometimes use this trick to have multiple graphics in a float without them being subfigures.
Abdel.