]> git.lyx.org Git - lyx.git/blobdiff - src/paragraph_funcs.C
clone NVI, other small stuff
[lyx.git] / src / paragraph_funcs.C
index 2d5403aedc652a71a1d52b03c237986e8ade089b..20f9bcb8191f28dc135d050512320206ff827b7a 100644 (file)
@@ -353,3 +353,20 @@ void getParsInRange(ParagraphList & pars, int ystart, int yend,
        for (end = beg ; end != endpar && pars[end].y <= yend; ++end)
                ;
 }
+
+
+/// return the number of InsetOptArg in a paragraph
+int numberOfOptArgs(Paragraph const & par)
+{
+       int num = 0;
+       
+       InsetList::const_iterator it = par.insetlist.begin();
+       InsetList::const_iterator end = par.insetlist.end();
+       for (; it != end ; ++it) {
+               if (it->inset->lyxCode() == InsetBase::OPTARG_CODE) 
+                       ++num;
+       }
+       return num;
+}
+
+