diff options
author | Caolán McNamara <caolanm@redhat.com> | 2022-11-18 11:22:17 +0000 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2022-11-18 14:54:53 +0100 |
commit | a4a865a85cfc922e75ed2ad5188e45a76bca92aa (patch) | |
tree | 6a4ac3f8b8f9a65b49a8ae4fc4627cb2842e59d3 /editeng | |
parent | f017eaf5d615faaf36f784b65005329ec29d16fb (diff) |
tdf#47679 explicitly don't write fcharset2 for text in OpenSymbol
we don't convert to the charsets we claim the fonts are in when
we write our text so rtf imports mangle this dubious output.
cheapest thing is to just write default fcharset0 for OpenSymbol
Change-Id: Iea0e0d3a9bda5b5c7bcffba8499195f50e214aa4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/142935
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Diffstat (limited to 'editeng')
-rw-r--r-- | editeng/source/editeng/impedit4.cxx | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/editeng/source/editeng/impedit4.cxx b/editeng/source/editeng/impedit4.cxx index bc83fc412c75..85b771bc5a29 100644 --- a/editeng/source/editeng/impedit4.cxx +++ b/editeng/source/editeng/impedit4.cxx @@ -357,6 +357,13 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel ) rOutput.WriteUInt32AsString( nVal ); rtl_TextEncoding eChrSet = pFontItem->GetCharSet(); + // tdf#47679 OpenSymbol is not encoded in Symbol Encoding + // and anyway we always attempt to write as eDestEnc + // of RTL_TEXTENCODING_MS_1252 and pay no attention + // on export what encoding we claim to use for these + // fonts. + if (IsStarSymbol(pFontItem->GetFamilyName())) + eChrSet = RTL_TEXTENCODING_UTF8; DBG_ASSERT( eChrSet != 9, "SystemCharSet?!" ); if( RTL_TEXTENCODING_DONTKNOW == eChrSet ) eChrSet = osl_getThreadTextEncoding(); |