[Libreoffice-commits] .: sc/source
Libreoffice Gerrit user
logerrit at kemper.freedesktop.org
Thu Jan 3 17:29:46 PST 2013
sc/source/core/data/dpobject.cxx | 8 ++------
sc/source/ui/dbgui/pvlaydlg.cxx | 2 --
2 files changed, 2 insertions(+), 8 deletions(-)
New commits:
commit 107cb122e962df7fff51f746a65cee91b2c71d22
Author: Kohei Yoshida <kohei.yoshida at gmail.com>
Date: Thu Jan 3 20:28:07 2013 -0500
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
diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx
index 3c43378..69e7901 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 86a3069..9f01ab2 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 );
More information about the Libreoffice-commits
mailing list