diff options
author | Michael Stahl <mstahl@redhat.com> | 2012-07-04 22:07:13 +0200 |
---|---|---|
committer | Michael Stahl <mstahl@redhat.com> | 2012-07-04 23:23:21 +0200 |
commit | a6edbee5f827c8b8f1dde87933f54aae18dc2863 (patch) | |
tree | 6ce9cbc7d51b4c88b4724a469cc2f0751cc18243 /sw | |
parent | 8cf33f0d2beb3808de671f1578711a19c0cbe351 (diff) |
fix previous STL conversion commit:
Change-Id: I08c346dff3d62240a24091f569f04be2f517b7b0
SwAutoCompleteWord::InsertWord: pNew has to be inserted in both branches
Diffstat (limited to 'sw')
-rw-r--r-- | sw/source/core/doc/acmplwrd.cxx | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sw/source/core/doc/acmplwrd.cxx b/sw/source/core/doc/acmplwrd.cxx index 71281025f95f..c1600efe197b 100644 --- a/sw/source/core/doc/acmplwrd.cxx +++ b/sw/source/core/doc/acmplwrd.cxx @@ -277,9 +277,7 @@ sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc ) if( aWordLst.Insert( pNew, nInsPos ) ) { bRet = sal_True; - if( aLRULst.size() < nMaxCount ) - aLRULst.push_front( pNew ); - else + if (aLRULst.size() >= nMaxCount) { // the last one needs to be removed // so that there is space for the first one @@ -288,6 +286,7 @@ sal_Bool SwAutoCompleteWord::InsertWord( const String& rWord, SwDoc& rDoc ) aWordLst.Remove( pDel ); delete pDel; } + aLRULst.push_front(pNew); } else { |