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  */
20 #pragma once
22 #include "dptabdat.hxx"
23 #include "address.hxx"
24 #include "scdllapi.h"
25 #include "queryparam.hxx"
27 #include <unordered_set>
28 #include <vector>
39 {
40 public:
41  ScSheetSourceDesc() = delete;
45  SC_DLLPUBLIC void SetSourceRange(const ScRange& rRange);
57  SC_DLLPUBLIC const ScRange& GetSourceRange() const;
58  SC_DLLPUBLIC void SetRangeName(const OUString& rName);
59  const OUString& GetRangeName() const { return maRangeName;}
60  bool HasRangeName() const;
61  void SetQueryParam(const ScQueryParam& rParam);
62  const ScQueryParam& GetQueryParam() const { return maQueryParam;}
64  bool operator== ( const ScSheetSourceDesc& rOther ) const;
65  SC_DLLPUBLIC const ScDPCache* CreateCache(const ScDPDimensionSaveData* pDimData) const;
73  const char* CheckSourceRange() const;
75 private:
77  OUString maRangeName;
80 };
86 {
87 private:
94 public:
95  ScSheetDPData(const ScDocument* pD, const ScSheetSourceDesc& rDesc, const ScDPCache& rCache);
96  virtual ~ScSheetDPData() override;
98  virtual sal_Int32 GetColumnCount() override;
99  virtual OUString getDimensionName(sal_Int32 nColumn) override;
100  virtual bool getIsDataLayoutDimension(sal_Int32 nColumn) override;
101  virtual bool IsDateDimension(sal_Int32 nDim) override;
102  virtual sal_uInt32 GetNumberFormat(sal_Int32 nDim) override;
103  virtual void DisposeData() override;
104  virtual void SetEmptyFlags( bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) override;
106  virtual bool IsRepeatIfEmpty() override;
108  virtual void CreateCacheTable() override;
109  virtual void FilterCacheTable(const std::vector<ScDPFilteredCache::Criterion>& rCriteria, const std::unordered_set<sal_Int32>& rCatDims) override;
110  virtual void GetDrillDownData(const std::vector<ScDPFilteredCache::Criterion>& rCriteria,
111  const std::unordered_set<sal_Int32>& rCatDims,
112  css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& rData) override;
113  virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow) override;
114  virtual const ScDPFilteredCache& GetCacheTable() const override;
115  virtual void ReloadCacheTable() override;
118  virtual void Dump() const override;
119 #endif
120 };
122 /* 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:85
virtual void CalcResults(CalcInfo &rInfo, bool bAutoShow)=0
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:79
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
ScQueryParam maQueryParam
Definition: dpshttab.hxx:78
SC_DLLPUBLIC void SetSourceRange(const ScRange &rRange)
Definition: dpshttab.cxx:223
ScRange maSourceRange
Definition: dpshttab.hxx:76
virtual void CreateCacheTable()=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:62
virtual void Dump() const
ScQueryParam aQuery
Definition: dpshttab.hxx:88
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:274
SC_DLLPUBLIC const ScDPCache * CreateCache(const ScDPDimensionSaveData *pDimData) const
Definition: dpshttab.cxx:281
bool HasRangeName() const
Definition: dpshttab.cxx:264
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:90
const OUString & GetRangeName() const
Definition: dpshttab.hxx:59
virtual void FilterCacheTable(const std::vector< ScDPFilteredCache::Criterion > &rCriteria, const std::unordered_set< sal_Int32 > &rDataDims)=0
virtual sal_uInt32 GetNumberFormat(sal_Int32 nDim)
Definition: dptabdat.cxx:107
virtual const ScDPFilteredCache & GetCacheTable() const =0
bool bIgnoreEmptyRows
Definition: dpshttab.hxx:89
OUString maRangeName
Definition: dpshttab.hxx:77
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:38
Definition: scdllapi.h:27
ScDPFilteredCache aCacheTable
Definition: dpshttab.hxx:92
virtual sal_Int32 GetColumnCount()=0
use (new) typed collection instead of ScStrCollection or separate Str and ValueCollection ...