]> git.lyx.org Git - lyx.git/blobdiff - src/TocBackend.cpp
Remove traces of Q_CYGWIN_WIN
[lyx.git] / src / TocBackend.cpp
index 4ffa35571b5c2cc7d682a0c716191e7bb42b2cca..8b2015fd0a12cae9aec267bd4536843f293dcb6a 100644 (file)
@@ -203,6 +203,20 @@ TocIterator Toc::item(DocIterator const & dit) const
 }
 
 
+Toc::iterator Toc::item(int depth, docstring const & str)
+{
+       if (empty())
+               return end();
+       iterator it = begin();
+       iterator itend = end();
+       for (; it != itend; ++it) {
+               if (it->depth() == depth && it->str() == str)
+                       break;
+       }
+       return it;
+}
+
+
 void TocBackend::writePlaintextTocList(string const & type, odocstream & os) const
 {
        TocList::const_iterator cit = tocs_.find(type);