diff options
author | Frank Meies <fme@openoffice.org> | 2001-10-22 12:03:21 +0000 |
---|---|---|
committer | Frank Meies <fme@openoffice.org> | 2001-10-22 12:03:21 +0000 |
commit | b207cb7ffb024440fed446c40f6ef94e6352d852 (patch) | |
tree | 79cede7050d42d889b2cfedcfcad7cb3ee60c0dd /sw/source/core/text/redlnitr.cxx | |
parent | 648dc88ed4ca32319f0364933f0e230a1b8a1153 (diff) |
Fix #93544#: Script detection for weak characters
Diffstat (limited to 'sw/source/core/text/redlnitr.cxx')
-rw-r--r-- | sw/source/core/text/redlnitr.cxx | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/sw/source/core/text/redlnitr.cxx b/sw/source/core/text/redlnitr.cxx index f920465f77d7..759b7ffe5ca5 100644 --- a/sw/source/core/text/redlnitr.cxx +++ b/sw/source/core/text/redlnitr.cxx @@ -2,9 +2,9 @@ * * $RCSfile: redlnitr.cxx,v $ * - * $Revision: 1.21 $ + * $Revision: 1.22 $ * - * last change: $Author: ama $ $Date: 2001-09-24 09:06:56 $ + * last change: $Author: fme $ $Date: 2001-10-22 12:59:59 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -145,6 +145,9 @@ using namespace ::com::sun::star; +extern BYTE WhichFont( xub_StrLen nIdx, const String* pTxt, + const SwScriptInfo* pSI ); + /************************************************************************* * SwAttrIter::CtorInit() *************************************************************************/ @@ -207,24 +210,15 @@ void SwAttrIter::CtorInit( SwTxtNode& rTxtNode, SwScriptInfo& rScrInf ) if ( pBreakIt->xBreak.is() ) { - USHORT nScript = pScriptInfo->GetScriptType( 0 ); + pFnt->SetActual( WhichFont( 0, 0, pScriptInfo ) ); + xub_StrLen nChg = 0; USHORT nCnt = 0; - // set font to script type of first character - switch ( nScript ) { - case i18n::ScriptType::ASIAN : - pFnt->SetActual( SW_CJK ); break; - case i18n::ScriptType::COMPLEX : - pFnt->SetActual( SW_CTL ); break; - default: - pFnt->SetActual( SW_LATIN ); break; - } - do { nChg = pScriptInfo->GetScriptChg( nCnt ); - nScript = pScriptInfo->GetScriptType( nCnt++ ); + USHORT nScript = pScriptInfo->GetScriptType( nCnt++ ); BYTE nTmp = 4; switch ( nScript ) { case i18n::ScriptType::ASIAN : |