From b51d9c633c2b5d03478be7b175fdbea367376c72 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Thu, 26 Jun 2014 17:09:07 +0200 Subject: [PATCH] sw: avoid calling convertToString() with unsupported encodings Change-Id: If0b589c884cd306ca7c94d3366af66276a120176 --- sw/source/filter/ww8/writerwordglue.cxx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sw/source/filter/ww8/writerwordglue.cxx b/sw/source/filter/ww8/writerwordglue.cxx index 56f92840376e..ddc83138ed0e 100644 --- a/sw/source/filter/ww8/writerwordglue.cxx +++ b/sw/source/filter/ww8/writerwordglue.cxx @@ -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 [] = {