diff options
-rw-r--r-- | sc/inc/dpglobal.hxx | 8 | ||||
-rw-r--r-- | sc/inc/dptabsrc.hxx | 12 | ||||
-rw-r--r-- | sc/source/core/data/dpobject.cxx | 4 | ||||
-rw-r--r-- | sc/source/core/data/dptabres.cxx | 26 | ||||
-rw-r--r-- | sc/source/core/data/dptabsrc.cxx | 4 | ||||
-rw-r--r-- | sc/source/ui/dbgui/pvlaydlg.cxx | 4 |
6 files changed, 24 insertions, 34 deletions
diff --git a/sc/inc/dpglobal.hxx b/sc/inc/dpglobal.hxx index 1fc3b703819c..090a7a7bf31a 100644 --- a/sc/inc/dpglobal.hxx +++ b/sc/inc/dpglobal.hxx @@ -54,9 +54,7 @@ #include <com/sun/star/sheet/XHierarchiesSupplier.hpp> #include <com/sun/star/sheet/XLevelsSupplier.hpp> - -// moved from fieldwnd.hxx, see also SC_DAPI_MAXFIELDS -#define MAX_LABELS 256 +#define SC_DP_MAX_FIELDS 256 #define PIVOT_MAXFUNC 11 #define PIVOT_FUNC_NONE 0x0000 @@ -73,10 +71,6 @@ #define PIVOT_FUNC_STD_VARP 0x0400 #define PIVOT_FUNC_AUTO 0x1000 -#define DATA_RENAME_SEPARATOR "_" -#define __MAX_NUM_LEN 64 -#define __DECIMALPLACE 18 - class SC_DLLPUBLIC ScDPItemData { public: diff --git a/sc/inc/dptabsrc.hxx b/sc/inc/dptabsrc.hxx index 79986f734db8..c3b3031224c4 100644 --- a/sc/inc/dptabsrc.hxx +++ b/sc/inc/dptabsrc.hxx @@ -77,10 +77,6 @@ class ScDPResultData; class ScDPItemData; class ScDPTableData; -// should be dynamic! -#define SC_DAPI_MAXFIELDS 256 - - // // implementation of DataPilotSource using ScDPTableData // @@ -108,10 +104,10 @@ private: ScDPTableData* pData; // data source (ScDPObject manages its life time) ScDPDimensions* pDimensions; // api objects // settings: - long nColDims[SC_DAPI_MAXFIELDS]; - long nRowDims[SC_DAPI_MAXFIELDS]; - long nDataDims[SC_DAPI_MAXFIELDS]; - long nPageDims[SC_DAPI_MAXFIELDS]; + long nColDims[SC_DP_MAX_FIELDS]; + long nRowDims[SC_DP_MAX_FIELDS]; + long nDataDims[SC_DP_MAX_FIELDS]; + long nPageDims[SC_DP_MAX_FIELDS]; long nColDimCount; long nRowDimCount; long nDataDimCount; diff --git a/sc/source/core/data/dpobject.cxx b/sc/source/core/data/dpobject.cxx index a09e5ee98838..d675bc898d2a 100644 --- a/sc/source/core/data/dpobject.cxx +++ b/sc/source/core/data/dpobject.cxx @@ -1980,8 +1980,8 @@ bool ScDPObject::FillLabelData(ScPivotParam& rParam) uno::Reference<container::XNameAccess> xDimsName = xSource->getDimensions(); uno::Reference<container::XIndexAccess> xDims = new ScNameToIndexAccess( xDimsName ); long nDimCount = xDims->getCount(); - if ( nDimCount > MAX_LABELS ) - nDimCount = MAX_LABELS; + if ( nDimCount > SC_DP_MAX_FIELDS ) + nDimCount = SC_DP_MAX_FIELDS; if (!nDimCount) return false; diff --git a/sc/source/core/data/dptabres.cxx b/sc/source/core/data/dptabres.cxx index 3d502455e80f..114aa1512109 100644 --- a/sc/source/core/data/dptabres.cxx +++ b/sc/source/core/data/dptabres.cxx @@ -254,8 +254,8 @@ sal_Bool ScDPColMembersOrder::operator()( sal_Int32 nIndex1, sal_Int32 nIndex2 ) ScDPInitState::ScDPInitState() : nCount( 0 ) { - pIndex = new long[SC_DAPI_MAXFIELDS]; - pData = new SCROW[SC_DAPI_MAXFIELDS]; + pIndex = new long[SC_DP_MAX_FIELDS]; + pData = new SCROW[SC_DP_MAX_FIELDS]; } ScDPInitState::~ScDPInitState() @@ -266,8 +266,8 @@ ScDPInitState::~ScDPInitState() void ScDPInitState::AddMember( long nSourceIndex, SCROW nMember ) { - OSL_ENSURE( nCount < SC_DAPI_MAXFIELDS, "too many InitState members" ); - if ( nCount < SC_DAPI_MAXFIELDS ) + OSL_ENSURE( nCount < SC_DP_MAX_FIELDS, "too many InitState members" ); + if ( nCount < SC_DP_MAX_FIELDS ) { pIndex[nCount] = nSourceIndex; pData[nCount] = nMember; @@ -334,10 +334,10 @@ ScDPRunningTotalState::ScDPRunningTotalState( ScDPResultMember* pColRoot, ScDPRe nColIndexPos( 0 ), nRowIndexPos( 0 ) { - pColVisible = new long[SC_DAPI_MAXFIELDS+1]; - pColIndexes = new long[SC_DAPI_MAXFIELDS+1]; - pRowVisible = new long[SC_DAPI_MAXFIELDS+1]; - pRowIndexes = new long[SC_DAPI_MAXFIELDS+1]; + pColVisible = new long[SC_DP_MAX_FIELDS+1]; + pColIndexes = new long[SC_DP_MAX_FIELDS+1]; + pRowVisible = new long[SC_DP_MAX_FIELDS+1]; + pRowIndexes = new long[SC_DP_MAX_FIELDS+1]; pColIndexes[0] = -1; pRowIndexes[0] = -1; } @@ -352,8 +352,8 @@ ScDPRunningTotalState::~ScDPRunningTotalState() void ScDPRunningTotalState::AddColIndex( long nVisible, long nSorted ) { - OSL_ENSURE( nColIndexPos < SC_DAPI_MAXFIELDS, "too many column indexes" ); - if ( nColIndexPos < SC_DAPI_MAXFIELDS ) + OSL_ENSURE( nColIndexPos < SC_DP_MAX_FIELDS, "too many column indexes" ); + if ( nColIndexPos < SC_DP_MAX_FIELDS ) { pColVisible[nColIndexPos] = nVisible; pColIndexes[nColIndexPos] = nSorted; @@ -365,8 +365,8 @@ void ScDPRunningTotalState::AddColIndex( long nVisible, long nSorted ) void ScDPRunningTotalState::AddRowIndex( long nVisible, long nSorted ) { - OSL_ENSURE( nRowIndexPos < SC_DAPI_MAXFIELDS, "too many row indexes" ); - if ( nRowIndexPos < SC_DAPI_MAXFIELDS ) + OSL_ENSURE( nRowIndexPos < SC_DP_MAX_FIELDS, "too many row indexes" ); + if ( nRowIndexPos < SC_DP_MAX_FIELDS ) { pRowVisible[nRowIndexPos] = nVisible; pRowIndexes[nRowIndexPos] = nSorted; @@ -767,7 +767,7 @@ ScDPResultData::ScDPResultData( ScDPSource* pSrc ) : //! Ref bDataAtRow( false ) { - lcl_ResizePointVector( mpDimMembers , SC_DAPI_MAXFIELDS ); + lcl_ResizePointVector( mpDimMembers , SC_DP_MAX_FIELDS ); } ScDPResultData::~ScDPResultData() diff --git a/sc/source/core/data/dptabsrc.cxx b/sc/source/core/data/dptabsrc.cxx index 6764d2d772ad..199e457dea61 100644 --- a/sc/source/core/data/dptabsrc.cxx +++ b/sc/source/core/data/dptabsrc.cxx @@ -808,8 +808,8 @@ void ScDPSource::CreateRes_Impl() // or pointer arrays. vector<rtl::OUString> aDataNames; sheet::DataPilotFieldReference* pDataRefValues = NULL; - ScSubTotalFunc eDataFunctions[SC_DAPI_MAXFIELDS]; - sal_uInt16 nDataRefOrient[SC_DAPI_MAXFIELDS]; + ScSubTotalFunc eDataFunctions[SC_DP_MAX_FIELDS]; + sal_uInt16 nDataRefOrient[SC_DP_MAX_FIELDS]; if (nDataDimCount) { aDataNames.resize(nDataDimCount); diff --git a/sc/source/ui/dbgui/pvlaydlg.cxx b/sc/source/ui/dbgui/pvlaydlg.cxx index 961b979d81a5..8b83f6b06834 100644 --- a/sc/source/ui/dbgui/pvlaydlg.cxx +++ b/sc/source/ui/dbgui/pvlaydlg.cxx @@ -347,8 +347,8 @@ void ScDPLayoutDlg::StateChanged( StateChangedType nStateChange ) void ScDPLayoutDlg::InitWndSelect( const vector<ScDPLabelDataRef>& rLabels ) { size_t nLabelCount = rLabels.size(); - if (nLabelCount > MAX_LABELS) - nLabelCount = MAX_LABELS; + if (nLabelCount > SC_DP_MAX_FIELDS) + nLabelCount = SC_DP_MAX_FIELDS; aLabelDataArr.clear(); aLabelDataArr.reserve( nLabelCount ); |