]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.cpp
Remove hardcoded values
[lyx.git] / src / support / lstrings.cpp
index 0dd8075e03287344ab3989c171fbe368d2935bc0..99591d0c4dd495483bd6bbdeadea2d771385d1ea 100644 (file)
@@ -182,6 +182,18 @@ bool isASCII(char_type c)
 }
 
 
+bool isOpenPunctuation(char_type c)
+{
+       if (!is_utf16(c)) {
+               // assume that no non-utf16 character is an op
+               // c outside the UCS4 range is catched as well
+               return false;
+       }
+       QChar const qc = ucs4_to_qchar(c);
+       return qc.category() == QChar::Punctuation_Open;
+}
+
+
 namespace support {
 
 int compare_no_case(docstring const & s, docstring const & s2)