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>
18 #include <boost/ptr_container/ptr_vector.hpp>
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 boost::ptr_vector
<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 maUserDataStore
;
53 static SC_DLLPUBLIC EntryData
* getUserData(SvTreeListEntry
& rEntry
);
54 static SC_DLLPUBLIC
const EntryData
* getUserData(const SvTreeListEntry
& rEntry
);
57 struct ScOrcusImportXMLParam
64 CellLink(const ScAddress
& rPos
, const OString
& rPath
);
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
;
83 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */