sw: avoid calling convertToString() with unsupported encodings

Change-Id: If0b589c884cd306ca7c94d3366af66276a120176
This commit is contained in:
Michael Stahl
2014-06-26 17:09:07 +02:00
parent c00d81612e
commit b51d9c633c

View File

@@ -728,7 +728,8 @@ namespace sw
sal_uInt8 nRet =
rtl_getBestWindowsCharsetFromTextEncoding(eTextEncoding);
rtl_TextEncoding enc2 = rtl_getTextEncodingFromWindowsCharset(nRet);
if (!(CanEncode(rFontName, enc2) && CanEncode(rAltName, enc2)))
if (!rtl_isOctetTextEncoding(enc2) /* check to avoid asserts */ ||
!(CanEncode(rFontName, enc2) && CanEncode(rAltName, enc2)))
{
static struct { rtl_TextEncoding enc; sal_uInt8 charset; }
const s_fallbacks [] = {