Kaydet (Commit) 46befa93 authored tarafından Eike Rathke's avatar Eike Rathke

clarify that only text in arrays is to be converted, tdf#88547 follow-up

Change-Id: I7cebaf1a2907f4beb10e128ea5d479df45c1e1c5
üst b756a907
...@@ -816,8 +816,8 @@ void ScMedian(); ...@@ -816,8 +816,8 @@ void ScMedian();
double GetMedian( ::std::vector<double> & rArray ); double GetMedian( ::std::vector<double> & rArray );
double GetPercentile( ::std::vector<double> & rArray, double fPercentile ); double GetPercentile( ::std::vector<double> & rArray, double fPercentile );
double GetPercentileExclusive( ::std::vector<double> & rArray, double fPercentile ); double GetPercentileExclusive( ::std::vector<double> & rArray, double fPercentile );
void GetNumberSequenceArray( sal_uInt8 nParamCount, ::std::vector<double>& rArray, bool bAllowText ); void GetNumberSequenceArray( sal_uInt8 nParamCount, ::std::vector<double>& rArray, bool bConvertTextInArray );
void GetSortArray( sal_uInt8 nParamCount, ::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder, bool bAllowText ); void GetSortArray( sal_uInt8 nParamCount, ::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder, bool bConvertTextInArray );
void QuickSort(::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL); void QuickSort(::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL);
void ScModalValue(); void ScModalValue();
void ScModalValue_Multi(); void ScModalValue_Multi();
......
...@@ -3662,7 +3662,7 @@ void ScInterpreter::ScTrimMean() ...@@ -3662,7 +3662,7 @@ void ScInterpreter::ScTrimMean()
} }
} }
void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double>& rArray, bool bAllowText ) void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double>& rArray, bool bConvertTextInArray )
{ {
ScAddress aAdr; ScAddress aAdr;
ScRange aRange; ScRange aRange;
...@@ -3724,7 +3724,7 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double ...@@ -3724,7 +3724,7 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double
for (SCSIZE i = 0; i < nCount; ++i) for (SCSIZE i = 0; i < nCount; ++i)
rArray.push_back( pMat->GetDouble(i)); rArray.push_back( pMat->GetDouble(i));
} }
else if (bAllowText) else if (bConvertTextInArray)
{ {
for (SCSIZE i = 0; i < nCount; ++i) for (SCSIZE i = 0; i < nCount; ++i)
{ {
...@@ -3782,9 +3782,9 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double ...@@ -3782,9 +3782,9 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double
PopError(); PopError();
} }
void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector<double>& rSortArray, vector<long>* pIndexOrder, bool bAllowText ) void ScInterpreter::GetSortArray( sal_uInt8 nParamCount, vector<double>& rSortArray, vector<long>* pIndexOrder, bool bConvertTextInArray )
{ {
GetNumberSequenceArray( nParamCount, rSortArray, bAllowText ); GetNumberSequenceArray( nParamCount, rSortArray, bConvertTextInArray );
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