tdf#62032 use style list level when changing style
[LibreOffice.git] / sc / inc / dpsdbtab.hxx
blob599e832e1baed991e3c9da44100e6941d9321753
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3 * This file is part of the LibreOffice project.
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/.
9 * This file incorporates work covered by the following license notice:
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 .
20 #pragma once
22 #include "dptabdat.hxx"
24 #include <com/sun/star/sheet/DataImportMode.hpp>
26 #include <unordered_set>
27 #include <vector>
29 class ScDocument;
30 class ScDPCache;
31 class ScDPDimensionSaveData;
33 struct ScImportSourceDesc
35 OUString aDBName;
36 OUString aObject;
37 css::sheet::DataImportMode nType;
38 bool bNative;
39 ScDocument* mpDoc;
41 ScImportSourceDesc(ScDocument* pDoc) : nType(css::sheet::DataImportMode_NONE), bNative(false), mpDoc(pDoc) {}
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; }
50 sal_Int32 GetCommandType() const;
51 const ScDPCache* CreateCache(const ScDPDimensionSaveData* pDimData) const;
54 /**
55 * This class represents source data from database source.
57 class ScDatabaseDPData final : public ScDPTableData
59 private:
60 ScDPFilteredCache aCacheTable;
61 public:
62 ScDatabaseDPData(const ScDocument* pDoc, const ScDPCache& rCache);
63 virtual ~ScDatabaseDPData() override;
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;
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;
81 #if DUMP_PIVOT_TABLE
82 virtual void Dump() const override;
83 #endif
86 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */