diff options
author | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-10-25 13:43:43 -0400 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@suse.com> | 2011-10-25 13:47:46 -0400 |
commit | 2091557777a5cc15c3b6fe3539d08cd821bd4669 (patch) | |
tree | 62e065c0ed2e8e5f5b5d596bbed076faf8a9e803 /sc/source/core/data/validat.cxx | |
parent | b5423ef42e18caac3ceb5d880ba1b6a1737e155c (diff) |
To destroy a cell instance, we need to call ScBaseCell::Delete().
We can't call delete on them directly, as their destructors are
intentionally not public. Instead, we need to call Delete().
Diffstat (limited to 'sc/source/core/data/validat.cxx')
-rw-r--r-- | sc/source/core/data/validat.cxx | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx index b6144ab119ab..31b4c4fac58d 100644 --- a/sc/source/core/data/validat.cxx +++ b/sc/source/core/data/validat.cxx @@ -528,8 +528,9 @@ sal_Bool ScValidationData::IsDataValid( ScBaseCell* pCell, const ScAddress& rPos if ( bOk ) { double nLenVal = (double) aString.Len(); - ScValueCell aTmpCell( nLenVal ); - bOk = IsCellValid( &aTmpCell, rPos ); + ScValueCell* pTmpCell = new ScValueCell( nLenVal ); + bOk = IsCellValid( pTmpCell, rPos ); + pTmpCell->Delete(); } break; |