diff options
Diffstat (limited to 'vcl')
-rw-r--r-- | vcl/win/source/gdi/winlayout.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/vcl/win/source/gdi/winlayout.cxx b/vcl/win/source/gdi/winlayout.cxx index 03e59a0b80e3..5a5538745035 100644 --- a/vcl/win/source/gdi/winlayout.cxx +++ b/vcl/win/source/gdi/winlayout.cxx @@ -1330,6 +1330,12 @@ bool UniscribeLayout::LayoutText( ImplLayoutArgs& rArgs ) { for( int j = rVisualItem.mnMinCharPos; j < rVisualItem.mnEndCharPos; ++j ) mpLogClusters[j] = sal::static_int_cast<WORD>(~0U); + if (rArgs.mnMinCharPos >= rVisualItem.mnEndCharPos) + { // fdo#47553 adjust "guessed" min (maybe up to -8 off) to + // actual min so it can be used properly in GetNextGlyphs + assert(mnSubStringMin <= rVisualItem.mnEndCharPos); + mnSubStringMin = rVisualItem.mnEndCharPos; + } continue; } @@ -1784,7 +1790,10 @@ int UniscribeLayout::GetNextGlyphs( int nLen, sal_GlyphId* pGlyphs, Point& rPos, int nGlyphWidth = pGlyphWidths[ nStart ]; int nCharPos = -1; // no need to determine charpos if( mpGlyphs2Chars ) // unless explicitly requested+provided + { nCharPos = mpGlyphs2Chars[ nStart ]; + assert(-1 != nCharPos); + } // inject kashida glyphs if needed if( !mbDisableGlyphInjection |