diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-03-23 14:56:57 +0100 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-03-23 15:37:22 +0100 |
commit | d07567fe195227c50ca8e81a2dd3cc5b47376662 (patch) | |
tree | 7bf16e213c70dcdd6535c44d5b667f3b1bce7c88 | |
parent | d99a715e6a99d4f99023d15185671e0282ba62fd (diff) |
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)
-rw-r--r-- | vcl/source/gdi/sallayout.cxx | 2 |
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; |