26#include <document.hxx>
34#include <osl/diagnose.h>
39using ::com::sun::star::uno::Any;
40using ::com::sun::star::uno::Sequence;
45 aQuery ( rDesc.GetQueryParam() ),
46 bIgnoreEmptyRows( false ),
47 bRepeatIfEmpty(false),
51 for (
SCSIZE j = 0; j < nEntryCount; ++j)
94 OSL_FAIL(
"getDimensionName: invalid dimension");
111 else if (nDim >= nColCount)
113 OSL_FAIL(
"IsDateDimension: invalid dimension");
131 OSL_FAIL(
"GetNumberFormat: invalid dimension");
181 rCriteria, (
IsRepeatIfEmpty() ? rCatDims : std::unordered_set<sal_Int32>()));
184void ScSheetDPData::GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rCatDims, Sequence< Sequence<Any> >& rData)
192 rCriteria, rData,
IsRepeatIfEmpty() ? rCatDims : std::unordered_set<sal_Int32>());
250 if (!
pData->IsReference(aRange))
290 OSL_FAIL(
"Error Create Cache" );
310 return STR_ERR_DATAPILOTSOURCE;
315 return STR_ERR_DATAPILOTSOURCE;
318 return STR_ERR_DATAPILOTSOURCE;
size_t SCSIZE
size_t typedef to be able to find places where code was changed from USHORT to size_t and is used to ...
OUString uppercase(const OUString &rStr, sal_Int32 nPos, sal_Int32 nCount) const
This class represents the cached data part of the datapilot cache table implementation.
bool IsDateDimension(tools::Long nDim) const
sal_uInt32 GetNumberFormat(tools::Long nDim) const
Data caches for range name based source data.
const ScDPCache * getCache(const OUString &rName, const ScRange &rRange, const ScDPDimensionSaveData *pDimData)
Stores and manages all caches from internal sheets.
const ScDPCache * getCache(const ScRange &rRange, const ScDPDimensionSaveData *pDimData)
SC_DLLPUBLIC SheetCaches & GetSheetCaches()
NameCaches & GetNameCaches()
This class has to do with handling exclusively grouped dimensions? TODO: Find out what this class doe...
This class is only a wrapper to the actual cache, to provide filtering on the raw data based on the q...
sal_Int32 getColSize() const
void filterTable(const std::vector< Criterion > &rCriteria, css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &rTabData, const std::unordered_set< sal_Int32 > &rRepeatIfEmptyDims)
Filter the table based on the specified criteria, and copy the result to rTabData.
void fillTable(const ScQueryParam &rQuery, bool bIgnoreEmptyRows, bool bRepeatIfEmpty)
void filterByPageDimension(const std::vector< Criterion > &rCriteria, const std::unordered_set< sal_Int32 > &rRepeatIfEmptyDims)
Set filter on/off flag to each row to control visibility.
sal_Int32 getRowSize() const
OUString getFieldName(SCCOL nIndex) const
const ScDPCache & getCache() const
Base class that abstracts different data source types of a datapilot table.
void CalcResultsFromCacheTable(const ScDPFilteredCache &rCacheTable, CalcInfo &rInfo, bool bAutoShow)
sal_uInt32 GetNumberFormatByIdx(NfIndexTableOffset)
SC_DLLPUBLIC SvNumberFormatter * GetFormatTable() const
SC_DLLPUBLIC ScRangeName * GetRangeName(SCTAB nTab) const
SC_DLLPUBLIC ScDPCollection * GetDPCollection()
static SC_DLLPUBLIC const CharClass & getCharClass()
SC_DLLPUBLIC ScRangeData * findByUpperName(const OUString &rName)
virtual void CalcResults(CalcInfo &rInfo, bool bAutoShow) override
virtual void SetEmptyFlags(bool bIgnoreEmptyRows, bool bRepeatIfEmpty) override
virtual sal_uInt32 GetNumberFormat(sal_Int32 nDim) override
virtual void GetDrillDownData(std::vector< ScDPFilteredCache::Criterion > &&rCriteria, std::unordered_set< sal_Int32 > &&rCatDims, css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &rData) override
virtual bool IsRepeatIfEmpty() override
virtual const ScDPFilteredCache & GetCacheTable() const override
ScSheetDPData(const ScDocument *pD, const ScSheetSourceDesc &rDesc, const ScDPCache &rCache)
virtual void FilterCacheTable(std::vector< ScDPFilteredCache::Criterion > &&rCriteria, std::unordered_set< sal_Int32 > &&rCatDims) override
virtual bool IsDateDimension(sal_Int32 nDim) override
virtual void CreateCacheTable() override
virtual void Dump() const override
virtual sal_Int32 GetColumnCount() override
use (new) typed collection instead of ScStrCollection or separate Str and ValueCollection
virtual ~ScSheetDPData() override
virtual void DisposeData() override
ScDPFilteredCache aCacheTable
virtual OUString getDimensionName(sal_Int32 nColumn) override
virtual bool getIsDataLayoutDimension(sal_Int32 nColumn) override
virtual void ReloadCacheTable() override
This class contains authoritative information on the internal reference used as the data source for d...
ScQueryParam maQueryParam
const OUString & GetRangeName() const
SC_DLLPUBLIC const ScDPCache * CreateCache(const ScDPDimensionSaveData *pDimData) const
TranslateId CheckSourceRange() const
Check the sanity of the data source range.
SC_DLLPUBLIC void SetSourceRange(const ScRange &rRange)
SC_DLLPUBLIC void SetRangeName(const OUString &rName)
bool operator==(const ScSheetSourceDesc &rOther) const
ScSheetSourceDesc()=delete
SC_DLLPUBLIC const ScRange & GetSourceRange() const
Get the range that contains the source data.
void SetQueryParam(const ScQueryParam &rParam)
bool HasRangeName() const
const OUString & getString() const
std::unique_ptr< sal_Int32[]> pData
OUString ScResId(TranslateId aId)
This structure stores dimension information used when calculating results.
svl::SharedString maString
Each instance of this struct represents a single filtering criteria.
const Item & GetQueryItem() const
SC_DLLPUBLIC const ScQueryEntry & GetEntry(SCSIZE n) const
SC_DLLPUBLIC SCSIZE GetEntryCount() const