[Libreoffice-commits] .: Branch 'libreoffice-4-0' - sc/source

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Jan 3 17:30:12 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 131d42a61aa0fdd14423966100e7fa3e4b8f073e
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 e55a9c8..8f604be 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 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