Kaydet (Commit) a19b744f authored tarafından Caolán McNamara's avatar Caolán McNamara

Related: fdo#33549 remove bogus CorrectResIdForCharset

This looks totally bogus, and even if it isn't then in
SwWW8ImplReader::SetNewFontAttr the *original* nWhich
needs to be the one used for the push onto the encoding
stack, otherwise its all busted afterwards on the pop.

I suspect this is an attempt to fix some other problem
earlier, maybe idcthint related or maybe default font
related. Impossible to know as there was no comments
or bugids mentioned originally to see what the problem
being fixed was.
üst 769537df
...@@ -1154,7 +1154,6 @@ private: ...@@ -1154,7 +1154,6 @@ private:
bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&, bool GetFontParams(USHORT, FontFamily&, String&, FontPitch&,
rtl_TextEncoding&); rtl_TextEncoding&);
bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich); bool SetNewFontAttr(USHORT nFCode, bool bSetEnums, USHORT nWhich);
USHORT CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich);
void ResetCharSetVars(); void ResetCharSetVars();
void ResetCJKCharSetVars(); void ResetCJKCharSetVars();
......
...@@ -3564,23 +3564,6 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily, ...@@ -3564,23 +3564,6 @@ bool SwWW8ImplReader::GetFontParams( USHORT nFCode, FontFamily& reFamily,
return true; return true;
} }
USHORT SwWW8ImplReader::CorrectResIdForCharset(CharSet nCharSet, USHORT nWhich)
{
USHORT nResult = 0;
switch (nCharSet) {
case RTL_TEXTENCODING_MS_932:
nResult = RES_CHRATR_CJK_FONT;
break;
default:
nResult = nWhich;
break;
}
return nResult;
}
bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums,
USHORT nWhich) USHORT nWhich)
{ {
...@@ -3630,8 +3613,6 @@ bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, ...@@ -3630,8 +3613,6 @@ bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums,
SvxFontItem aFont( eFamily, aName, aEmptyStr, ePitch, eDstCharSet, nWhich); SvxFontItem aFont( eFamily, aName, aEmptyStr, ePitch, eDstCharSet, nWhich);
nWhich = CorrectResIdForCharset(eSrcCharSet, nWhich);
if( bSetEnums ) if( bSetEnums )
{ {
if( pAktColl ) // StyleDef if( pAktColl ) // StyleDef
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment