diff options
author | Caolán McNamara <caolanm@redhat.com> | 2014-06-09 14:08:35 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2014-06-09 14:10:33 +0100 |
commit | bcca34ed26d82cc79b796ae16ef946fc13f0b1cf (patch) | |
tree | d3293a4603fe460cbb5b78ecc7f765dd37d81f21 | |
parent | fix build error (diff) | |
download | core-bcca34ed26d82cc79b796ae16ef946fc13f0b1cf.tar.gz core-bcca34ed26d82cc79b796ae16ef946fc13f0b1cf.zip |
fallback to DefaultEncoding when eCurrentEncoding is unknown
as seen when saving abi10092-1 to rtf
sal/rtl/string.cxx:186: OSL_ASSERT: pTarget != NULL && (pSource != NULL ||
nLength == 0) && nLength >= 0 && (nLength == 0 || rtl_isOctetTextEncoding(nEncoding))
Change-Id: I638b94041899145f42ecd80982d8e7c0330b35c0
-rw-r--r-- | sw/source/filter/ww8/rtfattributeoutput.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sw/source/filter/ww8/rtfattributeoutput.cxx b/sw/source/filter/ww8/rtfattributeoutput.cxx index 834996e2ef92..41e06be6cfd6 100644 --- a/sw/source/filter/ww8/rtfattributeoutput.cxx +++ b/sw/source/filter/ww8/rtfattributeoutput.cxx @@ -2074,6 +2074,8 @@ void RtfAttributeOutput::CharFont(const SvxFontItem& rFont) m_aStylesEnd.append(OOO_STRING_SVTOOLS_RTF_F); m_aStylesEnd.append((sal_Int32)m_rExport.maFontHelper.GetId(rFont)); m_rExport.eCurrentEncoding = rtl_getTextEncodingFromWindowsCharset(rtl_getBestWindowsCharsetFromTextEncoding(rFont.GetCharSet())); + if (m_rExport.eCurrentEncoding == RTL_TEXTENCODING_DONTKNOW) + m_rExport.eCurrentEncoding = m_rExport.eDefaultEncoding; } void RtfAttributeOutput::CharFontSize(const SvxFontHeightItem& rFontSize) |