summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2014-06-26 17:09:07 +0200
committerMiklos Vajna <vmiklos@collabora.co.uk>2014-06-29 10:43:43 +0000
commit3cacb754dac80c8ac559405367fd64cce7c1c704 (patch)
tree18c2ef728c1eaa053a7113abe2d3f90ac57fad77
parent8aff83b95fa5969edfc48022ddaae05031b178cf (diff)
sw: avoid calling convertToString() with unsupported encodings
Change-Id: If0b589c884cd306ca7c94d3366af66276a120176 (cherry picked from commit b51d9c633c2b5d03478be7b175fdbea367376c72) Reviewed-on: https://gerrit.libreoffice.org/9936 Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk> Tested-by: Miklos Vajna <vmiklos@collabora.co.uk>
-rw-r--r--sw/source/filter/ww8/writerwordglue.cxx3
1 files changed, 2 insertions, 1 deletions
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 [] = {