diff options
author | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-01-03 20:28:07 -0500 |
---|---|---|
committer | Kohei Yoshida <kohei.yoshida@gmail.com> | 2013-01-03 20:31:27 -0500 |
commit | 131d42a61aa0fdd14423966100e7fa3e4b8f073e (patch) | |
tree | 95d647e2fdf052066dd87213b5c739c4ce47a222 | |
parent | ee82f4e21dc8f58216c51f0303d4a309f1e871c0 (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.cxx | 8 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pvlaydlg.cxx | 2 |
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 ); |