using lyx::par_type;
using lyx::support::ascii_lowercase;
-using lyx::support::atoi;
using lyx::support::bformat;
using lyx::support::compare_ascii_no_case;
using lyx::support::compare_no_case;
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;
+}
+
+