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"
15 #include <vcl/image.hxx>
20 class SvTreeListEntry
;
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. */
32 size_t mnNamespaceID
; /// numerical ID for xml namespace
34 ScAddress maLinkedPos
; /// linked cell position (invalid if unlinked)
36 bool mbLeafNode
:1; /// Leaf if it has no child elements. Child Attributes don't count.
38 SC_DLLPUBLIC
EntryData(EntryType eType
);
41 typedef std::vector
<std::unique_ptr
<EntryData
>> UserDataStoreType
;
43 Image maImgElementDefault
;
44 Image maImgElementRepeat
;
48 * Store all custom data instances since the tree control doesn't manage
49 * the life cycle of user datas.
51 UserDataStoreType m_UserDataStore
;
53 static SC_DLLPUBLIC EntryData
* getUserData(const SvTreeListEntry
& rEntry
);
56 struct ScOrcusImportXMLParam
63 CellLink(const ScAddress
& rPos
, const OString
& rPath
);
69 std::vector
<OString
> maFieldPaths
;
72 typedef std::vector
<CellLink
> CellLinksType
;
73 typedef std::vector
<RangeLink
> RangeLinksType
;
75 std::vector
<size_t> maNamespaces
;
76 CellLinksType maCellLinks
;
77 RangeLinksType maRangeLinks
;
82 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */