[Libreoffice-commits] core.git: sc/source
Eike Rathke
erack at redhat.com
Fri Mar 22 15:53:55 PDT 2013
sc/source/core/data/validat.cxx | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
New commits:
commit 9b612f568a5c88f1a65654ad2bdd3df7211a9f3a
Author: Eike Rathke <erack at redhat.com>
Date: Fri Mar 22 23:51:55 2013 +0100
no need to new/delete temporary, stack based auto does it
Change-Id: I5ab9537718f3f9a7e4296226c6ca1ad82ee2eb8a
diff --git a/sc/source/core/data/validat.cxx b/sc/source/core/data/validat.cxx
index 4e1b1f5..71b53e5 100644
--- a/sc/source/core/data/validat.cxx
+++ b/sc/source/core/data/validat.cxx
@@ -453,13 +453,16 @@ sal_Bool ScValidationData::IsDataValid( const String& rTest, const ScPatternAttr
}
else
{
- ScBaseCell* pCell;
if (bIsVal)
- pCell = new ScValueCell( nVal );
+ {
+ ScValueCell aTmpCell( nVal );
+ bRet = IsDataValid( &aTmpCell, rPos );
+ }
else
- pCell = new ScStringCell( rTest );
- bRet = IsDataValid( pCell, rPos );
- pCell->Delete();
+ {
+ ScStringCell aTmpCell( rTest );
+ bRet = IsDataValid( &aTmpCell, rPos );
+ }
}
return bRet;
More information about the Libreoffice-commits
mailing list