Bump version to 4.3-4
[LibreOffice.git] / sc / inc / orcusxml.hxx
blobcc41f3b6c3e057d4ec94f0c6d7f168679916e10b
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"
15 #include <vcl/image.hxx>
17 #include <vector>
18 #include <boost/ptr_container/ptr_vector.hpp>
20 class SvTreeListEntry;
22 /**
23 * Parameter used during call to ScOrcusFilters::loadXMLStructure().
25 struct ScOrcusXMLTreeParam
27 enum EntryType { ElementDefault, ElementRepeat, Attribute };
29 /** Custom data stored with each tree item. */
30 struct EntryData
32 size_t mnNamespaceID; /// numerical ID for xml namespace
33 EntryType meType;
34 ScAddress maLinkedPos; /// linked cell position (invalid if unlinked)
35 bool mbRangeParent:1;
36 bool mbLeafNode:1; /// Leaf if it has no child elements. Child Attributes don't count.
38 SC_DLLPUBLIC EntryData(EntryType eType);
41 typedef boost::ptr_vector<EntryData> UserDataStoreType;
43 Image maImgElementDefault;
44 Image maImgElementRepeat;
45 Image maImgAttribute;
47 /**
48 * Store all custom data instances since the tree control doesn't manage
49 * the life cycle of user datas.
51 UserDataStoreType maUserDataStore;
53 static SC_DLLPUBLIC EntryData* getUserData(SvTreeListEntry& rEntry);
54 static SC_DLLPUBLIC const EntryData* getUserData(const SvTreeListEntry& rEntry);
57 struct ScOrcusImportXMLParam
59 struct CellLink
61 ScAddress maPos;
62 OString maPath;
64 CellLink(const ScAddress& rPos, const OString& rPath);
67 struct RangeLink
69 ScAddress maPos;
70 std::vector<OString> maFieldPaths;
73 typedef std::vector<CellLink> CellLinksType;
74 typedef std::vector<RangeLink> RangeLinksType;
76 std::vector<size_t> maNamespaces;
77 CellLinksType maCellLinks;
78 RangeLinksType maRangeLinks;
81 #endif
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */