summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKohei Yoshida <kohei.yoshida@gmail.com>2013-01-03 20:28:07 -0500
committerKohei Yoshida <kohei.yoshida@gmail.com>2013-01-03 20:31:27 -0500
commit131d42a61aa0fdd14423966100e7fa3e4b8f073e (patch)
tree95d647e2fdf052066dd87213b5c739c4ce47a222
parentee82f4e21dc8f58216c51f0303d4a309f1e871c0 (diff)
fdo#58004: Let's remove these upper bound truncation.
We may still need to set an upper bound, but we shouldn't do these all over the place. Apparently we now allow more than 256 fields, so doing this would only break things for fields whose indices are greater than 255. Change-Id: Ic2e374ec01267044c2e40664775e7f62b1461f41
-rw-r--r--sc/source/core/data/dpobject.cxx8
-rw-r--r--sc/source/ui/dbgui/pvlaydlg.cxx2
2 files changed, 2 insertions, 8 deletions
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index e55a9c864422..8f604be8f2c3 100644
--- a/sc/source/core/data/dpobject.cxx
+++ b/sc/source/core/data/dpobject.cxx
@@ -2227,9 +2227,7 @@ bool ScDPObject::FillLabelData(sal_Int32 nDim, ScDPLabelData& rLabels)
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xDimsName );
sal_Int32 nDimCount = xDims->getCount();
- if ( nDimCount > SC_DP_MAX_FIELDS )
- nDimCount = SC_DP_MAX_FIELDS;
- if (!nDimCount || nDim >= nDimCount)
+ if (nDimCount <= 0 || nDim >= nDimCount)
return false;
return FillLabelDataForDimension(xDims, nDim, rLabels);
@@ -2246,9 +2244,7 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam)
uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions();
uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xDimsName );
sal_Int32 nDimCount = xDims->getCount();
- if ( nDimCount > SC_DP_MAX_FIELDS )
- nDimCount = SC_DP_MAX_FIELDS;
- if (!nDimCount)
+ if (nDimCount <= 0)
return false;
for (sal_Int32 nDim = 0; nDim < nDimCount; ++nDim)
diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx
index 86a3069e46d0..9f01ab230dfb 100644
--- a/sc/source/ui/dbgui/pvlaydlg.cxx
+++ b/sc/source/ui/dbgui/pvlaydlg.cxx
@@ -289,8 +289,6 @@ sal_Bool ScPivotLayoutDlg::Close()
void ScPivotLayoutDlg::InitWndSelect(const ScDPLabelDataVector& rLabels)
{
size_t nLabelCount = rLabels.size();
- if (nLabelCount > SC_DP_MAX_FIELDS)
- nLabelCount = SC_DP_MAX_FIELDS;
maLabelData.clear();
maLabelData.reserve( nLabelCount );