nss: upgrade to release 3.73
[LibreOffice.git] / sc / inc / orcusxml.hxx
blob2f49f8249ef2bf4bca5fbf388b19d2a43f347f67
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 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 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 std::vector<size_t> maNamespaces;
76 std::vector<CellLink> maCellLinks;
77 std::vector<RangeLink> maRangeLinks;
80 #endif
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */