]> git.lyx.org Git - lyx.git/blobdiff - src/support/lstrings.cpp
Cmake build: Omit also hidden header files from globbing
[lyx.git] / src / support / lstrings.cpp
index f06b2eb4cbda36b4fca1cb5976e267663ee99ce3..ea1ba59984a62ba7e92910d94530a930e3baf0ef 100644 (file)
@@ -161,29 +161,6 @@ bool isNumber(char_type c)
 }
 
 
-bool isRTL(char_type c)
-{
-       if (!is_utf16(c))
-               // assume that no non-utf16 character is right-to-left
-               // c outside the UCS4 range is catched as well
-               return false;
-       QChar::Direction direction = ucs4_to_qchar(c).direction();
-       /**
-        * See for example:
-        *  http://en.wikipedia.org/wiki/Template:Bidi_Class_%28Unicode%29.
-        * Here we only handle the easy cases:
-        *  * R:  Hebrew alphabet and related punctuation
-        *  * AL: Arabic, Thaana and Syriac alphabets, and most
-        *        punctuation specific to those scripts
-        *
-        * FIXME: testing show that this does not work (see
-        * RowPainter::paintChars), but my knowledge of unicode is too
-        * poor to understand why.
-        */
-       return direction == QChar::DirR || direction ==QChar::DirAL;
-}
-
-
 bool isDigitASCII(char_type c)
 {
        return '0' <= c && c <= '9';
@@ -1481,7 +1458,7 @@ docstring bformat(docstring const & fmt, char const * arg1, docstring arg2)
        LATTEST(contains(fmt, from_ascii("%1$s")));
        LATTEST(contains(fmt, from_ascii("%2$s")));
        docstring str = subst(fmt, from_ascii("%1$s"), from_ascii(arg1));
-       str = subst(fmt, from_ascii("%2$s"), arg2);
+       str = subst(str, from_ascii("%2$s"), arg2);
        return subst(str, from_ascii("%%"), from_ascii("%"));
 }