]> git.lyx.org Git - lyx.git/blobdiff - src/Paragraph.cpp
fix MSVC warning.
[lyx.git] / src / Paragraph.cpp
index db753e91c9d1aa27078e74d4a10c50320b437ce3..70dfc40617959a4faf97cbbce2ab7a3e42c9f102 100644 (file)
@@ -2504,4 +2504,18 @@ Inset const * Paragraph::getInset(pos_type pos) const
        return d->insetlist_.get(pos);
 }
 
+
+int Paragraph::numberOfOptArgs() const
+{
+       int num = 0;
+       InsetList::const_iterator it = insetList().begin();
+       InsetList::const_iterator end = insetList().end();
+       for (; it != end ; ++it) {
+               if (it->inset->lyxCode() == OPTARG_CODE)
+                       ++num;
+       }
+       return num;
+}
+
+
 } // namespace lyx