diff options
author | Wang Lei <leiw@apache.org> | 2012-11-08 08:24:15 +0000 |
---|---|---|
committer | Wang Lei <leiw@apache.org> | 2012-11-08 08:24:15 +0000 |
commit | 9c5b06246da069191fea1bb8068e4bba143370fb (patch) | |
tree | 436b3a0c874e0090ba490f21eab57f5eabc85a04 | |
parent | c71bb0d6210cb7c2fbe1f49f65272ac3d294a0dc (diff) |
#i121285 calc crashes when inserting row's via macro
Patch by: Clarence GUO
Review by: Wang Lei
Notes
Notes:
ignore: obsolete
-rw-r--r-- | sc/source/core/data/cell.cxx | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sc/source/core/data/cell.cxx b/sc/source/core/data/cell.cxx index 2d5f9e9b02f9..215253e81c34 100644 --- a/sc/source/core/data/cell.cxx +++ b/sc/source/core/data/cell.cxx @@ -746,9 +746,13 @@ ScFormulaCell::ScFormulaCell( const ScFormulaCell& rCell, ScDocument& rDoc, cons bInChangeTrack( sal_False ), bTableOpDirty( sal_False ), bNeedListening( sal_False ), - pValidRefToken( rCell.pValidRefToken ), aPos( rPos ) { + if ( rCell.pValidRefToken ) + pValidRefToken = static_cast<ScToken*>(rCell.pValidRefToken->Clone()); + else + pValidRefToken = NULL; + pCode = (rCell.pCode) ? rCell.pCode->Clone() : NULL; if ( nCloneFlags & SC_CLONECELL_ADJUST3DREL ) |