summaryrefslogtreecommitdiff
path: root/vcl/source/gdi/sallayout.cxx
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-03-23 15:02:27 +0100
committerMichael Stahl <mstahl@redhat.com>2012-03-23 15:37:22 +0100
commit68c1111c777778f6ffae385ad3a81d7c1c969625 (patch)
tree5704b0c3a3d39d527572787a9ad29ed95cda656d /vcl/source/gdi/sallayout.cxx
parentd07567fe195227c50ca8e81a2dd3cc5b47376662 (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.cxx5
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;