Bump version to 6.4-15
[LibreOffice.git] / sc / inc / orcusxml.hxx
blob5db292c29d54fab91b2ecb5330b92c9eecfbcdf3
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_INC_ORCUSXML_HXX
11 #define INCLUDED_SC_INC_ORCUSXML_HXX
13 #include "scdllapi.h"
14 #include "address.hxx"
16 #include <vector>
17 #include <memory>
19 namespace weld {
20 class TreeIter;
21 class TreeView;
24 /**
25 * Parameter used during call to ScOrcusFilters::loadXMLStructure().
27 struct ScOrcusXMLTreeParam
29 enum EntryType { ElementDefault, ElementRepeat, Attribute };
31 /** Custom data stored with each tree item. */
32 struct EntryData
34 size_t mnNamespaceID; /// numerical ID for xml namespace
35 EntryType const meType;
36 ScAddress maLinkedPos; /// linked cell position (invalid if unlinked)
37 bool mbRangeParent:1;
38 bool mbLeafNode:1; /// Leaf if it has no child elements. Child Attributes don't count.
40 SC_DLLPUBLIC EntryData(EntryType eType);
43 typedef std::vector<std::unique_ptr<EntryData>> UserDataStoreType;
45 OUString maImgElementDefault;
46 OUString maImgElementRepeat;
47 OUString maImgAttribute;
49 /**
50 * Store all custom data instances since the tree control doesn't manage
51 * the life cycle of user data.
53 UserDataStoreType m_UserDataStore;
55 static SC_DLLPUBLIC EntryData* getUserData(const weld::TreeView& rControl, const weld::TreeIter& rEntry);
58 struct ScOrcusImportXMLParam
60 struct CellLink
62 ScAddress maPos;
63 OString maPath;
65 CellLink(const ScAddress& rPos, const OString& rPath);
68 struct RangeLink
70 ScAddress maPos;
71 std::vector<OString> maFieldPaths;
72 std::vector<OString> maRowGroups;
75 typedef std::vector<CellLink> CellLinksType;
76 typedef std::vector<RangeLink> RangeLinksType;
78 std::vector<size_t> maNamespaces;
79 CellLinksType maCellLinks;
80 RangeLinksType maRangeLinks;
83 #endif
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */