summaryrefslogtreecommitdiffstats
path: root/vcl
diff options
context:
space:
mode:
authorMichael Stahl <mstahl@redhat.com>2012-03-23 14:56:57 +0100
committerMichael Stahl <mstahl@redhat.com>2012-03-23 15:37:22 +0100
commitd07567fe195227c50ca8e81a2dd3cc5b47376662 (patch)
tree7bf16e213c70dcdd6535c44d5b667f3b1bce7c88 /vcl
parentGenericSalLayout::KashidaJustify: STL assertion (diff)
downloadcore-d07567fe195227c50ca8e81a2dd3cc5b47376662.tar.gz
core-d07567fe195227c50ca8e81a2dd3cc5b47376662.zip
GenericSalLayout::KashidaJustify: fix infinite loop
insert() inserts before the given iterator and returns iterator to newly inserted element, hence need to increment that iterator (regression from 6bb68cae7c31918eff8386d5b52be0759386bb60)
Diffstat (limited to 'vcl')
-rw-r--r--vcl/source/gdi/sallayout.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/vcl/source/gdi/sallayout.cxx b/vcl/source/gdi/sallayout.cxx
index 6ae852725c64..9ba5f2961176 100644
--- a/vcl/source/gdi/sallayout.cxx
+++ b/vcl/source/gdi/sallayout.cxx
@@ -1201,6 +1201,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth )
{
pG2 = m_GlyphItems.insert(pG2, GlyphItem( pG->mnCharPos, nKashidaIndex, aPos,
GlyphItem::IS_IN_CLUSTER|GlyphItem::IS_RTL_GLYPH, nKashidaWidth ));
+ ++pG2;
aPos.X() += nKashidaWidth;
}
@@ -1209,6 +1210,7 @@ void GenericSalLayout::KashidaJustify( long nKashidaIndex, int nKashidaWidth )
{
pG2 = m_GlyphItems.insert(pG2, GlyphItem( pG->mnCharPos, nKashidaIndex, aPos,
GlyphItem::IS_IN_CLUSTER|GlyphItem::IS_RTL_GLYPH, nKashidaCount ? nGapWidth : nGapWidth/2 ));
+ ++pG2;
aPos.X() += nGapWidth;
}
pG = pG2;