1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
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/.
10 #ifndef INCLUDED_SC_INC_ORCUSXML_HXX
11 #define INCLUDED_SC_INC_ORCUSXML_HXX
14 #include "address.hxx"
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. */
34 size_t mnNamespaceID
; /// numerical ID for xml namespace
35 EntryType
const meType
;
36 ScAddress maLinkedPos
; /// linked cell position (invalid if unlinked)
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
;
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
65 CellLink(const ScAddress
& rPos
, const OString
& rPath
);
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
;
85 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */