Kaydet (Commit) 465ab1c1 authored tarafından Julien Nabet's avatar Julien Nabet

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
üst 19bce817
......@@ -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 )
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment