diff options
author | Herbert Duerr <hdu@openoffice.org> | 2002-09-11 08:59:01 +0000 |
---|---|---|
committer | Herbert Duerr <hdu@openoffice.org> | 2002-09-11 08:59:01 +0000 |
commit | b8a9f555f6840e0de70294f097ad244c98300ac3 (patch) | |
tree | 0bf80c6e3865f12ecb4a4783519e3ff94a24e6e7 /vcl/source/glyphs | |
parent | 4748424078c7a078b4e64d418b16107b2cf52963 (diff) |
#103145# use different method for bidi itemization
Diffstat (limited to 'vcl/source/glyphs')
-rwxr-xr-x | vcl/source/glyphs/gcach_layout.cxx | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/vcl/source/glyphs/gcach_layout.cxx b/vcl/source/glyphs/gcach_layout.cxx index 7c49ac4d8531..0c559bf79e0c 100755 --- a/vcl/source/glyphs/gcach_layout.cxx +++ b/vcl/source/glyphs/gcach_layout.cxx @@ -2,8 +2,8 @@ * * $RCSfile: gcach_layout.cxx,v $ * - * $Revision: 1.14 $ - * last change: $Author: hdu $ $Date: 2002-09-04 17:33:07 $ + * $Revision: 1.15 $ + * last change: $Author: hdu $ $Date: 2002-09-11 09:59:01 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -520,7 +520,6 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, bool bRightToLeft = (0 != (rArgs.mnFlags & SAL_LAYOUT_BIDI_RTL)); UBiDi* pParaBidi; UBiDi* pLineBidi; - int32_t* pVisualMap; UTextOffset nMinBidiPos; UTextOffset nEndBidiPos; int nRunCount = 1; @@ -529,7 +528,6 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, { pParaBidi = NULL; pLineBidi = NULL; - pVisualMap = NULL; nMinBidiPos = rArgs.mnMinCharPos; nEndBidiPos = rArgs.mnEndCharPos; } @@ -545,16 +543,12 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, ubidi_setLine( pParaBidi, rArgs.mnMinCharPos, rArgs.mnEndCharPos, pLineBidi, &rcI18n ); } nRunCount = ubidi_countRuns( pLineBidi, &rcI18n ); - pVisualMap = (int32_t*)alloca( nRunCount * sizeof(*pVisualMap) ); - ubidi_getVisualMap( pLineBidi, pVisualMap, &rcI18n ); - if( U_FAILURE(rcI18n) ) - return false; } // layout bidi/script runs and export them to a ServerFontLayout Point aNewPos( 0, 0 ); bool bWantFallback = false; - int nGlyphCapacity = 2 * (rArgs.mnEndCharPos - rArgs.mnMinCharPos) + 16; + int nGlyphCapacity = 3 * (rArgs.mnEndCharPos - rArgs.mnMinCharPos) + 16; int nSumGlyphCount = 0; // allocate temporary arrays @@ -566,9 +560,9 @@ bool IcuLayoutEngine::operator()( ServerFontLayout& rLayout, for( int i = 0; i < nRunCount; ++i ) { - if( pVisualMap ) + if( pLineBidi ) { - nMinBidiPos = pVisualMap[i]; + nMinBidiPos = rArgs.mnMinCharPos; bRightToLeft = (UBIDI_RTL == ubidi_getVisualRun( pLineBidi, i, &nMinBidiPos, &nEndBidiPos )); nEndBidiPos += nMinBidiPos; } |