LibreOffice Module sc (master)  1
dpshttab.hxx
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 http://mozilla.org/MPL/2.0/.
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 http://www.apache.org/licenses/LICENSE-2.0 .
18  */
19 
20 #pragma once
21 
22 #include "dptabdat.hxx"
23 #include "address.hxx"
24 #include "scdllapi.h"
25 #include "queryparam.hxx"
26 #include <unotools/resmgr.hxx>
27 
28 #include <unordered_set>
29 #include <vector>
30 
32 
40 {
41 public:
42  ScSheetSourceDesc() = delete;
43 
45 
46  SC_DLLPUBLIC void SetSourceRange(const ScRange& rRange);
47 
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;}
64 
65  bool operator== ( const ScSheetSourceDesc& rOther ) const;
66  SC_DLLPUBLIC const ScDPCache* CreateCache(const ScDPDimensionSaveData* pDimData) const;
67 
75 
76 private:
78  OUString maRangeName;
81 };
82 
87 {
88 private:
92 
94 
95 public:
96  ScSheetDPData(const ScDocument* pD, const ScSheetSourceDesc& rDesc, const ScDPCache& rCache);
97  virtual ~ScSheetDPData() override;
98 
99  virtual sal_Int32 GetColumnCount() override;
100  virtual OUString getDimensionName(sal_Int32 nColumn) override;
101  virtual bool getIsDataLayoutDimension(sal_Int32 nColumn) override;
102  virtual bool IsDateDimension(sal_Int32 nDim) override;
103  virtual sal_uInt32 GetNumberFormat(sal_Int32 nDim) override;
104  virtual void DisposeData() override;
105  virtual void SetEmptyFlags( bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) override;
106 
107  virtual bool IsRepeatIfEmpty() override;
108 
109  virtual void CreateCacheTable() override;
110  virtual void FilterCacheTable(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rCatDims) override;
111  virtual void GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria,
112  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;
117 
118 #if DUMP_PIVOT_TABLE
119  virtual void Dump() const override;
120 #endif
121 };
122 
123 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
virtual bool IsRepeatIfEmpty()
Definition: dptabdat.cxx:102
virtual bool IsDateDimension(sal_Int32 nDim)=0
This class has to do with handling exclusively grouped dimensions? TODO: Find out what this class doe...
Definition: dpdimsave.hxx:163
Implementation of ScDPTableData with sheet data.
Definition: dpshttab.hxx:86
TranslateId CheckSourceRange() const
Check the sanity of the data source range.
Definition: dpshttab.cxx:307
virtual void CalcResults(CalcInfo &rInfo, bool bAutoShow)=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:270
virtual void GetDrillDownData(std::vector< ScDPFilteredCache::Criterion > &&rCriteria, std::unordered_set< sal_Int32 > &&rCatDims, css::uno::Sequence< css::uno::Sequence< css::uno::Any > > &rData)=0
ScQueryParam maQueryParam
Definition: dpshttab.hxx:79
SC_DLLPUBLIC void SetSourceRange(const ScRange &rRange)
Definition: dpshttab.cxx:224
ScRange maSourceRange
Definition: dpshttab.hxx:77
virtual void CreateCacheTable()=0
ScSheetSourceDesc()=delete
SC_DLLPUBLIC const ScRange & GetSourceRange() const
Get the range that contains the source data.
Definition: dpshttab.cxx:230
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
virtual OUString getDimensionName(sal_Int32 nColumn)=0
bool operator==(const ScSheetSourceDesc &rOther) const
Definition: dpshttab.cxx:275
SC_DLLPUBLIC const ScDPCache * CreateCache(const ScDPDimensionSaveData *pDimData) const
Definition: dpshttab.cxx:282
bool HasRangeName() const
Definition: dpshttab.cxx:265
virtual bool getIsDataLayoutDimension(sal_Int32 nColumn)=0
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(sal_Int32 nDim)
Definition: dptabdat.cxx:107
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:260
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
#define SC_DLLPUBLIC
Definition: scdllapi.h:27
virtual void FilterCacheTable(std::vector< ScDPFilteredCache::Criterion > &&rCriteria, std::unordered_set< sal_Int32 > &&rDataDims)=0
ScDPFilteredCache aCacheTable
Definition: dpshttab.hxx:93
virtual sal_Int32 GetColumnCount()=0
use (new) typed collection instead of ScStrCollection or separate Str and ValueCollection ...