add some checks for OpenSymbol

Change-Id: I98e1ee9f854d144cea3a305be6d53f8e86f6a7a3
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/143020
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
Caolán McNamara
2022-11-21 20:49:35 +01:00
parent dcb1356511
commit ff0d0d0797
2 changed files with 4 additions and 0 deletions
+3
View File
@@ -363,7 +363,10 @@ ErrCode ImpEditEngine::WriteRTF( SvStream& rOutput, EditSelection aSel )
// on export what encoding we claim to use for these
// fonts.
if (IsOpenSymbol(pFontItem->GetFamilyName()))
{
SAL_WARN_IF(eChrSet == RTL_TEXTENCODING_SYMBOL, "editeng", "OpenSymbol should not have charset of RTL_TEXTENCODING_SYMBOL in new documents");
eChrSet = RTL_TEXTENCODING_UTF8;
}
DBG_ASSERT( eChrSet != 9, "SystemCharSet?!" );
if( RTL_TEXTENCODING_DONTKNOW == eChrSet )
eChrSet = osl_getThreadTextEncoding();
+1
View File
@@ -1686,6 +1686,7 @@ MetaFontAction::MetaFontAction( vcl::Font aFont ) :
if ( IsOpenSymbol( maFont.GetFamilyName() )
&& ( maFont.GetCharSet() != RTL_TEXTENCODING_UNICODE ) )
{
SAL_WARN_IF(maFont.GetCharSet() == RTL_TEXTENCODING_SYMBOL, "vcl", "OpenSymbol should not have charset of RTL_TEXTENCODING_SYMBOL in new documents");
maFont.SetCharSet( RTL_TEXTENCODING_UNICODE );
}
}