LibreOffice Module sc (master)  1
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
5  * This Source Code Form is subject to the terms of the Mozilla Public
6  * License, v. 2.0. If a copy of the MPL was not distributed with this
7  * file, You can obtain one at
8  *
9  * This file incorporates work covered by the following license notice:
10  *
11  * Licensed to the Apache Software Foundation (ASF) under one or more
12  * contributor license agreements. See the NOTICE file distributed
13  * with this work for additional information regarding copyright
14  * ownership. The ASF licenses this file to you under the Apache
15  * License, Version 2.0 (the "License"); you may not use this file
16  * except in compliance with the License. You may obtain a copy of
17  * the License at .
18  */
23 #include "dptabdat.hxx"
24 #include "address.hxx"
25 #include "scdllapi.h"
26 #include "queryparam.hxx"
28 #include <unordered_set>
29 #include <vector>
40 {
41 public:
42  ScSheetSourceDesc() = delete;
46  SC_DLLPUBLIC void SetSourceRange(const ScRange& rRange);
58  SC_DLLPUBLIC const ScRange& GetSourceRange() const;
59  SC_DLLPUBLIC void SetRangeName(const OUString& rName);
60  const OUString& GetRangeName() const { return maRangeName;}
61  bool HasRangeName() const;
62  void SetQueryParam(const ScQueryParam& rParam);
63  const ScQueryParam& GetQueryParam() const { return maQueryParam;}
65  bool operator== ( const ScSheetSourceDesc& rOther ) const;
66  SC_DLLPUBLIC const ScDPCache* CreateCache(const ScDPDimensionSaveData* pDimData) const;
74  const char* CheckSourceRange() const;
76 private:
78  OUString maRangeName;
81 };
87 {
88 private:
95 public:
96  ScSheetDPData(const ScDocument* pD, const ScSheetSourceDesc& rDesc, const ScDPCache& rCache);
97  virtual ~ScSheetDPData() override;
99  virtual long GetColumnCount() override;
100  virtual OUString getDimensionName(long nColumn) override;
101  virtual bool getIsDataLayoutDimension(long nColumn) override;
102  virtual bool IsDateDimension(long nDim) override;
103  virtual sal_uInt32 GetNumberFormat(long nDim) override;
104  virtual void DisposeData() override;
105  virtual void SetEmptyFlags( bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) override;
107  virtual bool IsRepeatIfEmpty() override;
109  virtual void CreateCacheTable() override;
110  virtual void FilterCacheTable(const std::vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rCatDims) override;
111  virtual void GetDrillDownData(const std::vector<ScDPFilteredCache::Criterion>& rCriteria,
112  const std::unordered_set<sal_Int32>& rCatDims,
113  css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& rData) override;
114  virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow) override;
115  virtual const ScDPFilteredCache& GetCacheTable() const override;
116  virtual void ReloadCacheTable() override;
119  virtual void Dump() const override;
120 #endif
121 };
123 #endif
125 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool IsRepeatIfEmpty()
Definition: dptabdat.cxx:102
This class has to do with handling exclusively grouped dimensions? TODO: Find out what this class doe...
Definition: dpdimsave.hxx:160
Implementation of ScDPTableData with sheet data.
Definition: dpshttab.hxx:86
virtual void CalcResults(CalcInfo &rInfo, bool bAutoShow)=0
virtual long GetColumnCount()=0
use (new) typed collection instead of ScStrCollection or separate Str and ValueCollection ...
virtual void GetDrillDownData(const std::vector< ScDPFilteredCache::Criterion > &rCriteria, const std::unordered_set< sal_Int32 > &rCatDims, css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &rData)=0
This class represents the cached data part of the datapilot cache table implementation.
Definition: dpcache.hxx:47
ScDocument * mpDoc
Definition: dpshttab.hxx:80
void SetQueryParam(const ScQueryParam &rParam)
Definition: dpshttab.cxx:269
const char * CheckSourceRange() const
Check the sanity of the data source range.
Definition: dpshttab.cxx:306
virtual OUString getDimensionName(long nColumn)=0
ScQueryParam maQueryParam
Definition: dpshttab.hxx:79
SC_DLLPUBLIC void SetSourceRange(const ScRange &rRange)
Definition: dpshttab.cxx:223
ScRange maSourceRange
Definition: dpshttab.hxx:77
virtual void CreateCacheTable()=0
virtual bool getIsDataLayoutDimension(long nColumn)=0
SC_DLLPUBLIC const ScRange & GetSourceRange() const
Get the range that contains the source data.
Definition: dpshttab.cxx:229
virtual void ReloadCacheTable()=0
virtual void SetEmptyFlags(bool bIgnoreEmptyRows, bool bRepeatIfEmpty)=0
const ScQueryParam & GetQueryParam() const
Definition: dpshttab.hxx:63
virtual void Dump() const
ScQueryParam aQuery
Definition: dpshttab.hxx:89
virtual void DisposeData()=0
This structure stores dimension information used when calculating results.
Definition: dptabdat.hxx:69
bool operator==(const ScSheetSourceDesc &rOther) const
Definition: dpshttab.cxx:274
virtual bool IsDateDimension(long nDim)=0
SC_DLLPUBLIC const ScDPCache * CreateCache(const ScDPDimensionSaveData *pDimData) const
Definition: dpshttab.cxx:281
bool HasRangeName() const
Definition: dpshttab.cxx:264
Base class that abstracts different data source types of a datapilot table.
Definition: dptabdat.hxx:56
bool bRepeatIfEmpty
Definition: dpshttab.hxx:91
const OUString & GetRangeName() const
Definition: dpshttab.hxx:60
virtual sal_uInt32 GetNumberFormat(long nDim)
Definition: dptabdat.cxx:107
virtual void FilterCacheTable(const std::vector< ScDPFilteredCache::Criterion > &rCriteria, const std::unordered_set< sal_Int32 > &rDataDims)=0
virtual const ScDPFilteredCache & GetCacheTable() const =0
bool bIgnoreEmptyRows
Definition: dpshttab.hxx:90
OUString maRangeName
Definition: dpshttab.hxx:78
SC_DLLPUBLIC void SetRangeName(const OUString &rName)
Definition: dpshttab.cxx:259
This class is only a wrapper to the actual cache, to provide filtering on the raw data based on the q...
This class contains authoritative information on the internal reference used as the data source for d...
Definition: dpshttab.hxx:39
Definition: scdllapi.h:28
ScDPFilteredCache aCacheTable
Definition: dpshttab.hxx:93