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:30:58 -0500 |
commit | 107cb122e962df7fff51f746a65cee91b2c71d22 (patch) | |
tree | 7afcad58c82af2aa5db4782f73a4ec617477e091 /sc | |
parent | 6a393297ce6d99bbc4edefbf01ab9c5c6f0eff84 (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
Diffstat (limited to 'sc')
-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 3c433783b242..69e7901aa851 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -2138,9 +2138,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); @@ -2157,9 +2155,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 ); |