25#include <osl/diagnose.h>
33 pInitState( nullptr ),
62 Date aDate( 30,12,1899 );
71 case 0: nRet = aDate.
GetYear();
break;
72 case 1: nRet = (aDate.
GetMonth()-1) / 3 + 1;
break;
73 case 2: nRet = aDate.
GetMonth();
break;
74 case 3: nRet = aDate.
GetDay();
break;
76 OSL_FAIL(
"GetDatePart: wrong level");
83 case 0: nRet = aDate.
GetYear();
break;
87 OSL_FAIL(
"GetDatePart: wrong level");
91 OSL_FAIL(
"GetDatePart: wrong hierarchy");
130 OSL_FAIL(
"IsInGroup shouldn't be called for non-group data");
137 OSL_FAIL(
"HasCommonElement shouldn't be called for non-group data");
154 for (sal_Int32
i = 0;
i <
n; ++
i)
160 if ( nDim < nCacheColumnCount )
190 vector<SCROW> aEmptyData;
201 sal_Int32 nRowSize = rCacheTable.
getRowSize();
202 for (sal_Int32 nRow = 0; nRow < nRowSize; ++nRow)
218 const vector<sal_Int32>& rDims, vector<SCROW>& rItemData)
220 sal_Int32 nDimSize = rDims.size();
221 rItemData.reserve(rItemData.size() + nDimSize);
222 for (sal_Int32
i = 0;
i < nDimSize; ++
i)
224 sal_Int32 nDim = rDims[
i];
228 rItemData.push_back( -1 );
237 rItemData.push_back(
nId );
278 if ( nDataId1 > nDataId2 )
280 else if ( nDataId1 == nDataId2 )
sal_uInt16 GetWeekOfYear(DayOfWeek eStartDay=MONDAY, sal_Int16 nMinimumNumberOfDaysInWeek=4) const
void AddDays(sal_Int32 nAddDays)
sal_Int16 GetYear() const
sal_uInt16 GetDay() const
DayOfWeek GetDayOfWeek() const
sal_uInt16 GetMonth() const
void SetInitChild(bool b)
void SetInitAllChildren(bool b)
This class represents the cached data part of the datapilot cache table implementation.
const ScDPItemData * GetItemDataById(tools::Long nDim, SCROW nId) const
OUString GetFormattedString(tools::Long nDim, const ScDPItemData &rItem, bool bLocaleIndependent) const
SCROW GetItemDataId(sal_uInt16 nDim, SCROW nRow, bool bRepeatIfEmpty) const
tools::Long GetColumnCount() const
This class is only a wrapper to the actual cache, to provide filtering on the raw data based on the q...
sal_Int32 getRowSize() const
const ::std::vector< SCROW > & getFieldEntries(sal_Int32 nColumn) const
Get the unique entries for a field specified by index.
void getValue(ScDPValue &rVal, SCCOL nCol, SCROW nRow) const
bool isRowActive(sal_Int32 nRow, sal_Int32 *pLastRow=nullptr) const
Check whether a specified row is active or not.
const ScDPCache & getCache() const
When assigning a string value, you can also assign an interned string whose life-cycle is managed by ...
bool IsValidEntry(const ::std::vector< SCROW > &aMembers) const
void ProcessData(const ::std::vector< SCROW > &aMembers, const ScDPResultDimension *pDataDim, const ::std::vector< SCROW > &aDataMembers, const ::std::vector< ScDPValue > &aValues) const
void ProcessData(const ::std::vector< SCROW > &aChildMembers, const ScDPResultDimension *pDataDim, const ::std::vector< SCROW > &aDataMembers, const ::std::vector< ScDPValue > &aValues)
void LateInitFrom(LateInitParams &rParams, const ::std::vector< SCROW > &pItemData, size_t nPos, ScDPInitState &rInitState)
const ScDPResultDimension * GetChildDimension() const
this will be removed!
virtual sal_Int32 GetGroupBase(sal_Int32 nGroupDim) const
void CalcResultsFromCacheTable(const ScDPFilteredCache &rCacheTable, CalcInfo &rInfo, bool bAutoShow)
virtual sal_Int32 GetMembersCount(sal_Int32 nDim)
virtual bool IsNumOrDateGroup(sal_Int32 nDim) const
static void ProcessRowData(CalcInfo &rInfo, const CalcRowData &rData, bool bAutoShow)
virtual bool HasCommonElement(const ScDPItemData &rFirstData, sal_Int32 nFirstIndex, const ScDPItemData &rSecondData, sal_Int32 nSecondIndex) const
OUString GetFormattedString(sal_Int32 nDim, const ScDPItemData &rItem, bool bLocaleIndependent) const
ScDPTableData(const ScDPTableData &)=delete
virtual const ScDPItemData * GetMemberById(sal_Int32 nDim, sal_Int32 nId)
virtual sal_Int32 Compare(sal_Int32 nDim, sal_Int32 nDataId1, sal_Int32 nDataId2)
virtual void Dump() const
void FillRowDataFromCacheTable(sal_Int32 nRow, const ScDPFilteredCache &rCacheTable, const CalcInfo &rInfo, CalcRowData &rData)
virtual bool getIsDataLayoutDimension(sal_Int32 nColumn)=0
tools::Long GetDatePart(tools::Long nDateVal, tools::Long nHierarchy, tools::Long nLevel)
const ScDPItemData * GetMemberByIndex(sal_Int32 nDim, sal_Int32 nIndex)
virtual bool IsInGroup(const ScDPItemData &rGroupData, sal_Int32 nGroupIndex, const ScDPItemData &rBaseData, sal_Int32 nBaseIndex) const
virtual const ScDPFilteredCache & GetCacheTable() const =0
virtual bool IsBaseForGroup(sal_Int32 nDim) const
virtual bool IsRepeatIfEmpty()
virtual const std::vector< SCROW > & GetColumnEntries(sal_Int32 nColumn)
void GetItemData(const ScDPFilteredCache &rCacheTable, sal_Int32 nRow, const ::std::vector< sal_Int32 > &rDims, ::std::vector< SCROW > &rItemData)
virtual sal_Int32 GetSourceDim(sal_Int32 nDim)
virtual sal_uInt32 GetNumberFormat(sal_Int32 nDim)
#define SC_DAPI_HIERARCHY_QUARTER
#define SC_DAPI_HIERARCHY_WEEK
constexpr OUStringLiteral aData
This structure stores dimension information used when calculating results.
::std::vector< sal_Int32 > aPageDims
::std::vector< ScDPLevel * > aColLevels
::std::vector< sal_Int32 > aRowLevelDims
::std::vector< sal_Int32 > aDataSrcCols
::std::vector< ScDPDimension * > aColDims
ScDPResultMember * pRowRoot
::std::vector< sal_Int32 > aColLevelDims
ScDPResultMember * pColRoot
::std::vector< ScDPDimension * > aRowDims
::std::vector< ScDPLevel * > aRowLevels
ScDPInitState * pInitState
This structure stores vector arrays that hold intermediate data for each row during cache table itera...
::std::vector< SCROW > aPageData
::std::vector< ScDPValue > aValues
::std::vector< SCROW > aRowData
::std::vector< SCROW > aColData