sc/source/core/inc/interpre.hxx | 4 ++-- sc/source/core/tool/interpr3.cxx | 11 ++++++----- 2 files changed, 8 insertions(+), 7 deletions(-)
New commits: commit 887370fe830a148f309b23011f3428d80a53811d Author: Eike Rathke <er...@redhat.com> Date: Mon Apr 20 18:50:26 2015 +0200 only convert in svMatrix, not in external references, tdf#88547 follow-up Change-Id: I7bc03f7ff3ec57317e7fbad4476874bac6c44877 diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index a397bdd..9218f53 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -3670,7 +3670,8 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double size_t nRefInList = 0; while (nParam-- > 0) { - switch (GetStackType()) + const StackVar eStackType = GetStackType(); + switch (eStackType) { case formula::svDouble : rArray.push_back( PopDouble()); @@ -3724,7 +3725,7 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double for (SCSIZE i = 0; i < nCount; ++i) rArray.push_back( pMat->GetDouble(i)); } - else if (bConvertTextInArray) + else if (bConvertTextInArray && eStackType == svMatrix) { for (SCSIZE i = 0; i < nCount; ++i) { commit 46befa93818dc7dedc614a08bf0266b0723f9284 Author: Eike Rathke <er...@redhat.com> Date: Mon Apr 20 18:47:00 2015 +0200 clarify that only text in arrays is to be converted, tdf#88547 follow-up Change-Id: I7cebaf1a2907f4beb10e128ea5d479df45c1e1c5 diff --git a/sc/source/core/inc/interpre.hxx b/sc/source/core/inc/interpre.hxx index d1d4670..19b779d 100644 --- a/sc/source/core/inc/interpre.hxx +++ b/sc/source/core/inc/interpre.hxx @@ -816,8 +816,8 @@ void ScMedian(); double GetMedian( ::std::vector<double> & rArray ); double GetPercentile( ::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 GetSortArray( sal_uInt8 nParamCount, ::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder, 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 bConvertTextInArray ); void QuickSort(::std::vector<double>& rSortArray, ::std::vector<long>* pIndexOrder = NULL); void ScModalValue(); void ScModalValue_Multi(); diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index 1dd07f5..a397bdd 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -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; ScRange aRange; @@ -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 if (bAllowText) + else if (bConvertTextInArray) { for (SCSIZE i = 0; i < nCount; ++i) { @@ -3782,9 +3782,9 @@ void ScInterpreter::GetNumberSequenceArray( sal_uInt8 nParamCount, vector<double 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) SetError( errStackOverflow); else if (rSortArray.empty()) _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org http://lists.freedesktop.org/mailman/listinfo/libreoffice-commits