bump product version to 5.0.4.1
[LibreOffice.git] / xmloff / source / core / SvXMLAttrCollection.hxx
blobfeed18820a26efb24a1da4a878b194043408a732
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_XMLOFF_SOURCE_CORE_SVXMLATTRCOLLECTION_HXX
11 #define INCLUDED_XMLOFF_SOURCE_CORE_SVXMLATTRCOLLECTION_HXX
13 #include "SvXMLAttr.hxx"
15 #include <xmloff/nmspmap.hxx>
16 #include <rtl/ustring.hxx>
17 #include <sal/types.h>
18 #include <vector>
20 class SvXMLAttrCollection
22 public:
23 SvXMLNamespaceMap aNamespaceMap;
24 std::vector<SvXMLAttr> aAttrs;
26 bool operator==(const SvXMLAttrCollection &rCmp) const;
27 bool AddAttr( const OUString& rLName,
28 const OUString& rValue );
29 bool AddAttr( const OUString& rPrefix,
30 const OUString& rNamespace,
31 const OUString& rLName,
32 const OUString& rValue );
33 bool AddAttr( const OUString& rPrefix,
34 const OUString& rLName,
35 const OUString& rValue );
37 bool SetAt( size_t i,
38 const OUString& rLName,
39 const OUString& rValue );
40 bool SetAt( size_t i,
41 const OUString& rPrefix,
42 const OUString& rNamespace,
43 const OUString& rLName,
44 const OUString& rValue );
45 bool SetAt( size_t i,
46 const OUString& rPrefix,
47 const OUString& rLName,
48 const OUString& rValue );
50 void Remove( size_t i );
52 size_t GetAttrCount() const;
53 const OUString& GetAttrLName(size_t i) const;
54 const OUString& GetAttrValue(size_t i) const;
55 const OUString GetAttrNamespace( size_t i ) const;
56 const OUString GetAttrPrefix( size_t i ) const;
57 const OUString& GetNamespace( sal_uInt16 i ) const;
58 const OUString& GetPrefix( sal_uInt16 i ) const;
59 sal_uInt16 GetFirstNamespaceIndex() const;
60 sal_uInt16 GetNextNamespaceIndex( sal_uInt16 nIdx ) const;
62 private:
63 sal_uInt16 GetPrefixPos( size_t i ) const;
66 #endif // INCLUDED_XMLOFF_SOURCE_CORE_SVXMLATTRCOLLECTION_HXX
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */