diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-06-21 20:11:27 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-06-24 16:51:41 -0400 |
commit | 2c92a92e2fa2503f0381b89f316f982eda580b6e (patch) | |
tree | bf0345cbbad0edc93134b94135d05c78a323f755 /sc/source/core/data/documen8.cxx | |
parent | cf02151987b19b12ca0be463732765bd35f54028 (diff) |
Prevent crash during on-line spell checking.
The new ScHorizontalCellIterator internally uses iterators for each
column to track positions. This means that, if a cell value in the iteration
range chnages while the iteration is on-going, those internal iterators
get invalidated. Allow the client code to rehash the iterators when modifying
a cell content during iteration.
Having said that, it's best not to modify cells during iteration.
Change-Id: Ida453d4f883e1fbcbab4eb0401e37fea8c0b901d
Diffstat (limited to 'sc/source/core/data/documen8.cxx')
-rw-r--r-- | sc/source/core/data/documen8.cxx | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sc/source/core/data/documen8.cxx b/sc/source/core/data/documen8.cxx index ec797f176215..4cbaf8d1be51 100644 --- a/sc/source/core/data/documen8.cxx +++ b/sc/source/core/data/documen8.cxx @@ -827,12 +827,14 @@ bool ScDocument::OnlineSpellInRange( const ScRange& rSpellRange, ScAddress& rSpe { // The cell will take ownership of pNewData. SetEditText(ScAddress(nCol,nRow,nTab), pEngine->CreateTextObject()); + aIter.RehashCol(nCol); } else { ScSetStringParam aParam; aParam.setTextInput(); SetString(ScAddress(nCol,nRow,nTab), pEngine->GetText(), &aParam); + aIter.RehashCol(nCol); } // Paint |