Fix bug #8078: Assertions in xhtml output on Windows

This commit is contained in:
Vincent van Ravesteijn 2012-04-26 16:31:42 +02:00
parent 225bcf92df
commit 3c0e3c16c8
5 changed files with 10 additions and 8 deletions

View 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);

View File

@ -939,7 +939,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

View File

@ -20,6 +20,7 @@
#include "support/debug.h"
#include "support/lstrings.h"
#include "support/textutils.h"
#include <vector>
@ -436,9 +437,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);

View 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

View 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;
}