LibreOffice Module sc (master) 1
dpsdbtab.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
24#include <com/sun/star/sheet/DataImportMode.hpp>
25
26#include <unordered_set>
27#include <vector>
28
29class ScDocument;
30class ScDPCache;
32
34{
35 OUString aDBName;
36 OUString aObject;
37 css::sheet::DataImportMode nType;
38 bool bNative;
40
41 ScImportSourceDesc(ScDocument* pDoc) : nType(css::sheet::DataImportMode_NONE), bNative(false), mpDoc(pDoc) {}
42
43 bool operator== ( const ScImportSourceDesc& rOther ) const
44 { return aDBName == rOther.aDBName &&
45 aObject == rOther.aObject &&
46 nType == rOther.nType &&
47 bNative == rOther.bNative &&
48 mpDoc == rOther.mpDoc; }
49
50 sal_Int32 GetCommandType() const;
51 const ScDPCache* CreateCache(const ScDPDimensionSaveData* pDimData) const;
52};
53
57class ScDatabaseDPData final : public ScDPTableData
58{
59private:
61public:
62 ScDatabaseDPData(const ScDocument* pDoc, const ScDPCache& rCache);
63 virtual ~ScDatabaseDPData() override;
64
65 virtual sal_Int32 GetColumnCount() override;
66 virtual OUString getDimensionName(sal_Int32 nColumn) override;
67 virtual bool getIsDataLayoutDimension(sal_Int32 nColumn) override;
68 virtual bool IsDateDimension(sal_Int32 nDim) override;
69 virtual void DisposeData() override;
70 virtual void SetEmptyFlags( bool bIgnoreEmptyRows, bool bRepeatIfEmpty ) override;
71
72 virtual void CreateCacheTable() override;
73 virtual void FilterCacheTable(std::vector<ScDPFilteredCache::Criterion>&& rCriteria, std::unordered_set<sal_Int32>&& rDataDims) override;
74 virtual void GetDrillDownData(std::vector<ScDPFilteredCache::Criterion>&& rCriteria,
75 std::unordered_set<sal_Int32>&& rCatDims,
76 css::uno::Sequence< css::uno::Sequence< css::uno::Any > >& rData) override;
77 virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow) override;
78 virtual const ScDPFilteredCache& GetCacheTable() const override;
79 virtual void ReloadCacheTable() override;
80
81#if DUMP_PIVOT_TABLE
82 virtual void Dump() const override;
83#endif
84};
85
86/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
This class represents the cached data part of the datapilot cache table implementation.
Definition: dpcache.hxx:48
This class has to do with handling exclusively grouped dimensions? TODO: Find out what this class doe...
Definition: dpdimsave.hxx:164
This class is only a wrapper to the actual cache, to provide filtering on the raw data based on the q...
Base class that abstracts different data source types of a datapilot table.
Definition: dptabdat.hxx:57
This class represents source data from database source.
Definition: dpsdbtab.hxx:58
virtual void SetEmptyFlags(bool bIgnoreEmptyRows, bool bRepeatIfEmpty) override
Definition: dpsdbtab.cxx:110
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
Definition: dpsdbtab.cxx:132
virtual void CalcResults(CalcInfo &rInfo, bool bAutoShow) override
Definition: dpsdbtab.cxx:143
ScDPFilteredCache aCacheTable
Definition: dpsdbtab.hxx:60
virtual void FilterCacheTable(std::vector< ScDPFilteredCache::Criterion > &&rCriteria, std::unordered_set< sal_Int32 > &&rDataDims) override
Definition: dpsdbtab.cxx:125
virtual void DisposeData() override
Definition: dpsdbtab.cxx:74
ScDatabaseDPData(const ScDocument *pDoc, const ScDPCache &rCache)
Definition: dpsdbtab.cxx:63
virtual const ScDPFilteredCache & GetCacheTable() const override
Definition: dpsdbtab.cxx:149
virtual OUString getDimensionName(sal_Int32 nColumn) override
Definition: dpsdbtab.cxx:86
virtual bool getIsDataLayoutDimension(sal_Int32 nColumn) override
Definition: dpsdbtab.cxx:99
virtual sal_Int32 GetColumnCount() override
use (new) typed collection instead of ScStrCollection or separate Str and ValueCollection
Definition: dpsdbtab.cxx:80
virtual void ReloadCacheTable() override
Definition: dpsdbtab.cxx:154
virtual void CreateCacheTable() override
Definition: dpsdbtab.cxx:116
virtual ~ScDatabaseDPData() override
Definition: dpsdbtab.cxx:70
virtual bool IsDateDimension(sal_Int32 nDim) override
Definition: dpsdbtab.cxx:104
virtual void Dump() const override
This structure stores dimension information used when calculating results.
Definition: dptabdat.hxx:70
css::sheet::DataImportMode nType
Definition: dpsdbtab.hxx:37
sal_Int32 GetCommandType() const
Definition: dpsdbtab.cxx:35
const ScDPCache * CreateCache(const ScDPDimensionSaveData *pDimData) const
Definition: dpsdbtab.cxx:50
OUString aObject
Definition: dpsdbtab.hxx:36
bool operator==(const ScImportSourceDesc &rOther) const
Definition: dpsdbtab.hxx:43
ScImportSourceDesc(ScDocument *pDoc)
Definition: dpsdbtab.hxx:41
ScDocument * mpDoc
Definition: dpsdbtab.hxx:39
OUString aDBName
Definition: dpsdbtab.hxx:35