diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-03-23 15:02:27 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-03-23 15:37:22 +0100 |
commit | 68c1111c777778f6ffae385ad3a81d7c1c969625 (patch) | |
tree | 5704b0c3a3d39d527572787a9ad29ed95cda656d /vcl/source/gdi/sallayout.cxx | |
parent | d07567fe195227c50ca8e81a2dd3cc5b47376662 (diff) |
GenericSalLayout::KashidaJustify: STL assertion
error: attempt to dereference a singular iterator.
(regression from 6bb68cae7c31918eff8386d5b52be0759386bb60)
Diffstat (limited to 'vcl/source/gdi/sallayout.cxx')
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx index 9ba5f2961176..c23c32534914 100644 --- a/vcl/source/gdi/sallayout.cxx +++ b/vcl/source/gdi/sallayout.cxx @@ -1196,10 +1196,11 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth ) nKashidaCount = 0; Point aPos = pG->maLinearPos; aPos.X() -= nGapWidth; // cluster is already right aligned + int const nCharPos = pG->mnCharPos; GlyphVector::iterator pG2 = pG; for(; nGapWidth > nKashidaWidth; nGapWidth -= nKashidaWidth, ++nKashidaCount ) { - pG2 = m_GlyphItems.insert(pG2, GlyphItem( pG->mnCharPos, nKashidaIndex, aPos, + pG2 = m_GlyphItems.insert(pG2, GlyphItem(nCharPos, nKashidaIndex, aPos, GlyphItem::IS_IN_CLUSTER|GlyphItem::IS_RTL_GLYPH, nKashidaWidth )); ++pG2; aPos.X() += nKashidaWidth; @@ -1208,7 +1209,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth ) // fixup rightmost kashida for gap remainder if( nGapWidth > 0 ) { - pG2 = m_GlyphItems.insert(pG2, GlyphItem( pG->mnCharPos, nKashidaIndex, aPos, + pG2 = m_GlyphItems.insert(pG2, GlyphItem(nCharPos, nKashidaIndex, aPos, GlyphItem::IS_IN_CLUSTER|GlyphItem::IS_RTL_GLYPH, nKashidaCount ? nGapWidth : nGapWidth/2 )); ++pG2; aPos.X() += nGapWidth; |