diff options
Diffstat (limited to 'sw/source/filter/ww8/ww8par6.cxx')
-rw-r--r-- | sw/source/filter/ww8/ww8par6.cxx | 46 |
1 files changed, 40 insertions, 6 deletions
diff --git a/sw/source/filter/ww8/ww8par6.cxx b/sw/source/filter/ww8/ww8par6.cxx index ab60c37a899b..c01991b51343 100644 --- a/sw/source/filter/ww8/ww8par6.cxx +++ b/sw/source/filter/ww8/ww8par6.cxx @@ -3557,11 +3557,32 @@ bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, //off the stack will keep in sync if (!pAktColl && IsListOrDropcap()) { - if (!maFontSrcCharSets.empty()) - eSrcCharSet = maFontSrcCharSets.top(); + if (nWhich == RES_CHRATR_CJK_FONT) + { + if (!maFontSrcCJKCharSets.empty()) + { + eSrcCharSet = maFontSrcCJKCharSets.top(); + } + else + { + eSrcCharSet = RTL_TEXTENCODING_DONTKNOW; + } + + maFontSrcCJKCharSets.push(eSrcCharSet); + } else - eSrcCharSet = RTL_TEXTENCODING_DONTKNOW; - maFontSrcCharSets.push(eSrcCharSet); + { + if (!maFontSrcCharSets.empty()) + { + eSrcCharSet = maFontSrcCharSets.top(); + } + else + { + eSrcCharSet = RTL_TEXTENCODING_DONTKNOW; + } + + maFontSrcCharSets.push(eSrcCharSet); + } } return false; } @@ -3591,7 +3612,10 @@ bool SwWW8ImplReader::SetNewFontAttr(USHORT nFCode, bool bSetEnums, else if (IsListOrDropcap()) { //Add character text encoding to stack - maFontSrcCharSets.push(eSrcCharSet); + if (nWhich == RES_CHRATR_CJK_FONT) + maFontSrcCJKCharSets.push(eSrcCharSet); + else + maFontSrcCharSets.push(eSrcCharSet); } } @@ -3607,6 +3631,13 @@ void SwWW8ImplReader::ResetCharSetVars() maFontSrcCharSets.pop(); } +void SwWW8ImplReader::ResetCJKCharSetVars() +{ + ASSERT(!maFontSrcCJKCharSets.empty(),"no charset to remove"); + if (!maFontSrcCJKCharSets.empty()) + maFontSrcCJKCharSets.pop(); +} + /* Font ein oder ausschalten: */ @@ -3637,7 +3668,10 @@ void SwWW8ImplReader::Read_FontCode( USHORT nId, const BYTE* pData, short nLen ) if( nLen < 0 ) // Ende des Attributes { pCtrlStck->SetAttr( *pPaM->GetPoint(), nId ); - ResetCharSetVars(); + if (nId == RES_CHRATR_CJK_FONT) + ResetCJKCharSetVars(); + else + ResetCharSetVars(); } else { |