Version 6.4.0.3, tag libreoffice-6.4.0.3
[LibreOffice.git] / sc / source / filter / xml / pivotsource.hxx
blobfaf0a4e06e456a29268a721dc5eb7d1a5507091e
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/.
8 */
10 #ifndef INCLUDED_SC_SOURCE_FILTER_XML_PIVOTSOURCE_HXX
11 #define INCLUDED_SC_SOURCE_FILTER_XML_PIVOTSOURCE_HXX
13 #include <dpshttab.hxx>
14 #include <dpsdbtab.hxx>
15 #include <dpobject.hxx>
17 #include <unordered_map>
18 #include <vector>
20 namespace sc {
22 /**
23 * Store pivot table data that need to be post-processed at the end of the
24 * import.
26 struct PivotTableSources
28 typedef std::unordered_map<OUString, OUString> SelectedPagesType;
30 struct SelectedPages
32 ScDPObject* mpDP;
33 SelectedPagesType maSelectedPages;
35 SelectedPages( ScDPObject* pObj, const SelectedPagesType& rSelected );
38 struct SheetSource
40 ScDPObject* const mpDP;
41 ScSheetSourceDesc const maDesc;
43 SheetSource( ScDPObject* pObj, const ScSheetSourceDesc& rDesc );
46 struct DBSource
48 ScDPObject* const mpDP;
49 ScImportSourceDesc const maDesc;
51 DBSource( ScDPObject* pObj, const ScImportSourceDesc& rDesc );
54 struct ServiceSource
56 ScDPObject* const mpDP;
57 ScDPServiceDesc const maDesc;
59 ServiceSource( ScDPObject* pObj, const ScDPServiceDesc& rDesc );
62 typedef std::vector<SelectedPages> SelectedPagesListType;
64 typedef std::vector<SheetSource> SheetSourcesType;
65 typedef std::vector<DBSource> DBSourcesType;
66 typedef std::vector<ServiceSource> ServiceSourcesType;
68 SelectedPagesListType maSelectedPagesList;
70 SheetSourcesType maSheetSources;
71 DBSourcesType maDBSources;
72 ServiceSourcesType maServiceSources;
74 PivotTableSources();
76 void appendSheetSource( ScDPObject* pObj, const ScSheetSourceDesc& rDesc );
77 void appendDBSource( ScDPObject* pObj, const ScImportSourceDesc& rDesc );
78 void appendServiceSource( ScDPObject* pObj, const ScDPServiceDesc& rDesc );
80 void appendSelectedPages( ScDPObject* pObj, const SelectedPagesType& rSelected );
82 void process();
87 #endif
89 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */