-par_type outerPar(Buffer const & buf, InsetBase const * inset)
-{
- ParIterator pit = const_cast<Buffer &>(buf).par_iterator_begin();
- ParIterator end = const_cast<Buffer &>(buf).par_iterator_end();
- for ( ; pit != end; ++pit) {
- LyXText * text;
- // the second '=' below is intentional
- for (int i = 0; (text = inset->getText(i)); ++i)
- if (&text->paragraphs() == &pit.plist())
- return pit.outerPar();
-
- InsetList::const_iterator ii = pit->insetlist.begin();
- InsetList::const_iterator iend = pit->insetlist.end();
- for ( ; ii != iend; ++ii)
- if (ii->inset == inset)
- return pit.outerPar();
- }
- lyxerr << "outerPar: should not happen" << endl;
- BOOST_ASSERT(false);
- return buf.paragraphs().size(); // shut up compiler
-}
-
-
-/// return the range of pars [beg, end[ owning the range of y [ystart, yend]
-void getParsInRange(ParagraphList & pars, int ystart, int yend,
- par_type & beg, par_type & end)