summaryrefslogtreecommitdiff
path: root/editeng/source/editeng/impedit4.cxx
diff options
context:
space:
mode:
authorCaolán McNamara <caolanm@redhat.com>2022-11-18 11:22:17 +0000
committerCaolán McNamara <caolanm@redhat.com>2022-11-18 14:54:53 +0100
commita4a865a85cfc922e75ed2ad5188e45a76bca92aa (patch)
tree6a4ac3f8b8f9a65b49a8ae4fc4627cb2842e59d3 /editeng/source/editeng/impedit4.cxx
parentf017eaf5d615faaf36f784b65005329ec29d16fb (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/source/editeng/impedit4.cxx')
-rw-r--r--editeng/source/editeng/impedit4.cxx7
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();