LibreOffice Module xmloff (master)  1
SvXMLAttrCollection.hxx
Go to the documentation of this file.
1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2 /*
3  * This file is part of the LibreOffice project.
4  *
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  */
9 
10 #ifndef INCLUDED_XMLOFF_SOURCE_CORE_SVXMLATTRCOLLECTION_HXX
11 #define INCLUDED_XMLOFF_SOURCE_CORE_SVXMLATTRCOLLECTION_HXX
12 
13 #include "SvXMLAttr.hxx"
14 
15 #include <xmloff/namespacemap.hxx>
16 #include <rtl/ustring.hxx>
17 #include <sal/types.h>
18 #include <vector>
19 
21 {
22 public:
24  std::vector<SvXMLAttr> aAttrs;
25 
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 );
36 
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 );
49 
50  void Remove( size_t i );
51 
52  size_t GetAttrCount() const;
53  const OUString& GetAttrLName(size_t i) const;
54  const OUString& GetAttrValue(size_t i) const;
55  OUString GetAttrNamespace( size_t i ) const;
56  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;
61 
62 private:
63  sal_uInt16 GetPrefixPos( size_t i ) const;
64 };
65 
66 #endif // INCLUDED_XMLOFF_SOURCE_CORE_SVXMLATTRCOLLECTION_HXX
67 
68 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */
69 
std::vector< SvXMLAttr > aAttrs
size_t GetAttrCount() const
sal_uInt16 GetPrefixPos(size_t i) const
bool SetAt(size_t i, const OUString &rLName, const OUString &rValue)
sal_uInt16 GetNextNamespaceIndex(sal_uInt16 nIdx) const
css::uno::Any const & rValue
Definition: ImageStyle.hxx:38
SvXMLNamespaceMap aNamespaceMap
sal_uInt16 GetFirstNamespaceIndex() const
OUString GetAttrNamespace(size_t i) const
OUString GetAttrPrefix(size_t i) const
const OUString & GetPrefix(sal_uInt16 i) const
const OUString & GetAttrValue(size_t i) const
bool operator==(const SvXMLAttrCollection &rCmp) const
const OUString & GetAttrLName(size_t i) const
const OUString & GetNamespace(sal_uInt16 i) const
bool AddAttr(const OUString &rLName, const OUString &rValue)