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/.
13 #include "address.hxx"
24 * Parameter used during call to ScOrcusFilters::loadXMLStructure().
26 struct ScOrcusXMLTreeParam
28 enum EntryType
{ ElementDefault
, ElementRepeat
, Attribute
};
30 /** Custom data stored with each tree item. */
33 size_t mnNamespaceID
; /// numerical ID for xml namespace
35 ScAddress maLinkedPos
; /// linked cell position (invalid if unlinked)
37 bool mbLeafNode
:1; /// Leaf if it has no child elements. Child Attributes don't count.
39 SC_DLLPUBLIC
EntryData(EntryType eType
);
42 typedef std::vector
<std::unique_ptr
<EntryData
>> UserDataStoreType
;
44 OUString maImgElementDefault
;
45 OUString maImgElementRepeat
;
46 OUString maImgAttribute
;
49 * Store all custom data instances since the tree control doesn't manage
50 * the life cycle of user data.
52 UserDataStoreType m_UserDataStore
;
54 static EntryData
* getUserData(const weld::TreeView
& rControl
, const weld::TreeIter
& rEntry
);
57 struct ScOrcusImportXMLParam
64 CellLink(const ScAddress
& rPos
, const OString
& rPath
);
70 std::vector
<OString
> maFieldPaths
;
71 std::vector
<OString
> maRowGroups
;
74 std::vector
<size_t> maNamespaces
;
75 std::vector
<CellLink
> maCellLinks
;
76 std::vector
<RangeLink
> maRangeLinks
;
79 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */