From d07567fe195227c50ca8e81a2dd3cc5b47376662 Mon Sep 17 00:00:00 2001 From: Michael Stahl Date: Fri, 23 Mar 2012 14:56:57 +0100 Subject: 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) --- vcl/source/gdi/sallayout.cxx | 2 ++ 1 file changed, 2 insertions(+) (limited to 'vcl') 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; -- cgit