diff options
author | Eike Rathke <erack@redhat.com> | 2015-04-20 18:11:15 +0200 |
---|---|---|
committer | Eike Rathke <erack@redhat.com> | 2015-04-20 18:39:43 +0200 |
commit | 2fcd8c2c40481a95bf0cf59b1dd314d84226226c (patch) | |
tree | bb130ecd0e9522c9d58899db2777839b25f15dd0 | |
parent | 7a8f48ba8739c491b5bae23bc9947e44f1813926 (diff) |
take different paths for performance if bAllowText, tdf#88547 follow-up
Change-Id: I93cd943f9b26e6e4bdc7c616e9fc7a46d07a9d91
-rw-r--r-- | sc/source/core/tool/interpr3.cxx | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 7b21392344f8..b97dad5f38a3 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -3724,7 +3724,7 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double for (SCSIZE i = 0; i < nCount; ++i) rArray.push_back( pMat->GetDouble(i)); } - else + else if (bAllowText) { for (SCSIZE i = 0; i < nCount; ++i) { @@ -3732,20 +3732,25 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double rArray.push_back( pMat->GetDouble(i)); else { - if ( bAllowText ) + // tdf#88547 try to convert string to (date)value + OUString aStr = pMat->GetString( i ).getString(); + if ( aStr.getLength() > 0 ) { - // tdf 88547 try to convert string to (date)value - OUString aStr = pMat->GetString( i ).getString(); - if ( aStr.getLength() > 0 ) - { - double fVal = ConvertStringToValue( aStr ); - if ( !nGlobalError ) - rArray.push_back( fVal ); - } + double fVal = ConvertStringToValue( aStr ); + if ( !nGlobalError ) + rArray.push_back( fVal ); } } } } + else + { + for (SCSIZE i = 0; i < nCount; ++i) + { + if ( pMat->IsValue( i ) ) + rArray.push_back( pMat->GetDouble(i)); + } + } } break; default : |