]> git.lyx.org Git - lyx.git/blobdiff - src/support/qstring_helpers.h
Let paragraph::requestSpellcheck() consider contained insets
[lyx.git] / src / support / qstring_helpers.h
index d5f2921af7a8ac617be2739664e8de71e8c06bb8..e33131caa594053b5ba4b06ff32c6fcbbbca5613 100644 (file)
@@ -18,6 +18,10 @@ class QString;
 
 namespace lyx {
 
+class LyXErr;
+
+LyXErr & operator<<(LyXErr &, QString const &);
+
 /**
  * toqstr - convert a UTF8 encoded char * into a QString
  *
@@ -37,7 +41,7 @@ QString toqstr(std::string const & str);
 
 
 /// Is \p c a valid utf16 char?
-inline bool is_utf16(unsigned int c)
+inline bool is_utf16(char_type c)
 {
        // 0xd800 ... 0xdfff is the range of surrogate pairs.
        return c < 0xd800 || (c > 0xdfff && c < 0x10000);
@@ -76,6 +80,18 @@ docstring qstring_to_ucs4(QString const & qstr);
  */
 std::string fromqstr(QString const & str);
 
+/**
+ * constructs a regex to filter on consecutive characters
+ * matches lower- and uppercase on lowercase characters,
+ * and just uppercase for uppercase
+ */
+QString charFilterRegExp(QString const & filter);
+
+/**
+ * as above, but constructs a capturing regex for a sequence of characters
+ */
+QString charFilterRegExpC(QString const & filter);
+
 } // namespace lyx
 
 #endif // QSTRING_HELPERS_H