diff options
author | Khaled Hosny <khaledhosny@eglug.org> | 2016-11-28 06:43:29 +0200 |
---|---|---|
committer | Khaled Hosny <khaledhosny@eglug.org> | 2016-11-28 05:40:30 +0000 |
commit | f246542d1f61b5253189676688f59e5f952267a1 (patch) | |
tree | 0e0f3bada0178a1a2ccf669ac3931b0fb28aeb15 /vcl/source/gdi/sallayout.cxx | |
parent | 2db42ab241d0852d89a470b18727c22d0fc06745 (diff) |
Simplify things a bit
* Drop SortGlyphItems() and update the Kashida insertion code not depend
on that sorting.
* IS_DIACRITIC flag can now be based solely on the General Category
property, since it now is used for non-spacing marks not any OpenType
mark glyph. Pending complete removal.
* Check whether a glyph can take Kashida or not in one place. We need to
stop second-guessing here and pass explicit Kashida insertion points
from upper layers.
Change-Id: I39caa126a07d08c5725505615acc0c8f7a14e169
Reviewed-on: https://gerrit.libreoffice.org/31300
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Khaled Hosny <khaledhosny@eglug.org>
Diffstat (limited to 'vcl/source/gdi/sallayout.cxx')
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index ebae19b0a968..9c10cde15005 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -1129,41 +1129,6 @@ void GenericSalLayout::Simplify( bool bIsBase ) m_GlyphItems.erase(m_GlyphItems.begin() + j, m_GlyphItems.end()); } -// make sure GlyphItems are sorted left to right -void GenericSalLayout::SortGlyphItems() -{ - // move cluster components behind their cluster start (especially for RTL) - // using insertion sort because the glyph items are "almost sorted" - - for( std::vector<GlyphItem>::iterator pGlyphIter = m_GlyphItems.begin(), pGlyphIterEnd = m_GlyphItems.end(); pGlyphIter != pGlyphIterEnd; ++pGlyphIter ) - { - // find a cluster starting with a diacritic - if( !pGlyphIter->IsDiacritic() ) - continue; - if( !pGlyphIter->IsClusterStart() ) - continue; - for( std::vector<GlyphItem>::iterator pBaseGlyph = pGlyphIter; ++pBaseGlyph != pGlyphIterEnd; ) - { - // find the base glyph matching to the misplaced diacritic - if( pBaseGlyph->IsClusterStart() ) - break; - if( pBaseGlyph->IsDiacritic() ) - continue; - - // found the matching base glyph - // => this base glyph becomes the new cluster start - iter_swap(pGlyphIter, pBaseGlyph); - - // update glyph flags of swapped glyphitems - pGlyphIter->mnFlags &= ~GlyphItem::IS_IN_CLUSTER; - pBaseGlyph->mnFlags |= GlyphItem::IS_IN_CLUSTER; - // prepare for checking next cluster - pGlyphIter = pBaseGlyph; - break; - } - } -} - MultiSalLayout::MultiSalLayout( SalLayout& rBaseLayout ) : SalLayout() , mnLevel( 1 ) |