diff options
author | Julien Nabet <serval2412@yahoo.fr> | 2012-11-01 20:19:55 +0100 |
---|---|---|
committer | Julien Nabet <serval2412@yahoo.fr> | 2012-11-02 22:58:46 +0100 |
commit | 465ab1c1263b76e3284f18219678e46a211c5605 (patch) | |
tree | c3d879f44d2a044b3269786ad417ca94dc6e54a3 | |
parent | 19bce817279c7fd150af0422c224975e57ff9f41 (diff) |
Related: fdo#56473 IDE: Crash when inserting a simple macro
After having discussed with Michael Meeks, a better way would be to be iterator free
Now, should all textwindowaccessibility part be iterator free?
Change-Id: I8079b3ffbc9d37bc2c3b9ede088485dd3a7e410e
-rw-r--r-- | accessibility/source/extended/textwindowaccessibility.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/accessibility/source/extended/textwindowaccessibility.cxx b/accessibility/source/extended/textwindowaccessibility.cxx index 620ff0f0aa09..1e2da2e970c3 100644 --- a/accessibility/source/extended/textwindowaccessibility.cxx +++ b/accessibility/source/extended/textwindowaccessibility.cxx @@ -2127,11 +2127,11 @@ void Document::notifySelectionChange( sal_Int32 nFirst, sal_Int32 nLast ) if ( nFirst < nLast ) { Paragraphs::iterator aItBound1 = m_xParagraphs->begin(); - for (sal_Int32 i = 0; i < nLast && aItBound1 != m_xParagraphs->end() ; ++aItBound1); + for (sal_Int32 i = 0; i < nLast && aItBound1 != m_xParagraphs->end() ; ++aItBound1, ++i); Paragraphs::iterator aEnd( ::std::min( aItBound1, m_aVisibleEnd ) ); Paragraphs::iterator aItBound2 = m_xParagraphs->begin(); - for (sal_Int32 i = 0; i < nFirst && aItBound2 != m_xParagraphs->end() ; ++aItBound2); + for (sal_Int32 i = 0; i < nFirst && aItBound2 != m_xParagraphs->end() ; ++aItBound2, ++i); for ( Paragraphs::iterator aIt = ::std::max( aItBound2, m_aVisibleBegin ); aIt != aEnd; ++aIt ) { |