Kaydet (Commit) 104a1e64 authored tarafından Winfried Donkers's avatar Winfried Donkers Kaydeden (comit) Eike Rathke

fdo#88547 allow inline date-arrays for array functions

Change-Id: I090633944f6514964949566ffe94038b565abff4
Reviewed-on: https://gerrit.libreoffice.org/14019Reviewed-by: 's avatarEike Rathke <erack@redhat.com>
Tested-by: 's avatarEike Rathke <erack@redhat.com>
üst 7818c734
...@@ -3719,6 +3719,14 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double ...@@ -3719,6 +3719,14 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double
for (SCSIZE i = 0; i < nCount; ++i) for (SCSIZE i = 0; i < nCount; ++i)
if (!pMat->IsString(i)) if (!pMat->IsString(i))
rArray.push_back( pMat->GetDouble(i)); rArray.push_back( pMat->GetDouble(i));
else
{
// fdo 88547 try to convert string to (date)value
OUString aStr = pMat->GetString( i ).getString();
double fVal = ConvertStringToValue( aStr );
if ( !nGlobalError )
rArray.push_back( fVal );
}
} }
} }
break; break;
...@@ -3739,7 +3747,6 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double ...@@ -3739,7 +3747,6 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double
void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector<double>& rSortArray, vector<long>* pIndexOrder ) void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector<double>& rSortArray, vector<long>* pIndexOrder )
{ {
GetNumberSequenceArray( nParamCount, rSortArray); GetNumberSequenceArray( nParamCount, rSortArray);
if (rSortArray.size() > MAX_ANZ_DOUBLE_FOR_SORT) if (rSortArray.size() > MAX_ANZ_DOUBLE_FOR_SORT)
SetError( errStackOverflow); SetError( errStackOverflow);
else if (rSortArray.empty()) else if (rSortArray.empty())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment