]> git.lyx.org Git - lyx.git/blobdiff - src/frontends/qt4/qt_helpers.cpp
Merge branch 'master' into biblatex2
[lyx.git] / src / frontends / qt4 / qt_helpers.cpp
index a2c72172e1ec73caeb001eaddd9f2af7c5e62192..88c4ab9424e6b341b258583df99cbf721511ec52 100644 (file)
@@ -549,7 +549,7 @@ FileFilterList::FileFilterList(docstring const & qt_style_filter)
 
                // Everything from the start of the input to
                // the start of the match.
-               parse_filter(string(what[-1].first, what[-1].second));
+               parse_filter(string(it, what[0].first));
 
                // Increment the iterator to the end of the match.
                it += distance(it, what[0].second);
@@ -683,4 +683,14 @@ QString formatToolTip(QString text, int em)
 }
 
 
+QString qtHtmlToPlainText(QString const & html)
+{
+       if (!Qt::mightBeRichText(html))
+               return html;
+       QTextDocument td;
+       td.setHtml(html);
+       return td.toPlainText();
+}
+
+
 } // namespace lyx