Stop leaking all ScPostIt instances.
[LibreOffice.git] / sc / inc / dpsdbtab.hxx
blobbc30600018f177a3535b4d4a49fcc0b45e7b5723
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 #ifndef SC_DPSDBTAB_HXX
21 #define SC_DPSDBTAB_HXX
23 #include <com/sun/star/uno/Reference.hxx>
25 #include "dptabdat.hxx"
27 #include <vector>
28 #include <boost/unordered_set.hpp>
30 class ScDPFilteredCache;
31 class ScDocument;
32 class ScDPCache;
33 class ScDPDimensionSaveData;
35 struct ScImportSourceDesc
37 OUString aDBName;
38 OUString aObject;
39 sal_uInt16 nType; // enum DataImportMode
40 bool bNative;
41 ScDocument* mpDoc;
43 ScImportSourceDesc(ScDocument* pDoc) : nType(0), bNative(false), mpDoc(pDoc) {}
45 bool operator== ( const ScImportSourceDesc& rOther ) const
46 { return aDBName == rOther.aDBName &&
47 aObject == rOther.aObject &&
48 nType == rOther.nType &&
49 bNative == rOther.bNative &&
50 mpDoc == rOther.mpDoc; }
52 sal_Int32 GetCommandType() const;
53 const ScDPCache* CreateCache(const ScDPDimensionSaveData* pDimData) const;
56 /**
57 * This class represents source data from database source.
59 class ScDatabaseDPData : public ScDPTableData
61 private:
62 ScDPFilteredCache aCacheTable;
63 public:
64 ScDatabaseDPData(ScDocument* pDoc, const ScDPCache& rCache);
65 virtual ~ScDatabaseDPData();
67 virtual long GetColumnCount();
68 virtual OUString getDimensionName(long nColumn);
69 virtual sal_Bool getIsDataLayoutDimension(long nColumn);
70 virtual sal_Bool IsDateDimension(long nDim);
71 virtual void DisposeData();
72 virtual void SetEmptyFlags( sal_Bool bIgnoreEmptyRows, sal_Bool bRepeatIfEmpty );
74 virtual void CreateCacheTable();
75 virtual void FilterCacheTable(const ::std::vector<ScDPFilteredCache::Criterion>& rCriteria, const ::boost::unordered_set<sal_Int32>& rDataDims);
76 virtual void GetDrillDownData(const ::std::vector<ScDPFilteredCache::Criterion>& rCriteria,
77 const ::boost::unordered_set<sal_Int32>& rCatDims,
78 ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Sequence< ::com::sun::star::uno::Any > >& rData);
79 virtual void CalcResults(CalcInfo& rInfo, bool bAutoShow);
80 virtual const ScDPFilteredCache& GetCacheTable() const;
81 virtual void ReloadCacheTable();
86 #endif
88 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */