You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@openoffice.apache.org by hd...@apache.org on 2013/08/28 09:10:19 UTC
svn commit: r1518092 - in /openoffice/branches/AOO401: ./
main/sc/source/ui/unoobj/chart2uno.cxx
Author: hdu
Date: Wed Aug 28 07:10:18 2013
New Revision: 1518092
URL: http://svn.apache.org/r1518092
Log:
#i122822# revert fix for issue 121058
Sample reduction is only viable on the view side, but not on the generic
data provider side. Reverting r1388440 to fix the latter.
Patch by: Yan Peng Guo
Regression isolated by: Regina Henschel, Herbert Duerr
Found by: rohner@tofwerk.com
Modified:
openoffice/branches/AOO401/ (props changed)
openoffice/branches/AOO401/main/sc/source/ui/unoobj/chart2uno.cxx
Propchange: openoffice/branches/AOO401/
------------------------------------------------------------------------------
Merged /openoffice/trunk:r1518091
Modified: openoffice/branches/AOO401/main/sc/source/ui/unoobj/chart2uno.cxx
URL: http://svn.apache.org/viewvc/openoffice/branches/AOO401/main/sc/source/ui/unoobj/chart2uno.cxx?rev=1518092&r1=1518091&r2=1518092&view=diff
==============================================================================
--- openoffice/branches/AOO401/main/sc/source/ui/unoobj/chart2uno.cxx (original)
+++ openoffice/branches/AOO401/main/sc/source/ui/unoobj/chart2uno.cxx Wed Aug 28 07:10:18 2013
@@ -2534,6 +2534,7 @@ void ScChart2DataSequence::BuildDataCach
SCCOL nLastCol = -1;
SCROW nLastRow = -1;
+
for (SCTAB nTab = aRange.aStart.Tab(); nTab <= aRange.aEnd.Tab(); ++nTab)
{
for (SCCOL nCol = aRange.aStart.Col(); nCol <= aRange.aEnd.Col(); ++nCol)
@@ -2563,6 +2564,7 @@ void ScChart2DataSequence::BuildDataCach
continue;
if (pCell->HasStringData())
+
rItem.maString = pCell->GetStringData();
else
{
@@ -3018,51 +3020,12 @@ uno::Sequence< double > SAL_CALL ScChart
::rtl::math::setNan(&fNAN);
sal_Int32 nCount = m_aDataArray.size();
- // i121058: if there's too many points need to be painted, it doens't need to get all points for performance consideration
- // and so many points are not useful for users to understand the chart. So only picked some points to paint
- sal_Int32 nStep = nCount >= 10000 ? 50 : 1;
- nCount = nCount >= 10000 ? ((nCount - nCount % nStep) / nStep) : nCount;
- sal_Int32 nRealCount = nStep == 1 ? nCount : nCount * 2;
- uno::Sequence<double> aSeq(nRealCount);
- double* pArr = aSeq.getArray();
- ::std::list<Item>::const_iterator itr = m_aDataArray.begin(), itrEnd = m_aDataArray.end();
- for (sal_Int32 i = 0; i < nCount; i++)
- {
- if (nStep == 1)
- {
- *pArr++ = itr->mbIsValue ? itr->mfValue : fNAN;
- itr++;
- }
- else
- {
- sal_Int32 nMax = 0, nMin = 0, nMaxStep = 0, nMinStep = 0;
- for (sal_Int32 j = 0; j < nStep; j++)
- {
- sal_Int32 nValue = itr->mbIsValue ? itr->mfValue : fNAN;
- if (nValue > nMax)
- {
- nMax = nValue;
- nMaxStep = j;
- }
- if (nValue < nMin)
- {
- nMin = nValue;
- nMinStep = j;
- }
- itr++;
- }
- if (nMaxStep > nMinStep)
- {
- *pArr++ = nMin;
- *pArr++ = nMax;
- }
- else
- {
- *pArr++ = nMax;
- *pArr++ = nMin;
- }
- }
- }
+ uno::Sequence<double> aSeq(nCount);
+ double* pArr = aSeq.getArray();
+ ::std::list<Item>::const_iterator itr = m_aDataArray.begin(), itrEnd = m_aDataArray.end();
+ for (; itr != itrEnd; ++itr, ++pArr)
+ *pArr = itr->mbIsValue ? itr->mfValue : fNAN;
+
return aSeq;
}