]> git.lyx.org Git - features.git/commitdiff
Fix bug #8078: Assertions in xhtml output on Windows
authorVincent van Ravesteijn <vfr@lyx.org>
Thu, 26 Apr 2012 14:31:42 +0000 (16:31 +0200)
committerVincent van Ravesteijn <vfr@lyx.org>
Tue, 1 May 2012 09:42:52 +0000 (11:42 +0200)
(cherry picked from commit 3c0e3c16c8c75524cd25e2fd9f34e2f2e17af150)

src/Floating.cpp
src/Layout.cpp
src/insets/InsetLayout.cpp
src/mathed/InsetMathChar.cpp
src/output_xhtml.cpp
status.20x

index 531a066b2c8fca7178b5fef98a9fc3aa77769f2d..513c4fac3432df9ab7d5187eac400f9c0069be51 100644 (file)
@@ -16,6 +16,7 @@
 
 #include "support/debug.h"
 #include "support/lstrings.h"
+#include "support/textutils.h"
 
 using namespace std;
 
@@ -67,9 +68,9 @@ string Floating::defaultCSSClass() const
        string::const_iterator it = n.begin();
        string::const_iterator en = n.end();
        for (; it != en; ++it) {
-               if (!isalpha(*it))
+               if (!isAlphaASCII(*it))
                        d += "_";
-               else if (islower(*it))
+               else if (isLower(*it))
                        d += *it;
                else
                        d += support::lowercase(*it);
index 16069777791fb438389db94c03b3efabce00f737..120f7a2c3e85623292d3d000d7ee36c96409ac90 100644 (file)
@@ -1009,7 +1009,7 @@ string Layout::defaultCSSClass() const
                                d = from_ascii("lyx_");
                        else
                                d += '_';
-               } else if (islower(c))
+               } else if (isLower(c))
                        d += c;
                else
                        // this is slow, so do it only if necessary
index dee7e29f7a6083ff0fa4caa306c5a018b85b3353..c87ebac7b0ef9eeba15871534d15edfe166356eb 100644 (file)
@@ -20,6 +20,7 @@
 
 #include "support/debug.h"
 #include "support/lstrings.h"
+#include "support/textutils.h"
 
 #include <vector>
 
@@ -426,9 +427,9 @@ string InsetLayout::defaultCSSClass() const
        string::const_iterator it = n.begin();
        string::const_iterator en = n.end();
        for (; it != en; ++it) {
-               if (!isalpha(*it))
+               if (!isAlphaASCII(*it))
                        d += "_";
-               else if (islower(*it))
+               else if (isLower(*it))
                        d += *it;
                else
                        d += support::lowercase(*it);
index ae1a3b03ee3568b2287086330d10e02102c83a97..e23723ca8d3a6ed17b1dd117ae49faab4b9900e5 100644 (file)
@@ -193,7 +193,7 @@ void InsetMathChar::mathmlize(MathStream & ms) const
        }               
 
        char const * type = 
-               (isalpha(char_) || Encodings::isMathAlpha(char_))
+               (isAlphaASCII(char_) || Encodings::isMathAlpha(char_))
                        ? "mi" : "mo";
        // we don't use MTag and ETag because we do not want the spacing
        ms << "<" << type << ">" << char_type(char_) << "</" << type << ">";    
@@ -227,7 +227,7 @@ void InsetMathChar::htmlize(HtmlStream & ms) const
                return;
        }               
 
-       if (isalpha(char_) || Encodings::isMathAlpha(char_))
+       if (isAlphaASCII(char_) || Encodings::isMathAlpha(char_))
                // we don't use MTag and ETag because we do not want the spacing
                ms << MTag("i") << char_type(char_) << ETag("i");
        else
index 005aa42a04b4fed3308dd028f951fc7e651cb8eb..4a587ee5ea9761b107e6064294e3387316606a16 100644 (file)
@@ -125,7 +125,7 @@ string cleanAttr(string const & str)
        string::const_iterator it = str.begin();
        string::const_iterator en = str.end();
        for (; it != en; ++it)
-               newname += isalnum(*it) ? *it : '_';
+               newname += isAlnumASCII(*it) ? *it : '_';
        return newname; 
 }
 
index 46bba5f6bb7c27fdd07eec2e1b3eb7c26dea65be..0959093c53f18d4889347e13bb6a6d87a89998ab 100644 (file)
@@ -75,6 +75,8 @@ What's new
 
 * DOCUMENT INPUT/OUTPUT
 
+- Fixed assertions on Windows for XHTML output (bug 8078).
+
 - Fix reconfiguration on Windows when the user directory is a UNC path
   (bug 8098).